作者:admin 發布時間:2020-11-23 17:04?
要求實現:dede:channelartlist 高亮顯示
解決方案: 1:修改/include/taglib/channelartlist.lib.php文件。 找到:$pv->Fields['typeurl'] = GetOneTypeUrlA($typeids[$i]); 在此行代碼下方增加以下代碼: if($typeids[$i]['id'] == $refObj->TypeLink->TypeInfos['id']) { $pv->Fields['currentstyle'] = 'class="xzon"'; } else { $pv->Fields['currentstyle'] = ''; } 注意:class="xzon" 這個是你的CSS里要設置的高亮顯示樣式。 2:標簽代碼為: {dede:channelartlist typeid='7'} <a href="{dede:field name='typeurl'/}" {dede:field name='currentstyle'/}>{dede:field name='typename'/}</a> {/dede:channelartlist}
如果高亮對對二級欄目沒起作用可以換個方式
打開include\taglib\channelartlist.lib.php
找到
$pv->Fields['typeurl']=GetOneTypeUrlA($typeids[$i]);
在此行代碼下方增加以下代碼:
if($typeids[$i]['id']==$refObj->TypeLink->TypeInfos['id']||$typeids[$i]['id']==$refObj->TypeLink->TypeInfos['topid']){ $pv->Fields['currentstyle']=$currentstyle?$currentstyle:'current'; } else{ $pv->Fields['currentstyle']=''; }
網上找到的一般沒有加$typeids[$i]['id'] ==$refObj->TypeLink->TypeInfos['topid']
添加這個后才能對二級欄目也起作用
調用方法:
{dede:channelartlisttypeid='2'currentstyle='current'} <liclass='{dede:field.currentstyle/}'><ahref='{dede:fieldname='typeurl'/}'>{dede:fieldname='typename'/}</a></li> 。。。 {/dede:channelartlist}
如果是當前欄目則 li的class屬性顯示current,否則顯示class='' ,也可以修改currentstyle='這里改為你需要的類名'。
本文關鍵詞:
相關關鍵詞:排名上不去??標題優化技巧??app推廣??小程序作用??seo流量提升??網站快排??網絡推廣??老域名作用??抖音推廣??用戶需求分析??移動端優化??seo賺錢??關鍵詞挖掘??網絡外包??小程序怎么賺錢??如何推廣小程序??制作小程序??小程序前景??餐飲小程序??招生小程序??
要求實現:dede:channelartlist 高亮顯示 解決方案:1:修改/include/taglib/channelartli
ul{dede:channelrow=6typeid=}[field:globalname=autoindexrunphp=yes]((@me+1)%2==0)[email protected]=liclass=\last\:@
修改簡略標題字符長度的解決辦法在你的服務器或者虛擬空間管理頁面用phpmy
方法1: 打開include/taglib/type.lib.php。 找到里面的SQL語句,原來sql檢索的字段中沒
兩步搞定dedecmsv5.7版本的tag標簽限制12字節,dedecms5.7版本和以往的版本不一樣,
本文介紹了dedecms中修改標題與簡略標題長度的方法,進入dedecms后臺,系統——
代碼如下: spanstyle=font-family:tahoma,geneva,sans-serif;spanstyle=font-size:14px;{dede:arclist
spanstyle=font-size:14px;spanstyle=font-family:tahoma,geneva,sans-serif;{dede:arclistflag=f,jrow=2typ
我們在進行織夢dedecms模板設計的時候,想實現tag的鏈接和tag名的同時,還能顯