继续我们对softsea首页的修改!
原先的头条区域显得单薄,其实也是给我们留下了更多的mod空间,不是吗?感谢版主lushnis的精心设计!(btw:不是拍马屁 )
样板网站:
http://www.uini.org
效果图:
不过这里的修改可能不像前面几个那样简单,而是根据你的网站独身定做。
这里提供该区域的改动代码供各位看官参考。
继续给出原代码:- <div id="news" class="tabblock" style="margin-left: 274px;">
- <h3 id="newstabs">
- <a id="newnewstab" href="javascript:setTab('news','newnews');" class="tab curtab">最新资讯</a>
- <a id="hotnewstab" href="javascript:setTab('news','hotnews');" class="tab">本周热点</a>
- </h3>
- <!--{block name="spacenews" parameter="order/i.dateline DESC/limit/0,6/cachetime/85400/subjectlen/40/subjectdot/1/cachename/hotnews1/tpl/data"}-->
- <div id="newnews" class="tabcontent">
- <ul class="msgtitlelist" style="height: 144px;">
- <!--{loop $_SBLOCK['hotnews1'] $value}-->
- <li><cite>#date("m-d", $value["dateline"])# </cite><a href="$value[url]">$value[subject]</a></li>
- <!--{/loop}-->
- </ul>
- </div>
- <!--站内热门资讯列表(一月)-->
- <!--{block name="spacenews" parameter="dateline/2592000/order/i.viewnum DESC/limit/0,6/cachetime/97200/subjectlen/40/subjectdot/1/cachename/hotnews2/tpl/data"}-->
- <div id="hotnews" class="tabcontent" style="display: none;">
- <ul class="msgtitlelist" style="height: 144px;">
- <!--{loop $_SBLOCK['hotnews2'] $value}-->
- <li><cite>#date("m-d", $value["dateline"])# </cite><a href="$value[url]">$value[subject]</a></li>
- <!--{/loop}-->
- </ul>
- </div>
- </div>
复制代码 我修改过的代码:- <div id="news" class="tabblock" style="margin-left: 274px;">
- <h3 id="newstabs">
- <a id="newnewstab" href="javascript:setTab('news','newnews');" class="tab curtab">最新资讯</a>
- <a id="rennewstab" href="javascript:setTab('news','rennews');" class="tab">肾脏</a>
- <a id="livnewstab" href="javascript:setTab('news','livnews');" class="tab">肝脏</a>
- <a id="lunnewstab" href="javascript:setTab('news','lunnews');" class="tab">心肺</a>
- <a id="dinewstab" href="javascript:setTab('news','dinews');" class="tab">透析</a>
- <a id="hotnewstab" href="javascript:setTab('news','hotnews');" class="tab">本周热点</a>
- <a id="chnewstab" href="javascript:setTab('news','chnews');" class="tab">精彩专题</a>
- </h3>
- <!--最新资讯列表(一月)-->
- <!--{block name="spacenews" parameter="order/i.dateline DESC/limit/0,6/cachetime/85400/subjectlen/40/subjectdot/1/cachename/hotnews1/tpl/data"}-->
- <div id="newnews" class="tabcontent">
- <ul class="msgtitlelist" style="height: 144px;">
- <!--{loop $_SBLOCK['hotnews1'] $value}-->
- <li><cite>#date("m-d", $value["dateline"])# </cite><a href="$value[url]">$value[subject]</a></li>
- <!--{/loop}-->
- <li style="float:right;padding-right:15px"><img src="{S_URL}/templates/$_SCONFIG[template]/images/icon_item.gif" style="margin-right:10px;"><a href="{S_URL}/?category-158.html">名医</a> <img src="{S_URL}/templates/$_SCONFIG[template]/images/icon_item.gif" style="margin-right:10px;"><a href="{S_URL}/?category-159.html">名院</a> <img src="{S_URL}/templates/$_SCONFIG[template]/images/icon_item.gif" style="margin-right:10px;"><a href="{S_URL}/?category-6.html">药品</a> <img src="{S_URL}/templates/$_SCONFIG[template]/images/icon_item.gif" style="margin-right:10px;"><a href="{S_URL}/?category-160.html">检查</a> <img src="{S_URL}/templates/$_SCONFIG[template]/images/icon_item.gif" style="margin-right:10px;"><a href="{S_URL}/?category-169.html">黑榜</a> <img src="{S_URL}/templates/$_SCONFIG[template]/images/icon_item.gif" style="margin-right:10px;"><a href="{S_URL}/?category-8.html">受者天地</a></li>
- </ul>
- </div>
- <!--肾资讯列表-->
- <!--{block name="spacenews" parameter="catid/141,142,152,153/order/i.dateline DESC/limit/0,6/cachetime/85400/subjectlen/40/subjectdot/1/cachename/hotnews1/tpl/data"}-->
- <div id="rennews" class="tabcontent" style="display: none;">
- <ul class="msgtitlelist" style="height: 144px;">
- <!--{loop $_SBLOCK['hotnews1'] $value}-->
- <li><cite>#date("m-d", $value["dateline"])# </cite><a href="$value[url]">$value[subject]</a></li>
- <!--{/loop}-->
- <li style="float:right;padding-right:15px"><img src="{S_URL}/templates/$_SCONFIG[template]/images/icon_item.gif" style="margin-right:10px;"><a href="{S_URL}/?category-141.html">肾病</a> <img src="{S_URL}/templates/$_SCONFIG[template]/images/icon_item.gif" style="margin-right:10px;"><a href="{S_URL}/?category-153.html">肾病饮食</a> <img src="{S_URL}/templates/$_SCONFIG[template]/images/icon_item.gif" style="margin-right:10px;"><a href="{S_URL}/?category-142.html">肾移植</a> <img src="{S_URL}/templates/$_SCONFIG[template]/images/icon_item.gif" style="margin-right:10px;"><a href="{S_URL}/?category-152.html">肾移植术后饮食</a></li>
- </ul>
- </div>
- <!--肝资讯列表-->
- <!--{block name="spacenews" parameter="catid/146,143,154/order/i.dateline DESC/limit/0,6/cachetime/85400/subjectlen/40/subjectdot/1/cachename/hotnews1/tpl/data"}-->
- <div id="livnews" class="tabcontent" style="display: none;">
- <ul class="msgtitlelist" style="height: 144px;">
- <!--{loop $_SBLOCK['hotnews1'] $value}-->
- <li><cite>#date("m-d", $value["dateline"])# </cite><a href="$value[url]">$value[subject]</a></li>
- <!--{/loop}-->
- <li style="float:right;padding-right:15px"><img src="{S_URL}/templates/$_SCONFIG[template]/images/icon_item.gif" style="margin-right:10px;"><a href="{S_URL}/?category-146.html">肝病</a> <img src="{S_URL}/templates/$_SCONFIG[template]/images/icon_item.gif" style="margin-right:10px;"><a href="{S_URL}/?category-154.html">肝病饮食</a> <img src="{S_URL}/templates/$_SCONFIG[template]/images/icon_item.gif" style="margin-right:10px;"><a href="{S_URL}/?category-143.html">肝移植</a></li>
- </ul>
- </div>
- <!--{block name="spacenews" parameter="catid/144,145/order/i.dateline DESC/limit/0,6/cachetime/85400/subjectlen/40/subjectdot/1/cachename/hotnews1/tpl/data"}-->
- <!--心肺资讯列表-->
- <div id="lunnews" class="tabcontent" style="display: none;">
- <ul class="msgtitlelist" style="height: 144px;">
- <!--{loop $_SBLOCK['hotnews1'] $value}-->
- <li><cite>#date("m-d", $value["dateline"])# </cite><a href="$value[url]">$value[subject]</a></li>
- <!--{/loop}-->
- <li style="float:right;padding-right:15px"><img src="{S_URL}/templates/$_SCONFIG[template]/images/icon_item.gif" style="margin-right:10px;"><a href="{S_URL}/?category-145.html">心肺疾病</a> <img src="{S_URL}/templates/$_SCONFIG[template]/images/icon_item.gif" style="margin-right:10px;"><a href="{S_URL}/?category-144.html">心肺移植</a></li>
- </ul>
- </div>
- <!--{block name="spacenews" parameter="catid/3,151/order/i.dateline DESC/limit/0,6/cachetime/85400/subjectlen/40/subjectdot/1/cachename/hotnews1/tpl/data"}-->
- <!--透析列表-->
- <div id="dinews" class="tabcontent" style="display: none;">
- <ul class="msgtitlelist" style="height: 144px;">
- <!--{loop $_SBLOCK['hotnews1'] $value}-->
- <li><cite>#date("m-d", $value["dateline"])# </cite><a href="$value[url]">$value[subject]</a></li>
- <!--{/loop}-->
- <li style="float:right;padding-right:15px"><img src="{S_URL}/templates/$_SCONFIG[template]/images/icon_item.gif" style="margin-right:10px;"><a href="{S_URL}/?category-3.html">透析</a> <img src="{S_URL}/templates/$_SCONFIG[template]/images/icon_item.gif" style="margin-right:10px;"><a href="{S_URL}/?category-151.html">透析饮食</a> <img src="{S_URL}/templates/$_SCONFIG[template]/images/icon_item.gif" style="margin-right:10px;"><a href="{S_URL}/?category-169.html">黑榜</a></li>
- </ul>
- </div>
- <!--站内热门资讯列表(一月)-->
- <!--{block name="spacenews" parameter="dateline/2592000/order/i.viewnum DESC/limit/0,6/cachetime/97200/subjectlen/40/subjectdot/1/cachename/hotnews2/tpl/data"}-->
- <div id="hotnews" class="tabcontent" style="display: none;">
- <ul class="msgtitlelist" style="height: 144px;">
- <!--{loop $_SBLOCK['hotnews2'] $value}-->
- <li><cite>#date("m-d", $value["dateline"])# </cite><a href="$value[url]">$value[subject]</a></li>
- <!--{/loop}-->
- </ul>
- </div>
- <!--资讯专题列表-->
- <!--{block name="category" parameter="upid/$thecat[catid]/ischannel/1/showattach/1/order/c.displayorder/limit/0,6/cachetime/16400/cachename/channel/tpl/data"}-->
- <div id="chnews" class="tabcontent" style="display: none;">
- <ul class="msgtitlelist" style="height: 144px;">
- <!--{loop $_SBLOCK['channel'] $value}-->
- <li><a href="#action/category/catid/$value[catid]#">[专题] $value[name]</a></li>
- <!--{/loop}-->
- </ul>
- </div>
- </div>
复制代码 如果您也想尝试一下,有以下提醒:
1、注意<div>的个数;
2、注意tab块和数据调用区的id名称必须一致:
比如: <a id="newnewstab" href="javascript:setTab('news','newnews');" class="tab curtab">最新资讯</a>
接下来的后面数据调用区ID: <div id="newnews" class="tabcontent">
3、catid/144,145 表示调用的资讯分类。
[ 本帖最后由 jsaren 于 2007-4-17 16:26 编辑 ] |