> <p>全局标记(<strong>请注意,type和sid的引用</strong>)<br> {cms:navlist type=? sid=? postion=? num=10} [navlist:?] {/cms:navlist}</p> <h2 data-line="9"><a id="_9"></a>参数说明:</h2> <table> <thead> <tr> <th>名称</th> <th>参数</th> <th>选项</th> <th>说明</th> <th>事例</th> </tr> </thead> <tbody> <tr> <td>类型</td> <td>type=</td> <td>all,news,product,...</td> <td>对应后台模型,不支持数组</td> <td>{cms:navlist type=news}</td> </tr> <tr> <td>分类</td> <td>sid=</td> <td>数字or数组</td> <td>数字(5)为下级,数组(1,2,5)为当前</td> <td>{cms:navlist sid=5}</td> </tr> <tr> <td>位置</td> <td>postion=</td> <td>menu, top, left,end</td> <td>后台设置位置</td> <td>{cms:navlist postion=top}</td> </tr> <tr> <td>数量</td> <td>num=</td> <td>数字</td> <td>非必要,默认空为10</td> <td>{cms:navlist type=all num=50}</td> </tr> </tbody> </table> <p>前三项参数必选其一</p> <h2 data-line="20"><a id="_20"></a>便签说明:</h2> <table> <thead> <tr> <th>标签</th> <th>说明</th> <th>备注</th> </tr> </thead> <tbody> <tr> <td>[navlist:i]</td> <td>计数</td> <td>(从1开始计数)</td> </tr> <tr> <td>[navlist:j]</td> <td>计数</td> <td>(从0开始计数)</td> </tr> <tr> <td>[navlist:sid]</td> <td>当前分类id</td> <td></td> </tr> <tr> <td>[navlist:tsid]</td> <td>当前分类顶级id</td> <td></td> </tr> <tr> <td>[navlist:psid]</td> <td>当前分类上级id</td> <td></td> </tr> <tr> <td>[navlist:name]</td> <td>栏目名称</td> <td></td> </tr> <tr> <td>[navlist:enname]</td> <td>栏目英文名称</td> <td></td> </tr> <tr> <td>[navlist:link]</td> <td>栏目链接</td> <td></td> </tr> <tr> <td>[navlist:pic]</td> <td>栏目大图</td> <td></td> </tr> <tr> <td>[navlist:ico]</td> <td>栏目小图</td> <td></td> </tr> <tr> <td>[navlist:other1]</td> <td>栏目备用文本</td> <td></td> </tr> <tr> <td>[navlist:other2]</td> <td>栏目备用文本</td> <td></td> </tr> <tr> <td>[navlist:num]</td> <td>下级分类数量</td> <td></td> </tr> <tr> <td>[navlist:target]</td> <td>包含http自动新开窗口</td> <td>输出target="_blank"</td> </tr> </tbody> </table> <h2 data-line="39"><a id="_39"></a>常用演示:</h2> <p>顶级导航调用演示</p> ~~~ {cms:navlist type=all} <li {if:[navlist:sid]= {cms:tsid}} class="on" {end if}><a href="[navlist:link]">[navlist:name]</a></li> {/cms:navlist} ~~~ <p>左侧导航调用演示</p> ~~~ {cms:navlist sid={cms:tsid}} <li {if:[navlist:sid]= {cms:tsid}} class="on" {end if}><a href="[navlist:link]">[navlist:name]</a></li> {/cms:navlist} ~~~ <p>位置标签postion=?</p> ~~~ {cms:navlist postion=top} <li {if:[navlist:sid]= {cms:tsid}} class="on" {end if}><a href="[navlist:link]">[navlist:name]</a></li> {/cms:navlist} ~~~ <p>二级导航事例(顶级菜单常用):</p> ~~~ {cms:navlist type=all num=10} <li><a href="[navlist:link]" {if:[navlist:sid]= {cms:tsid}} class="active" {end if}>[navlist:name]</a> {if:[navlist:num]>0} <ul> {cms:navlist1 sid=[navlist:sid]} <a href="[navlist1:link]">[navlist1:name] </a> {/cms:navlist1} </ul>{end if} </li> {/cms:navlist} ~~~ <p>三级导航事例(左侧菜单常用):</p> ~~~ {cms:navlist sid={cms:tsid} num=50} <li {if:[navlist:sid]= {cms:tsid}} class="active" {end if}> <a href="[navlist:link]">[navlist:name]</a> {if:[navlist:num]>0} <ul> {cms:navlist1 sid=[navlist:sid]} <a href="[navlist1:link]">[navlist1:name] </a> {cms:navlist2 sid=[navlist1:sid]} <a href="[navlist2:link]">[navlist2:name]</a> {/cms:navlist2} {/cms:navlist1} </ul> {end if} </li> {/cms:navlist} ~~~