<< 邱嵩松SDCMS标签、模板与仿站教程 2-4邱嵩松:网络菜鸟如何才能展翅高飞? >>

邱嵩松SDCMS标签、模板与仿站教程 2-5

        在邱嵩松sdcms标签、模板与仿站教程 2-5 这一节中,我们讲讲sdcms最常用到的页面,即内容页的仿制。

        首先是head区,标题、关键字、描述必不可少,

        <title>{sdcms:info_title}</title>
        <meta name="keywords" content="{sdcms:info_keyword}" />
        <meta name="description" content="{sdcms:info_desc}" />

        所在位置:您的位置:<a href="{sdcms:root}">网站首页</a> {sdcms:info_position}

        文章信息:标题:{sdcms:info_title} 作者:{sdcms:info_author} 来源:{sdcms:info_comefrom} 日期:{sdcms:info_date} 人气:<span id="show_i_hits"><script>get_hits({sdcms:info_hits},"show_i_hits")</script></span> 标签:{sdcms:info_tags}

        内容正文:{sdcms:info_content}

        内容分页:{sdcms:info_page}

        上下篇:上一篇:{sdcms:loop top="1" table="sd_info" where="where id<{sdcms:info_id} and ispass=1 and iscreate=1"}<eof>没有资料</eof><a href="{link}" [if {isurl}=1]target="_blank"[end if]>{title}</a>{/sdcms:loop} 下一篇:{sdcms:loop top="1"  table="sd_info" where="where id>{sdcms:info_id} and ispass=1 and iscreate=1" order="id"}<eof>没有资料</eof><a href="{link}" [if {isurl}=1]target="_blank"[end if]>{title}</a>{/sdcms:loop}

        热门文章:{sdcms:loop table="sd_info" top="7" where="where ispass=1 and iscreate=1" order="hits desc,id desc"}
         <dt><a href="{link}" title="{title}" [if {isurl}=1]target="_blank"[end if]>{title len="16"}</a></dt>
     {/sdcms:loop}

        推荐文章:{sdcms:loop table="sd_info" top="10" where="where isnice=1 and ispass=1 and iscreate=1"}
    <eof><dt>没有资料</dt></eof>
         <dt><a href="{link}" title="{title}" [if {isurl}=1]target="_blank"[end if]>{title len="16"}</a></dt>
     {/sdcms:loop}

        相关文章:{sdcms:loop table="sd_info" top="10" where="where id in({sdcms:info_likeid}) and ispass=1 and iscreate=1"}
<eof><dt>没有资料</dt></eof>
<dt><a href="{link}" title="{title}" [if {isurl}=1]target="_blank"[end if]>{title len="26"}</a></dt>
{/sdcms:loop}

        用以上部分替换模板中相应位置即可。其他分部请参照默认模板,不再详述,建议栏目和底部版权等部分使用后台的标签功能单独来写,方便修改。除非栏目很多或不会再改,不然不推荐大家用栏目直接调用的方法。更多调用方法,参见sdcms帮助手册。下一节我们来讲sdcms列表页的仿制教程。




原创文章 欢迎转载,请注明:转载自邱嵩松博客 [ http://blog.qiusongsong.com/ ]

本文链接地址:http://www.fyxiaonei.com/blog/post/55.html

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

日历

网站分类

最新评论及回复

Search

最近发表

Powered By Z-Blog  Sunnymoor T3.1 
本站采用创作共用版权协议, 要求署名、非商业用途和保持一致. 转载本站内容必须也遵循“署名-非商业用途-保持一致”的创作共用协议.
This site is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License.
© 2009 阜阳校内网 皖ICP备09005092号