「ver4/関数リファレンス/BcBaser isCurrentUrl」を編集中
提供: baserCMS公式ガイド
警告: ログインしていません。
編集すると、IPアドレスがこのページの編集履歴に記録されます。この編集を取り消せます。
下記の差分を確認して、本当に取り消していいか検証してください。よろしければ変更を保存して取り消しを完了してください。
最新版 | 編集中の文章 | ||
行3: | 行3: | ||
## 説明 | ## 説明 | ||
指定したURLが現在のURLと同じかどうか判定する。 | 指定したURLが現在のURLと同じかどうか判定する。 | ||
+ | |||
+ | <比較例><br /> | ||
+ | /news/ | /news/ ・・・○<br /> | ||
+ | /news | /news/ ・・・×<br /> | ||
+ | /news/ | /news/index ・・・○<br /> | ||
+ | |||
## 使い方 | ## 使い方 | ||
行35: | 行41: | ||
## 注 | ## 注 | ||
現在のページが'''http://localhost/news/'''の場合、以下の結果となります。 | 現在のページが'''http://localhost/news/'''の場合、以下の結果となります。 | ||
− | + | isCurrentUrl('/news/')・・・true<br> | |
− | isCurrentUrl('/news/') | + | |
isCurrentUrl('/news')・・・false<br> | isCurrentUrl('/news')・・・false<br> | ||
isCurrentUrl('news')・・・false<br> | isCurrentUrl('news')・・・false<br> | ||
− | isCurrentUrl('/news/index') | + | isCurrentUrl('/news/index')・・・true |
行50: | 行55: | ||
## 関連資料 | ## 関連資料 | ||
[[Category:関数リファレンスver4]] | [[Category:関数リファレンスver4]] | ||
− | |||
− | |||
− |