name:前臺調用的字段的變量
firsttext:位置第一個顯示文字
firstclass:位置第一個class名
firsturl:位置第一個url鏈接
activeclass:當前位置class名
num:在第一個位置后面顯示幾個位置
#### 1.顯示完整位置
\<!-- 面包削導航 -->
<div class="mod-path row">
<column:location name="location" firsttext="首頁" firstclass="parent" activeclass="now">
<a href="{$location.url}" class="{$activeclass}">{$location.title}</a>
</column:location>
</div>
\<!-- 面包削導航 -->
<div class="mod-path row">
<column:location name="location" firsttext="首頁" firstclass="parent" activeclass="now">
<a href="{$location.url}" class="{$activeclass}">{$location.title}</a>
</column:location>
</div>
2\.顯示部分位置以及在各個位置間加入間隔符
\<!-- 面包削導航 -->
<div class="frame-path min-box">
<column:location name="location" firsttext="首頁" firstclass="parent home" activeclass="now" nu m="1">
<a href="{$location.url}" class="{$activeclass}">{$location.title}</a>
<if condition="$i lt count($ LOCATION )"> >
</if>
</column:location>
</div>
\<!-- 面包削導航 -->
<div class="frame-path min-box">
<column:location name="location" firsttext="首頁" firstclass="parent home" activeclass="now" nu m="1">
<a href="{$location.url}" class="{$activeclass}">{$location.title}</a>
<if condition="$i lt count($ LOCATION )"> >
</if>
</column:location>
</div>
3\.第一個位置跳轉到指定URL而不是網站首頁實例:
\<!-- 當前位置 -->
<div class="location-nav">
<div class="location-nav-con">
<a href="javascript:void(0)">當前位置:</a>
<column:location name="location" firsttext="專題首頁" firsturl="/name-sfx" num="1" >
<a href="{$location.url}">{$location.title}</a>
<if condition="$i lt count($ LOCATION )">
<span>></span>
</if>
</column:location>
</div>
</div>
\<!-- 當前位置 -->
<div class="location-nav">
<div class="location-nav-con">
<a href="javascript:void(0)">當前位置:</a>
<column:location name="location" firsttext="專題首頁" firsturl="/name-sfx" num="1" >
<a href="{$location.url}">{$location.title}</a>
<if condition="$i lt count($ LOCATION )">
<span>></span>
</if>
</column:location>
</div>
</div>
- ThinkPHP模板
- 變量輸出
- 系統變量
- 系統變量輸出
- 常量輸出
- 配置輸出
- 語言變量
- 使用函數
- 默認值輸出
- 使用運算符
- 標簽庫
- 導入標簽庫
- 內置標簽
- 標簽庫預加載
- 模板繼承
- 修改定界符
- 普通標簽
- XML標簽
- 三元運算符
- 包含文件
- 使用模版表達式
- 使用模版文件
- 傳入參數
- 內置標簽
- Volist標簽
- Foreach標簽
- For標簽
- Switch標簽
- 比較標簽
- 范圍判斷標簽
- IN和NOTIN
- BETWEEN 和 NOTBETWEEN
- RANGE
- IF標簽
- Present標簽
- Empty標簽
- Defined標簽
- Assign標簽
- Define標簽
- 標簽嵌套
- import標簽
- 使用PHP代碼
- 使用php標簽
- 使用原生php代碼
- 原樣輸出
- 模板注釋
- 單行注釋
- 多行注釋
- 模板布局
- 第一種方式:全局配置方式
- 第二種方式:模板標簽方式
- 第三種方式:使用layout控制模板布局
- 模板替換
- 調用導航
- 調用欄目信息
- 根據欄目Id獲取欄目信息
- 首頁&封面調用信息列表
- 調用新聞列表
- 當前位置
- 當前位置
- 列表頁分頁
- 熱門信息
- 獲取熱門信息
- 上一篇&下一篇
- YNCMS函數
- YNCMS插件開發
- 開始開發