Template Tags
Namespace
Define the template namespace at the top:
<?php namespace Redaxscript\Template; ?>
Partial
Include a single or multiple PHTML
partials:
<?php echo Tag::partial(string|array $file); ?>
Base
Create a <base>
tag inside your <head>
tag:
<?php echo Tag::base(); ?>
Title
Create a <title>
tag inside your <head>
tag:
<?php echo Tag::title(string $text); ?>
Meta
Create a <meta>
tag inside your <head>
tag:
<?php echo Tag::meta(); ?>
Link
Create a <link>
tag inside your <head>
tag:
<?php echo Tag::link(); ?>
Style
Create a <style>
tag inside your <head>
tag:
<?php echo Tag::style(); ?>
Script
Create a <script>
tag inside your <head>
tag:
<?php echo Tag::script(); ?>
Breadcrumb
Display the breadcrumb:
<?php echo Tag::breadcrumb(array $optionArray); ?>
Default $optionArray
values:
[ 'className' => [ 'list' => 'rs-list-breadcrumb', 'divider' => 'rs-item-divider' ], 'divider' => null ]
Content
Display the contents from the router:
<?php echo Tag::content(); ?>
Article
Display the articles:
<?php echo Tag::article(int $categoryId, int $articleId, array $optionArray); ?>
Default $optionArray
values:
[ 'tag' => [ 'title' => 'h2', 'box' => 'div' ], 'className' => [ 'title' => 'rs-title-content', 'box' => 'rs-box-content' ], 'orderColumn' => 'rank', 'partial' => [ 'error' => 'error.phtml' ] ]
Comment
Display the comments:
<?php echo Tag::comment(int $articleId, array $optionArray); ?>
Default $optionArray
values:
[ 'tag' => [ 'title' => 'h3', 'box' => 'blockquote' ], 'className' => [ 'title' => 'rs-title-comment', 'box' => 'rs-quote-default' ], 'orderColumn' => 'rank' ]
Extra
Display the extras:
<?php echo Tag::extra(int $extraId, array $optionArray); ?>
Default $optionArray
values:
[ 'tag' => [ 'title' => 'h3', 'box' => 'div' ], 'className' => [ 'title' => 'rs-title-extra', 'box' => 'rs-box-extra' ], 'orderColumn' => 'rank' ]
Pagination
Display the pagination:
<?php echo Tag::pagination(string $type, int $parentId, array $optionArray); ?>
Default $optionArray
values:
[ 'className' => [ 'list' => 'rs-list-pagination', 'item' => [ 'first' => 'rs-item-first', 'previous' => 'rs-item-previous', 'next' => 'rs-item-next', 'last' => 'rs-item-last', 'number' => 'rs-item-number', 'active' => 'rs-item-active' ] ] ]
Navigation
Display the navigation:
<?php echo Tag::navigation(string $type, array $optionArray); ?>
Default $optionArray
values:
[ 'className' => [ 'list' => 'rs-list-{type}', 'active' => 'rs-item-active' ], 'orderColumn' => 'rank' ]
Comment form
Display the comment form:
<?php echo Tag::commentForm(int $articleId); ?>
Search form
Display the search form:
<?php echo Tag::searchForm(string $table); ?>Edit on GitHub