b2evolution b2evolution

  • Sign in
  • Sign up
  • About
  • Demo
  • Downloads
  • Hosting
  • Docs
  • Support
  • Sign in
  • Sign up
  • Manuals Home
  • Latest Updates
 
  1. b2evolution CMS User Manual
  2. Front-office Reference
  3. Disp Reference
  4. disp = posts (List of Posts / Items)

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:

Possible request params

Name

Type

Description

Default

Usage

blog

integer

ID of the collection to be displayed.
This is for RSS generation mainly.
In the front-office, the ID of the collection to be displayed will generally be determined by the URL.

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

  • Category ID: selects posts from that category as well as its sub-categories
  • Comma separated list of category IDs: selects posts from all listed categories and their sub-categories
  • Starting the list with a minus (-) will select posts from all categories but the listed ones. Items that belong to any other non-hidden category, will be shown when display that particular category. i.e. If an item "X" belongs to categories "A" and "B", and "A" is affected by the minus (-) operator, but "B" is not, then the inheritance of category "B" will take effect and item "X" is shown.
  • Starting the list with an asterisk (*) will select posts which are categorized simultaneously in ALL listed categories.
  • This parameter can be just - or * if you combine it with [b]catsel[/b] below.

Web + API

catsel%5B%5D

array

  • If this was unencoded it would actually read catsel[] . Think this is a joke? Actually yes, PHP sometimes feels like a joke! This is the normal way of passing multiple values for a parameter in PHP!
  • This parameter can appear several times with a different category ID each. All the IDs will add up to the category list (except if exclusion mode is used)
  • The difference with the cat param is that with catsel you only select the specific category but you don’t select its sub-categories.
  • the variable equivalent is $catsel[] =

Web + API

tag

string

Tag name, or several tags separated by comma

Web + API

author

integer / string

  • Author ID: selects posts from that author only
  • Comma separated list of author ID: selects posts from all listed authors only
  • Starting the list with a minus (-) will select posts from all authors except the listed ones

Web + API

author_login

string

  • Author login: selects posts from that author only
  • Comma separated list of author login: selects posts from all listed authors only
  • Starting the list with a minus (-) will select posts from all authors except the listed ones

Web + API

assgn

integer / string

  • Use when workflow feature is enabled for the collection
  • User ID of post assignee: selects posts from that assignee only
  • Comma separated list of assignee ID: selects posts from all listed assignees only
  • Starting the list with a minus (-) will select posts from all assignees except the listed ones

Web + API

assgn_login

string

  • Use when workflow feature is enabled for the collection
  • User login of post assignee: selects posts from that assignee only
  • Comma separated list of assignee login: selects posts from all listed assignees only
  • Starting the list with a minus (-) will select posts from all assignees except the listed ones

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:

  • lc=en returns all posts with locale en-US, en-GB, en-SG.
  • lc=en-US returns only the posts with locale en-US.

all

Web + API

status

string

  • Use when workflow feature is enabled for the collection
  • Task status ID: selects posts with that status only
  • Comma separated list of status ID: selects posts with all listed statuses only
  • Starting the list with a minus (-) will select posts with all statuses except the listed ones

Web + API

types

string

  • Post type ID: selects posts with that types only
  • Comma separated list of type ID: selects posts with all listed types only
  • Starting the list with a minus (-) will select posts with all types except the listed ones

Web + API

s

string

Search string: sentence or words (separate with spaces or commas) to be searched in the post fields(see param scope)

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: search for words, combining them with AND (default)
  • OR: search for words, combining them with OR
  • sentence or 1: search for whole sentence to be used in conjunction with param s

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

  • Comma separated list of post IDs
  • Starting the list with a minus (-) will select posts except the listed ones

Web + API

m

string

Filter posts by date:

  • yyyy: display specific year
  • yyyymm: display specific month mm of year yyyy
  • yyyymmdd: display specific day
  • yyyymmddhh: hour
  • yyyymmddhhmm: hour minute
  • yyyymmddhhmmss: hour minute second

Web + API

w

integer

Week number of current selected year:

  • Display posts of that week (to be used in conjunction with param m for the year)
  • Note: b2evo uses MySQL’s week numbering and MySQL default if applicable.
  • In MySQL < 4.0.14, WEEK() always uses mode 0: Week starts on Sunday.
  • Value range is 0 to 53; week 1 is the first week that starts in this year.
  • See MySQL manual.

