「関数リファレンス/BcBaser getContentsTitle」の版間の差分
提供: baserCMS公式ガイド
行6: | 行6: | ||
$this->BcBaser->getContentsTitle() | $this->BcBaser->getContentsTitle() | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
## 戻り値 | ## 戻り値 | ||
(string) | (string) | ||
− | : | + | : コンテンツタイトル |
## 用例 | ## 用例 | ||
行33: | 行15: | ||
####コード | ####コード | ||
<syntaxhighlight lang="php"> | <syntaxhighlight lang="php"> | ||
− | <?php $this->BcBaser-> | + | <?php $this->BcBaser->getContentsTitle(); ?> |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
</syntaxhighlight> | </syntaxhighlight> | ||
####出力 | ####出力 | ||
<syntaxhighlight lang="html5"> | <syntaxhighlight lang="html5"> | ||
− | + | このコンテンツのタイトル | |
</syntaxhighlight> | </syntaxhighlight> | ||
行61: | 行32: | ||
##類似の関数 | ##類似の関数 | ||
− | [ | + | [$this->BcBaser->getTitle()](/関数リファレンス/$this->BcBaser->getTitle()) |
[[Category:関数]] | [[Category:関数]] |
2014年11月2日 (日) 10:31時点における版
説明
$this->BcBaser->getTitle()では、サイト名やカテゴリ名等を含んだタイトルを取得できますが、$this->BcBaser->getContentsTitle()では、純粋にコンテンツページのタイトルのみを取得できます。
使い方
$this->BcBaser->getContentsTitle()
戻り値
- (string)
- コンテンツタイトル
用例
基本
コード
<?php $this->BcBaser->getContentsTitle(); ?>
出力
このコンテンツのタイトル