Predefined variables

Contents

    Bludit provides a few predefined variables to help developers.

    $content

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

    The array is ordered by date or by position, 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 variable $staticContent 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 variable $page has the current page if the user is browsing one of them. The variables is a Page Object.

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

    $pages

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

    $tags

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

    $categories

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