baserCMSのdescriptionが出ない!
baserCMSのDescriptionが出なくなりました。

これがどういう意味かと言いますと、Ver 4.1.5からシステム管理のサイト基本説明文(上記)を入力しても
<?php $this->BcBaser->metaDescription(); ?>
に反映されません。つまりサイトのDescriptionが出力されなくなりました。
ならどうやって出力するかと言いますと。
各ページのオプションにある説明文に入力することで出力できるます。

対応策
今まで通り、システム管理の基本説明文をそのまま出したい場合、libディレクトリのファイルを直接編集する必要があります。
「/lib/Baser/View/Helper/BcBaserHelper.php」
上記ファイルを編集して
【編集前】
/** * meta タグ用のページ説明文を取得する * * @return string meta タグ用の説明文 */
public function getDescription() {
$description = $this->_View->get(‘description’);
if (!empty($description)) {
return $description;
}
if (!empty($this->request->params[‘Content’][‘site_root’])) {
if (!empty($this->request->params[‘Site’][‘description’])) {
return $this->request->params[‘Site’][‘description’];
}
if (!empty($this->siteConfig[‘description’])) {
return $this->siteConfig[‘description’];
}
}
return ”;
}
【編集後】
/** * meta タグ用のページ説明文を取得する * * @return string meta タグ用の説明文 */
public function getDescription() {
$description = $this->_View->get(‘description’);
if (!empty($description)) {
return $description;
}
if (!empty($this->request->params[‘Site’][‘description’])) {
return $this->request->params[‘Site’][‘description’];
}
if (!empty($this->siteConfig[‘description’])) {
return $this->siteConfig[‘description’];
}
return ”;
}
「 if (!empty($this->request->params[‘Content’][‘site_root’])) {」
のIF文を削除することで元々の仕様で出力可能です。
ディスカッション
コメント一覧
まだ、コメントがありません