Predefined variables
Koblog provides a few predefined variables to help developers:
$content and $staticContent
Those two content are array giving you all the relevant pages of a context. Each page included in the array is a Page Object.
- The
$contentvariable contain all the published pages (it includespublishedpages andsticky, but does not includestatics). They're context-relevant, which mean in a tag, you'll just have the list of pages relevant to that tag, for instance. They're also paginated. The array is ordered bydateor byposition, and you can change this behavior in the settings of your system. - The
$staticContentvariable is an array with all thestaticpages. The array is ordered bypositionby design.
Take a look at the code snippets to know how to work with these variables.
- https://docs.koblog.org/dev-snippets/content-pages
- https://docs.koblog.org/dev-snippets/content-static
$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.
Databases variables
- The
$pagesvariable is a Pages Object. This object is used to manipulate the page database. - The
$tagsvariable is a Tags Object. This object is used to manipulate the tag database. - The
$categoriesvariable is a Categories Object. This object is used to manipulate the category database. - The
$archivesvariable is a Archives Object. This object is used to manipulate the archive database (article by years or month) - The
$authorsvariable is a Authors Object. This object is used to manipulate the authors database (taxonomy based on which account wrote the article) - The
$kindsvariable is a Kinds Object. This object is used to manipulate the post kinds database. - The
$mediasvariable is a Kinds Object. This object is used to manipulate the global media database. - The
$emojisvariable is a Emojis Object. This object is used to manipulate the emojis database (taxonomy based on which account wrote the article)