個人用ツール

ver4/関数リファレンス/BcBaser getThemeUrl

提供: baserCMS公式ガイド

移動: 案内, 検索

[このコンテンツは内容調整中です]

説明

現在のテーマのURLを取得する。

使い方

<?php $this->BcBaser->getThemeUrl(); ?>

戻り値

(string)
テーマURL

用例

基本

現在のテーマのURLを取得し、echoで出力する。

コード

<?php echo $this->BcBaser->getThemeUrl(); ?>

出力

/theme/bc_sample/

応用

現在のテーマのURLを取得し、imgパスに利用する。

コード

<img src="<?php echo $this->BcBaser->getThemeUrl() ?>img/logo.png">

出力

<img src="/theme/bc_sample/img/logo.png">

類似の関数

  • themeUrl - テーマのURLを出力する