Web + API

dstart

string

Filter posts by start date:

  • yyyy: display specific year
  • yyyymm: display specific month mm of year yyyy
  • yyyymmdd: display specific day
  • yyyymmddhh: hour
  • yyyymmddhhmm: hour minute
  • yyyymmddhhmmss: hour minute second

Web + API

dstop

string

Filter posts by stop date:

  • yyyy: display specific year
  • yyyymm: display specific month mm of year yyyy
  • yyyymmdd: display specific day
  • yyyymmddhh: hour
  • yyyymmddhhmm: hour minute
  • yyyymmddhhmmss: hour minute second

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):

  • datestart: Date issued
  • order: Order (as explicitly specified)
  • title: Title
  • datecreated: Date created
  • datemodified: Date last modified
  • last_touched_ts: Date last touched
  • urltitle: URL "filename"
  • priority: Priority
  • views: Views
  • RAND: Random order
  • creator_user_ID: Author ID

Depending on collection setting Order by

Web + API

order

string

Order direction:

  • ASC: ascending/chronological
  • DESC: descending/reverse chronological

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 (typically admin).

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.

disp = posts (List of Posts / Items)

Tip: We can fully customize how this disp will look by creating or replacing the _posts.disp.php file in the currently used skin’s folder.

Tags: 6.11.2
Created by fplanque • Last edit by winskie on 2019-05-28 05:41 • •

No feedback yet


Form is loading...

On this page

  • URL Parameters
  • Examples
  • Default Container and Widgets

Search the Manual

Content Hierarchy

  • b2evolution CMS User Manual
  • User's Guide
  • Installation / Upgrade
  • Front-office Reference
    • Collection Types
    • Disp Reference
      • User Profile Disps
      • disp = 404
      • disp = access_denied
      • disp = access_requires_login
      • disp = activateinfo
      • disp = arcdir
      • disp = catdir
      • disp = comments
      • disp = contacts
      • disp = download
      • disp = edit
      • disp = edit_comment
      • disp = feedback-popup
      • disp = flagged
      • disp = front
      • disp = help
      • disp = login
      • disp = lostpassword
      • disp = mediaidx
      • disp = messages
      • disp = msgform
      • disp = page
      • disp = postidx
      • disp = posts
      • disp = proposechange
      • disp = register
      • disp = search
      • disp = single
      • disp = sitemap
      • disp = tags
      • disp = terms
      • disp = threads
      • disp = usercomments
      • disp = useritems
      • disp = users
      • disp = visits
      • disp_detail = posts-cat
      • disp_detail = posts-date
      • disp_detail = posts-default
      • disp_detail = posts-filtered
      • disp_detail = posts-next
      • disp_detail = posts-subcat
      • disp_detail = posts-tag
      • disp_detail = posts-topcat
    • Widgets Reference
    • The In-skin Edit Screen
    • Comments / Feedback Area
    • Social Media Meta Tags
    • Workflow Panel
    • Flagging Items
  • Back-office Reference
  • Developer Reference
  • Operations Reference
  • Advanced Topics
  • Glossary
  • Archives
Build your own site!

This online manual is powered by b2evolution CMS – A complete engine for your website.

About b2evolution

  • What is it?
  • Features
  • Getting Started
  • Screenshots
  • Online demo
  • Testimonials
  • Design philosophy
  • Free & open source
  • Terms of service

Downloads

  • Latest releases
  • Skins
  • Plugins
  • Language packs

About us

  • About us
  • Contact

Webhosting Guide

  • Web hosting blog
  • Best web hosting
  • Cheap web hosting
  • Green web hosting
  • Hosting with SSH
  • VPS hosting
  • Dedicated servers
  • Reseller hosting
  • Int'l: UK / France

Docs & Support

  • Online manual
  • Forums
  • Hire a pro !

Other

  • Adsense
  • Press room
  • Privacy policy

Stay in touch

  • GitHub
  • Twitter
  • Facebook
  • LinkedIn
  • News blog
  • RSS feed
  • Atom feed

Founded & Maintained by François Planque