個人用ツール

関数リファレンス/BcBaser crumbs

提供: baserCMS公式ガイド

2014年11月1日 (土) 23:18時点における133.236.236.176 (トーク)による版

移動: 案内, 検索

説明

この関数は、ナビゲーションとしてよく利用されている「パンくずリスト」を出力する関数です。

テンプレート等で記述することで、baserCMSの規約に沿ったパンくずリストを出力してくれます。

使い方

$this->BcBaser->crumbs( [$separator] , [$startText] )

適切なパンくずリストを出力するには、あらかじめ pre $this->BcBaser->addCrumb() pre 関数で、パンくずの要素を追加しておく必要があります。

パラメータ

$path

$options

戻り値

用例

基本

コード

<?php $this->BcBaser->addCrumb('会社案内','/company/index.html') ?>
<?php $this->BcBaser->addCrumb('沿革') ?>
<?php $this->BcBaser->crumbs('>' , 'ホーム') ?>

出力

 

応用

コード

<?php $this->BcBaser->getImg("/common/img/logo.png", array('alt'=>'この画像の代替テキストです', 'class'=>'testImg', 'width'=>'200px', 'height'=>'160px') ); ?>

出力

ホーム > 会社案内 > 沿革

変更履歴

ソースファイル

関連資料