zoukankan      html  css  js  c++  java
  • DEDECMS织梦内容页调用seotitle标题的写法

    <span style="font-size:14px;">1
    <title>
    2
    {dede:field name='typeid' runphp='yes'}
    3
    $id=@me;
    4
    global $dsql;
    5
    $sql="select seotitle from dede_arctype where id=$id";
    6
    $row=$dsql->getOne($sql);
    7
    @me=$row["seotitle"];
    8
    {/dede:field}
    9
    </title>
    </span>

    第二种方法,需要修改下include/arc.archives.class.php 这个文件,找到:

    <span style="font-size:14px;">1
    $this->Fields['typename'] = $this->TypeLink->TypeInfos['typename'];
    </span>

    在这段的下面添加:

    <span style="font-size:14px;">1
    $this->Fields['seotitle'] = $this->TypeLink->TypeInfos['seotitle'];
    </span>

    调用方法,直接在内容页中写:{dede:field.seotitle/}

    不想修改文件直接用第一种方法, 喜欢动手的可以采用第二种方法,个人推荐采用第二种方法。

  • 相关阅读:
    R的农场 chebnear
    math
    求平面内最近点对
    字符加密 cipher
    CF448C Painting Fence
    CF264B Good Sequences
    洛谷3166 数三角形
    [NOIP2013] 华容道
    [NOIP2013] 货车运输
    [NOIP2013] 积木大赛
  • 原文地址:https://www.cnblogs.com/zqw111/p/13036480.html
Copyright © 2011-2022 走看看