LoginSignup
0
1

More than 5 years have passed since last update.

concrete5で使えるタグ

Last updated at Posted at 2017-07-02

今回使用した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 日本語公式サイト

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1