$lot
Returns the arguments from the layout loader.
Table of Contents
Description
This variable is currently a plain array.
Example
The example below should load .\lot\y\*\nav.php file and add an active property to the $lot variable so that it can be used in the file:
<?= self::nav(['active' => true]); ?>In the .\lot\y\*\nav.php file:
<?php if (!empty($lot['active'])): ?>
<nav>
<ul>
<li> … </li>
<li> … </li>
<li> … </li>
</ul>
</nav>
<?php endif; ?>All property names of the $lot variable that are valid as variable names will also be extracted automatically, and will override any pre-existing variables from $GLOBALS:
<?= self::nav([
'active' => true,
'pages' => Pages::from('.\lot\tag', 'page')
]);In this .\lot\y\*\nav.php file, the $active variable will be available for use and the $pages variable is now a collection of pages sourced from the .\lot\tag folder instead of the .\lot\page folder:
<?php if (!empty($active)): ?>
<nav aria-label="<?= i('Tags'); ?>">
<?php if ($pages->count): ?>
<ul>
<?php foreach ($pages as $page): ?>
<li>
<a href="<?= $page->link; ?>" rel="tag">
<?= $page->title; ?>
</a>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</nav>
<?php endif; ?>$date
Returns the current application date-time with current date-time as the input.
$layout
Returns information about the currently loaded layout file.
$lot
Returns the arguments from the layout loader.
$site
Returns the current application states.
$t
Returns the current application title.
$time
Returns the current application date-time with current date-time as the input.