- b2evolution CMS User Manual
- Front-office Reference
- Disp Reference
- disp = posts (List of Posts / Items)
disp = posts (List of Posts / Items)
This Disp is used to display a list of Items/Posts, filtered or not with additional params.
This is the most common front page of a Blog.
The display can be configured in the collection Features > Posts.
This, of course, only applies as long as the particular skin you are using doesn’t completely override the behavior of b2evolution’s default disp=posts
handler.
URL Parameters
The contents of this disp can vary based on the following URL Parameters:
Name |
Type |
Description |
Default |
Usage |
---|---|---|---|---|
blog |
integer |
ID of the collection to be displayed. |
Web only |
|
posts |
integer |
Number of items/posts or days (depending on "unit") to display on the page |
Depends on collection setting Posts/Days per page |
Web + API |
unit |
string |
What unit use to pagination: ‘posts’ or ‘days’ |
Depends on collection setting Display unit |
Web + API |
cat |
integer / string |
|
Web + API |
|
catsel%5B%5D |
array |
|
Web + API |
|
tag |
string |
Tag name, or several tags separated by comma |
Web + API |
|
author |
integer / string |
|
Web + API |
|
author_login |
string |
|
Web + API |
|
assgn |
integer / string |
|
Web + API |
|
assgn_login |
string |
|
Web + API |
|
author_assignee |
integer |
User ID of post author or assignee: selects posts from that author or assignee only |
Web + API |
|
lc |
string |
Post locale. Examples:
|
all |
Web + API |
status |
string |
|
Web + API |
|
types |
string |
|
Web + API |
|
s |
string |
Search string: sentence or words (separate with spaces or commas) to be searched in the post fields(see param |
Web + API |
|
scope |
string |
The post fields that are used for searching |
title,content |
Web + API |
sentence |
string |
Search for sentence or for words. Available values:
|
AND |
Web + API |
exact |
integer |
1 - Use exact match for searching, 0 - Find the words as part of the fields |
0 |
Web + API |
p |
integer |
Get single post by ID |
Web + API |
|
page |
integer |
Page number in multipage post |
1 |
Web only |
title |
string |
Get single post by urltitle |
Web + API |
|
pl |
integer / string |
|
Web + API |
|
m |
string |
Filter posts by date:
|
Web + API |
|
w |
integer |
Week number of current selected year:
|
Web + API |
|
dstart |
string |
Filter posts by start date:
|
Web + API |
|
dstop |
string |
Filter posts by stop date:
|
Web + API |
|
show_statuses%5B%5D |
array |
Post statuses: ‘published’, ‘community’, ‘deprecated’, ‘protected’, ‘private’, ‘review’, ‘draft’, ‘redirected’. |
All post statuses that are available for current user |
Web + API |
orderby |
string |
List of post fields to order by, separated by space or comma (requires some knowledge of the database):
|
Depending on collection setting Order by |
Web + API |
order |
string |
Order direction:
|
Depending on collection setting Direction |
Web + API |
Examples
To pass parameters in the query string, precede the first param name with a ?
question mark and every other param with a &
sign.
-
index.php?disp=posts&m=200107
will display the month of July 2001. -
index.php?disp=posts&m=20010701
will display all posts from July 1st, 2001. -
index.php?disp=posts&w=20
will display the posts from the 20th week of the year, where January 1st is in the first week (according to PHP). -
index.php?disp=posts&s=blue+house
will display the posts that match the search request "blue house". -
index.php?cat=1
will display all posts that belong to category with ID #1. -
index.php?author=1
will display all posts from the author with ID #1 (typicallyadmin
).
You can also mix these variables, example: index.php?m=200107&s=hotdog
will display the posts that match the search request "hotdog", but only in July 2001.
Default Container and Widgets
Below is the default main Container and Widgets of this $disp
that comes with b2evolution. Yours may look different depending on the particular skin in use and the widgets currently installed and how they are configured.
_posts.disp.php
file in the currently used skin’s folder.