「ver4/関数リファレンス/BcBaser contentsName」の版間の差分
提供: baserCMS公式ガイド
Katokaisya (トーク | 投稿記録) |
|||
行18: | 行18: | ||
## 使い方 | ## 使い方 | ||
<syntaxhighlight lang="php"> | <syntaxhighlight lang="php"> | ||
− | $this->BcBaser->contentsName( $detail, [$options] ); | + | <?php $this->BcBaser->contentsName( [$detail], [$options] ); ?> |
</syntaxhighlight> | </syntaxhighlight> | ||
2018年10月18日 (木) 01:13時点における版
[このコンテンツは内容調整中です]
目次
説明
コンテンツを特定する文字列を出力する。
URLを元に、第一階層までの文字列をキャメルケースで出力する。
《利用例》
$this->BcBaser->contentsName()
《出力例》
- トップページの場合 : Home
- about ページの場合 : About
使い方
<?php $this->BcBaser->contentsName( [$detail], [$options] ); ?>
パラメータ
- (bool) $detail
- 詳細モード true にした場合は、ページごとに一意となる文字列をキャメルケースで出力する
- 初期値:false
- (array) $options
- オプション
- ※ オプションの詳細については、BcBaserHelper::getContentsName() を参照
- 初期値:array()
戻り値
なし
用例
基本
コード
<body id="<?php $this->BcBaser->contentsName() ?>">
出力
<body id="Contact">