织梦arclist及list调用文章tag
作者: 本站原创 发布时间: 浏览: 次
织梦列表页及自由列表调用TAG代码写法,麦站分享下。
TAG标签:
[field:id runphp=yes] global $dsql; $tags = ''; $query = "SELECT tag FROM `xiuzhanwang_taglist` WHERE aid='@me' "; $dsql->Execute('tag',$query); while($row = $dsql->GetArray('tag')) { $tags .= "<a href='/tags.php?/".urlencode($row['tag'])."/'>".$row['tag']."</a> "; } @me=$tags; [/field:id] |
织梦文章页tag标签调用:
{dede:arclist titlelen='35' row='8' typeid='栏目id'} <div class="tag"> [field:id runphp=yes] global $dsql; $tags = ''; $query = "SELECT tag FROM `xiuzhanwang_taglist` WHERE aid='@me' "; $dsql->Execute('tag',$query); while($row = $dsql->GetArray('tag')) { $tags .= "<a href='/tags.php?/".urlencode($row['tag'])."/'>".$row['tag']."</a> "; } @me=$tags; [/field:id] </div> {/dede:arclist} |
织梦dede:list 调用TAG:
{dede:list pagesize='15'} <dl> <a href="[field:arcurl/]" title="[field:title /]"><img src="[field:litpic/]" alt="[field:title /]"/></a> <a href="[field:arcurl/]" title="[field:title /]">[field:title /]</a> <div class="tag"> [field:id runphp=yes] global $dsql; $tags = ''; $query = "SELECT tag FROM `xiuzhanwang_taglist` WHERE aid='@me' "; $dsql->Execute('tag',$query); while($row = $dsql->GetArray('tag')) { $tags .= "<a href='/tags.php?/".urlencode($row['tag'])."/'>".$row['tag']."</a> "; } @me=$tags; [/field:id] </div> </dl> {/dede:list} |
大功告成。
实现效果展示:
上一篇:安装织梦的时候显示dir解决方案