联系电话:020-28187900

K9博客类网站页面设计--内容页相关博文

发表时间:2012-08-22 阅读: 2903

K9内容页调用相关博文是利用文章的Tag来调用的,通过添加Tag可以调用全站的相关博文,文章页内显示相关博文,还是挺不错的。在内容中依据tags来查询相关博文,效果如如下图

K9内容页调用相关博文

调用标签代码:

<div class="t_1">还有这些可能你也想看看:</div>
<!--/t_1-->                               
<ul class="list_2 mb20">
{@res.join table1='%s_content_tag_bind' field1='tid' table2='%s_content' field2='id,title,url,date' table3='%s_content_tag_bind' field3='id' on='t2.id=t3.id' where="t2.status=1 and t1.id={$info['id']} and t3.tid=t1.tid and t2.id<>{$info['id']}" order='t2.date desc' number='5'}
{#foreach($res as $rs)}
<li><a href="{DIR}{$rs[url]}" title="{$rs[title] code='quote'}">{$rs[title]}</a><span>{$rs[date] date='y-m-d H:i'}</span></li>
{#endforeach}
</ul>
<!--/list_2-->
代码说明可参考《K9调用tag标签全解

转载请注明出处:唯众网络


相关教程 【更多】

唯众网络