[织梦教程] 网站建设中用织梦做网站如何使arc支持也支持current

[复制链接]
查看1998 | 回复7 | 2020-9-20 16:56:03 | 显示全部楼层 |阅读模式

     目前,网站建设行业中,用织梦做网站的人也越来越多。当中可能会遇到很多问题。今天说一下

     当网站建设类似于关于我们多篇文章时,需要高亮功能的话如何实现。

$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
           );
其实就是在调用函数的最后加了一个$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='')
其实就是在函数后面加了一个$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);
                }
保存,即可。
调用方法:
{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}

    从0基础开始学习织梦dedecms建站,分享全套的织梦dedecms网站搭建教程、织梦安装使用教程。 汇聚了最全、最新的织梦cms建站教程。包含dedecms建站、仿站教程;dedecms系统使用常见问题;主题插件推荐下载等!欢迎学习!
    回复

    使用道具 举报

    李中文1 | 2021-3-23 07:35:25 | 显示全部楼层
    厉害了悟空源码,这么多资源
    回复

    使用道具 举报

    愿为素心人 | 2021-7-12 11:07:01 | 显示全部楼层
    悟空源码太厉害,资源真多!
    回复

    使用道具 举报

    叶小琛小m | 2022-2-3 20:11:11 | 显示全部楼层
    我是来白嫖悟空源码的积分的!!!!!
    回复

    使用道具 举报

    计儿坏 | 2022-6-1 09:33:42 | 显示全部楼层
    厉害了,悟空源码资源多教程多!
    回复

    使用道具 举报

    甜如蜜forever | 2022-7-8 00:55:58 | 显示全部楼层
    6666悟空源码资源多!
    回复

    使用道具 举报

    压后牙 | 2023-4-15 01:29:32 | 显示全部楼层
    找了好多地方,终于找到了
    回复

    使用道具 举报

    凌8乱 | 2023-10-10 05:09:14 | 显示全部楼层
    悟空源码资源不错。粉了
    回复

    使用道具 举报

    自在山高 | 2023-11-11 06:47:37 | 显示全部楼层
    有情怀的站啊,爱了
    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则