• 網站(zhàn)建設中用織夢做網站(zhàn)如(rú)何使arc支持也支持current

     耀揚軟件(jiàn)   原創   2022-06-15

    目前,網站(zhàn)建設行業中,用織夢做網站(zhàn)的人(rén)也越來越多。當中可(kě)能會遇到很多問題。今天說一下

         當網站(zhàn)建設類似于關于我們多篇文章(zhāng)時,需要高亮功能的話如(rú)何實現。

    $channelid = $ctag->GetAtt('channelid');

    在下面插入:
    $currentstyle = $ctag->GetAtt('currentstyle');
    2、查找:
    return lib_arclistDone
               (
                 $refObj, $ctag, $typeid, $ctag->GetAtt('row'), $ctag->GetAtt('col'), $titlelen, $infolen,
                 $ctag->GetAtt('imgwidth'), $ctag->GetAtt('imgheight'), $listtype, $orderby,
                 $ctag->GetAtt('keyword'), $innertext, $envs['aid'], $ctag->GetAtt('idlist'), $channelid,
                 $ctag->GetAtt('limit'), $flag,$ctag->GetAtt('orderway'), $ctag->GetAtt('subday'), $ctag->GetAtt('noflag'),
                 $tagid,$pagesize,$isweight
               );


    替換爲:
    return lib_arclistDone
               (
                 $refObj, $ctag, $typeid, $ctag->GetAtt('row'), $ctag->GetAtt('col'), $titlelen, $infolen,
                 $ctag->GetAtt('imgwidth'), $ctag->GetAtt('imgheight'), $listtype, $orderby,
                 $ctag->GetAtt('keyword'), $innertext, $envs['aid'], $ctag->GetAtt('idlist'), $channelid,
                 $ctag->GetAtt('limit'), $flag,$ctag->GetAtt('orderway'), $ctag->GetAtt('subday'), $ctag->GetAtt('noflag'),
                 $tagid,$pagesize,$isweight,$currentstyle
               );
    其實就(jiù)是在調用函數的後加了一個$currentstyle實參
    3、查找
    function lib_arclistDone(&$refObj, &$ctag, $typeid=0, $row=10, $col=1, $titlelen=30, $infolen=160,
            $imgwidth=120, $imgheight=90, $listtype='all', $orderby='default', $keyword='',
            $innertext='', $arcid=0, $idlist='', $channelid=0, $limit='', $att='', $order='desc', $subday=0, $noflag='',$tagid='', $pagesize=0, $isweight='N')
    替換爲:
    function lib_arclistDone(&$refObj, &$ctag, $typeid=0, $row=10, $col=1, $titlelen=30, $infolen=160,
            $imgwidth=120, $imgheight=90, $listtype='all', $orderby='default', $keyword='',
           $innertext='', $arcid=0, $idlist='', $channelid=0, $limit='', $att='',$order='desc', $subday=0, $noflag='',$tagid='', $pagesize=0,$isweight='N',$currentstyle='')
    其實就(jiù)是在函數後面加了一個$currentstyle=''形參
    4、查找
    $row['textlink'] = "".$row['title']."";
    在下面插入:
    if($currentstyle && $row['id']==$arcid){
                        $currentstyle = str_replace('~typelink~', $row['filename'], $currentstyle);
                        $row['currentstyle'] = str_replace('~typename~', $row['title'], $currentstyle);
                    }
    保存,即可(kě)。
    調用方法:
    {dede:arclist titlelen='42' row='10' currentstyle="

    • ~typename~
    • "}
           [field:array runphp='yes']
               if(@me['currentstyle']){
                   @me = @me['currentstyle'];
               }else{
                   @me = "
      • {@me['title']}
      • ";
                 }
             [/field:array]
        {/dede:arclist}

    上一篇:暫無

    下一篇:dede網站(zhàn)安全設置

      • 公司曆程

        10+

        • 來自(zì)各領域的合作(zuò)客戶

          200+

          • 覆蓋50+行業

            50+

            • 軟件(jiàn)著作(zuò)權

              2+