織夢Dedecms聯動方式二級變一級的方法_DedeCms教程
教程Tag:暫無Tag,歡迎添加,賺取U幣!
以下代碼都注掉
- /*
- $sontype = ( ($househx % 500 != 0) ? $househx : 0 );
- $toptype = ( ($househx % 500 == 0) ? $househx : ( $househx-($membertype%500) ) );
- $fields['househx'] = "<a href=’{$baseurl}plus/list.php?channelid={$channelid}&tid={$typeid}&househx={$toptype}&nativeplace={$nativeplace}’><b>{$em_househxs[$toptype]}</b></a> ";
下級顯示不顯示
- foreach($em_househxs as $eid=>$em)
- {
- if($eid < $toptype+1 || $eid > $toptype+499) continue;
- if($eid == $househx) {
- $fields['househx'] .= " <b>{$em}</b>";
- }
- else {
- $fields['househx'] .= " <a href=’{$baseurl}plus/list.php?channelid={$channelid}&tid={$typeid}&househx={$eid}&nativeplace={$nativeplace}’>{$em}</a>";
- }
- }
- */
換成
- foreach($em_househxs as $eid=>$em)
- {
- if($eid % 500 != 0) continue;
- if(isset($_GET['househx']))
- {
- $navclass=$_GET['househx'];
- if ($navclass==$eid)
- {
- $navclass=’ style=color:#ff0000′;
- }
- $fields['househx'] .= " <a href=’{$baseurl}plus/list.php?channelid={$channelid}&tid={$typeid}&househx={$eid}&nativeplace={$nativeplace}’".$navclass.">{$em}</a>";
- }
- }
僅供大家學習參考,希望對大家有幫助
相關DedeCms教程:
- 織夢Cms防黑客攻擊必須要做的幾件事!
- 織夢DedeCMS模板及系統程序編碼轉換的方法
- 織夢dedecms如何讓內容頁顯示不同的內容,但是每次更新都不變
- 織夢DedeCMS網站服務器搬家詳細教程
- 織夢dedecms列表頁標題顯示分頁的頁數,有利于seo優化
- Dedecms列表頁標簽list/pagelist使用方法及pagelist的樣式
- 織夢DedeCMS如何讓文章列表實現“隔行換色”
- 修改織夢dedecms的Artlist標簽去掉table
- DEDECMS打開網站后臺系統首頁卡解決方法
- 織夢DEDECMS網站內容頁、欄目頁獲取當前頂級欄目名稱標簽
- Dedecms實現鍵盤方向鍵翻頁效果教程
- DEDECMS附件按月保存,修改DEDE附件不按天保存