個人用ツール

関数リファレンス/BcBaser isCurrentUrl

提供: baserCMS公式ガイド

2015年5月11日 (月) 13:08時点におけるHanhunhun (トーク | 投稿記録)による版

移動: 案内, 検索

説明

指定したURLが現在のURLと同じかどうか判定する。

<比較例>
/news/ | /news/ ・・・○
/news | /news/ ・・・×
/news/ | /news/index ・・・○

使い方

$this->BcBaser->isCurrentUrl($url)

パラメータ

(string) $url
比較対象URL

戻り値

(boolean) 同じ場合には true を返す

用例

基本

コード

<?php $this->BcBaser->isCurrentUrl('/news/') ?>

応用

コード

 

出力

変更履歴

ソースファイル

関連資料