今回使用したconcrete5のバージョン
- 5.7x系
分岐タグ
ログイン状態の分岐
<?php
$u = new User();
if($u->isRegistered()) { ?>
ログインしている場合表示されます
<?php } ?>
編集モードの時に表示
<?php
if($c->isEditMode()) { ?>
編集モードの時に表示されます
<?php } ?>
表示タグ
ページ名を取得
<?php print $c->getCollectionName(); ?>
ページの説明を取得
<?php print $c->getCollectionName(); ?>
ページの作成日時を取得
<?php print $c->getCollectionDateAdded(); ?>
出力例:
2017-06-26 14:57:53
ページの公開日時を取得
<?php print $c-> getCollectionDatePublic(); ?>
カスタム属性
タグを取得
<?php
$tags = $c->getAttribute('tags');
print($tags);
?>
参照
Getting Data about a Page
ページのデータを取得する :: concrete5 Japan 日本語公式サイト