「関数リファレンス/BcBaser css」の版間の差分
提供: baserCMS公式ガイド
行4: | 行4: | ||
## 使い方 | ## 使い方 | ||
<syntaxhighlight lang="php"> | <syntaxhighlight lang="php"> | ||
− | $this->BcBaser->css( $path , [$option] ); | + | <?php $this->BcBaser->css( $path , [$option] ); ?> |
</syntaxhighlight> | </syntaxhighlight> | ||
行24: | 行24: | ||
## 戻り値 | ## 戻り値 | ||
− | + | なし | |
## 用例 | ## 用例 | ||
行30: | 行30: | ||
####コード | ####コード | ||
<syntaxhighlight lang="php"> | <syntaxhighlight lang="php"> | ||
− | $this->BcBaser->css('admin/import', array('rel'=>'stylesheet')); | + | <?php $this->BcBaser->css('admin/import', array('rel'=>'stylesheet')); ?> |
</syntaxhighlight> | </syntaxhighlight> | ||
2015年4月22日 (水) 16:38時点における版
目次
説明
CSS タグを出力する。
使い方
<?php $this->BcBaser->css( $path , [$option] ); ?>
パラメータ
- (文字列)$path
- CSSファイルまでのパス。
先頭にスラッシュをつけた場合は、/app/webroot/ からのパスとなる。スラッシュをつけず相対パスとした場合は、/app/webroot/css/ からのパスとなる。
テーマを使用している場合は、/app/webroot/themed/{テーマ名}/cssからのパスとなる。拡張子は不要。 - (配列)$option
- 初期値:array()
rel
: rel属性(初期値 : 'stylesheet')
inline
: コンテンツ内にCSSを出力するかどうか(初期値 : true)
例:array('rel'=>'stylesheet')
例:array('inline' => 'false')
戻り値
なし
用例
基本
コード
<?php $this->BcBaser->css('admin/import', array('rel'=>'stylesheet')); ?>