Mecha CMS

Mecha CMS blog and documentation.

Shortcut Variables

Updated: Sunday, 07 August 2016

The available shortcut variables for shield.

These shortcut variables will be available in the shield item.

Configuration Item

This is equal to Config::get('my_var').

echo $config->my_var;

Language Part

This is equal to Config::speak('my_var').

echo $speak->my_var;

Check for Accepted Pilot

This is equal to Guardian::happy().

if($manager) {
    echo 'You are logged in.';
}

Page

echo $page->title;

Article

echo $article->title;

Pages

foreach($pages as $page) {
    echo '<div>' . $page->title . '</div>';
}

Articles

foreach($articles as $article) {
    echo '<div>' . $article->title . '</div>';
}

Pagination

echo $pager->prev->anchor;
echo $pager->next->anchor;
echo $pager->step->html;

Token

This is equal to Guardian::token().

<input name="token" type="hidden" value="<?php echo $token; ?>">

Notification Messages

This is equal to Notify::read().

echo $messages;
Donation and Email Subscription