destoon實現(xiàn)調(diào)用當前欄目分類及子分類和三級分類的方法
調(diào)用當前欄目分類及子分類和三級分類是程序設(shè)計里常用的方法,本文就來詳細講述destoon實現(xiàn)調(diào)用當前欄目分類及子分類和三級分類的方法。具體操作如下:
在destoon中提供了如下的調(diào)用語句:
一級分類名:
{$m[catname]}
二級分類名:
{$c[catname]}
三級分類名:
{$b[catname]}
具體調(diào)用示例如下:
一、直接調(diào)用分類名稱和鏈接:
{loop $maincat $i $m}<dl> {php $child = get_maincat($maincat, $CATEGORY, 1);} <dt><a href="{$MOD[linkurl]}{$m[linkurl]}" rel="external nofollow" rel="external nofollow" >{$m[catname]}</a></dt> {php $childs = get_maincat($m[catid], $CATEGORY, 1);} {loop $childs $i $c}<dd><a href="{$MOD[linkurl]}{$c[linkurl]}" rel="external nofollow" rel="external nofollow" rel="external nofollow" >{$c[catname]}</a></dd>{/loop} </dl>{/loop}
二、調(diào)用分類名和其下最新文章:
{loop $maincat $i $m} {php $child = get_maincat($maincat, $CATEGORY, 1);} <div class="hq01"> <div class="hq-tt"> <p><h4>{$m[catname]}</h4> {php $a = get_maincat($m[catid], $CATEGORY, 1);} {loop $a $g} {php $f = get_maincat($g[catid], $CATEGORY, 1);} {loop $f $i $b} <span><a href="{$MOD[linkurl]}{$c[linkurl]}" rel="external nofollow" rel="external nofollow" rel="external nofollow" >{$b[catname]}</a></span> {/loop} {/loop} <span class="hqmore"><a href="{$MOD[linkurl]}{$m[linkurl]}" rel="external nofollow" rel="external nofollow" >[更多]</a></span> </p> </div> <div class="clear"></div> {php $childs = get_maincat($m[catid], $CATEGORY, 1);} {loop $childs $i $c} <div class="hq-cc"> <!--{php $tags=tag("moduleid=$moduleid&condition=status=3&areaid=$cityid&length=40&catid=".$c[catid]."&order=".$MOD[order]."&pagesize=5&datetype=2&target=_blank&template=null")}--> <ul> <li class="li-t"><span><a href="{$MOD[linkurl]}{$c[linkurl]}" rel="external nofollow" rel="external nofollow" rel="external nofollow" >---更多</a></span>{$c[catname]}</li> {loop $tags $t} <li><!-- <span class="f_r">{date('Y-m-d', $t[addtime])} </span> --> <a href="{$t[linkurl]}" rel="external nofollow" {if $target} target="{$target}"{/if}>{$t[title]}</a> </li> {/loop} </ul> </div> {/loop} <div class="clear"></div> </div> <div class="clear"></div> {/loop}
希望本文所述方法對大家destoon開發(fā)有所幫助。
- destoon供應信息title調(diào)用出公司名稱的方法
- destoon實現(xiàn)不同會員組公司名稱顯示不同的顏色的方法
- destoon文章模塊調(diào)用企業(yè)會員資料的方法
- destoon實現(xiàn)會員商鋪中指定會員或會員組投放廣告的方法
- destoon實現(xiàn)調(diào)用圖文新聞的方法
- destoon切換城市后實現(xiàn)logo旁邊顯示地區(qū)名稱的方法
- 去掉destoon資訊內(nèi)容頁keywords關(guān)鍵字自帶的文章標題的方法
- destoon調(diào)用discuz論壇中帶圖片帖子的實現(xiàn)方法
- destoon調(diào)用企業(yè)會員公司形象圖片的實現(xiàn)方法
- destoon實現(xiàn)VIP排名一直在前面排序的方法
- 修改destoon會員公司的偽靜態(tài)中的com目錄的方法
- destoon出現(xiàn)驗證碼不顯示時的緊急處理方法
相關(guān)文章
WordPress免插件實現(xiàn)面包屑導航的示例代碼
這篇文章主要介紹了WordPress免插件實現(xiàn)面包屑導航,本文通過實例代碼給大家介紹的非常詳細,對大家的學習或工作具有一定的參考借鑒價值,需要的朋友可以參考下2020-08-08使用php+swoole對client數(shù)據(jù)實時更新(一)
這篇文章主要介紹了使用php+swoole對client數(shù)據(jù)實時更新(一) 的相關(guān)資料,需要的朋友可以參考下2016-01-01Dwz與thinkphp整合下的數(shù)據(jù)導出到Excel實例
這篇文章主要介紹了Dwz與thinkphp整合下的數(shù)據(jù)導出到Excel的方法,是結(jié)合jQuery與ThinkPHP框架實現(xiàn)的導出Excel技巧,非常具有實用價值,需要的朋友可以參考下2014-12-12