Mecha CMS

Mecha CMS blog and documentation.

Category Plugin

Updated: Sunday, 07 August 2016

Category feature.

Categories are similar with tags. The only difference is that you can only determine one category per article.

Page Types

  • category → for category page
if($config->page_type === 'category') {
    echo 'You are in the category page.';
}

Methods

Get Categories

Get::categories($order = 'ASC', $sorter = 'name');

Get Category

Return specific category item filtered by its available data.

Get::category($filter, $output = null, $fallback = false);

Widgets

Category

echo Widget::category();
echo Widget::category('LIST');
echo Widget::category('CLOUD');
echo Widget::category('DROPDOWN');
echo Shield::chunk('block.widget', array(
    'title' => $speak->widget->categories,
    'content' => Widget::category()
));

Get more information about widgets parameter in the widget reference.

Download Latest Version

Donation and Email Subscription