Predefined variables

Contents

    Bludit provides a few predefined variables to help developers:

    $content

    The $content variable is an array with all published pages (it includes pages and sticky, but does not include statics). Each page included in the array is a Page Object.

    The array is ordered by date or by position, and you can change this behavior in the settings of your system.

    Take a look at the code snippets to know how to work with this variable.

    $staticContent

    The $staticContent variable is an array with all the static pages. Each page included in the array is a Page Object.

    The array is ordered by position by design.

    Take a look at the code snippets to know how to work with this variable.

    $page

    The $page variable represents whichever page the user is browsing. The variable is a Page Object.

    For example, if the user is browsing at https://www.example.com/my-dog-rules, the $page variable has the page object for the key, e.g. my-dog-rules.

    $pages

    The $pages variable is a Pages Object. This object is used to manipulate the page database.

    $tags

    The $tags variable is a Tags Object. This object is used to manipulate the tag database.

    $categories

    The $categories variable is a Categories Object. This object is used to manipulate the category database.