织梦(dedecms)仿站课程第十三讲—特定栏目调用

fieldset{padding:10px;}

织梦(dedecms)仿站教程第十三讲—特定栏目调用今天这一讲,我们要讲一下特定栏目的调用,我们打开index.htm文档,往下看代码:

    <DIV class=title2><H3>拳击视频</H3><DIV class=more><A href="http://www.quanji.cn/movie"><IMG src="{dede:global.cfg_templets_skin/}/images/more.gif"></A></DIV></DIV><DIV class=left_a><UL> <LI><A title="阿米尔.卡汗 VS 朱达(尤达赫)(2011-07-24)" href="http://www.quanji.cn/movie/1/575.html" target=_blank>阿米尔.卡汗 VS 朱达(尤达赫)(2011</A> <LI><A title="小克里琴科 VS 海耶(2011-07-03)" href="http://www.quanji.cn/movie/1/615.html" target=_blank>小克里琴科 VS 海耶(2011-07-03)</A> <LI><A title="帕本 VS 卡斯特罗(2011-06-25)" href="http://www.quanji.cn/movie/1/638.html" target=_blank>帕本 VS 卡斯特罗(2011-06-25)</A> <LI><A title="科克兰德 VS 沙普(2011-06-25)" href="http://www.quanji.cn/movie/1/637.html" target=_blank>科克兰德 VS 沙普(2011-06-25)</A> <LI><A title="米汉 VS 克比(2011-06-24)" href="http://www.quanji.cn/movie/1/636.html" target=_blank>米汉 VS 克比(2011-06-24)</A> <LI><A title="瓦拉德兹 VS 弗洛雷斯(2011-06-24)" href="http://www.quanji.cn/movie/1/635.html" target=_blank>瓦拉德兹 VS 弗洛雷斯(2011-06-24)</A> <LI><A title="卡瓦纳 VS 维洛比(2011-06-24)" href="http://www.quanji.cn/movie/1/634.html" target=_blank>卡瓦纳 VS 维洛比(2011-06-24)</A> <LI><A title="霍诺里奥 VS 佩雷兹(2011-06-19)" href="http://www.quanji.cn/movie/1/633.html" target=_blank>霍诺里奥 VS 佩雷兹(2011-06-19)</A> <LI><A title="穆雷 VS 布莱克维尔(2011-06-19)" href="http://www.quanji.cn/movie/1/631.html" target=_blank>穆雷 VS 布莱克维尔(2011-06-19)</A> <LI><A title="克罗拉 VS 德.卢卡(2011-06-19)" href="http://www.quanji.cn/movie/1/630.html" target=_blank>克罗拉 VS 德.卢卡(2011-06-19)</A></LI></UL></DIV>

修改为织梦调用特定栏目内容的代码:

    <DIV class=title2>{dede:type typeid=’1′}<H3>[field:typename /]</H3>{/dede:type} <DIV class=more><A href="{dede:type typeid=’1′}[field:typelink /]{/dede:type}"><IMG src="{dede:global.cfg_templets_skin/}/images/more.gif"></A></DIV></DIV><DIV class=left_a><UL>{dede:arclisttypeid=’1′ row=’10’ titlelen=’30’} <LI><A title="[field:title/]" href="[field:arcurl/]" target=_blank>[field:title/]</A>{/dede:arclist} </LI></UL></DIV>

代码解释:第二行:调用栏目ID为1的栏目名称。第三行:调用栏目ID为1的栏目链接地址。标签type的详细解释参考http://help.dedecms.com/v53/archives/tag/global/type/第6行到第8行是我们熟悉的arclist标签。只是多了一个typeid=’1’,指调用栏目ID为1 的栏目的内容。福星网络(fuxing5.com)仍然建议大家把这个标签学习一下,因为这个标签用处是很大的。可参考官方的手册:http://help.dedecms.com/v53/archives/tag/global/arclist/接来我们看前台,接下来是又是调用一个特定栏目,参考上面的教程来做,以后这些调用特定栏目文章的代码我们将跳过去。不再重复讲了。参照本讲教程就可以做的栏目有:比赛下载、拳击文章。我们参考本讲教程,修改这两块的代码。修改完成后,我们看下前台:好了,这一讲就结束了,我们下一讲再见!凡标识为福星网络原创的内容系福星网络版权内容,转载请注时来源于热转印纸(www.huylin.com)。谢谢合作!命运掌握在自己手中

织梦(dedecms)仿站课程第十三讲—特定栏目调用

相关文章:

你感兴趣的文章:

标签云: