本帖最后由 jacoo9 于 2009-11-10 16:50 编辑
jacoo9
这个是模板调用问题,在原来的block块后面加一个type/news参数可解决此问题,如:
改 ...
lidq.jingwu 发表于 2009-11-2 16:03
请问一下,SS默认模板下的首页,代码是- <div class="column">
- <div class="col1">
- <div class="global_module">
- <div class="global_module1_caption">
- <h3>茶辞典</h3>
- <a class="more" href="#action/news#">更多>></a></div>
- <ul class="global_tx_list1">
- <!--{if !empty($_SBLOCK['hotnews'])}-->
- <!--{eval $hotnews2 = @array_slice($_SBLOCK['hotnews'], 5, 17)}-->
- <!--{/if}-->
- <!--{loop $hotnews2 $value}-->
- <li><span class="box_r">#date('m-d',$value['dateline'])#</span><a href="$value[url]" title="$value[subjectall]">$value[subject]</a></li>
- <!--{/loop}-->
- </ul>
- </div>
- </div><!--col1 end-->
- <!--{block name="spacenews" parameter="type/news/digest/1,2,3/order/i.viewnum DESC,i.dateline DESC/limit/0,6/cachetime/89877/subjectlen/34/subjectdot/0/cachename/hotnews2"}-->
- <div class="col2">
- <div class="global_module bg_fff">
- <div class="global_module2_caption"><h3>本月精华</h3></div>
- <ul class="global_tx_list2">
- <!--{loop $_SBLOCK['hotnews2'] $value}-->
- <li><a href="$value[url]" title="$value[subjectall]">$value[subject]</a></li>
- <!--{/loop}-->
- </ul>
- </div>
- </div><!--col2 end-->
- </div><!--column end-->
复制代码 在本月精华那里<!--{block name="spacenews" parameter="type/news/digest/1,2,3/order/i.viewnum DESC,i.dateline DESC/limit/0,6/cachetime/89877/subjectlen/34/subjectdot/0/cachename/hotnews2"}-->
加了type/news/
但在上面的资讯里,怎么修改呢?如- <ul class="global_tx_list1">
- <!--{if !empty($_SBLOCK['hotnews'])}-->
- <!--{eval $hotnews2 = @array_slice($_SBLOCK['hotnews'], 5, 17)}-->
- <!--{/if}-->
- <!--{loop $hotnews2 $value}-->
- <li><span class="box_r">#date('m-d',$value['dateline'])#</span><a href="$value[url]" title="$value[subjectall]">$value[subject]</a></li>
- <!--{/loop}-->
- </ul>
复制代码 另外新增的频道也是自动出现在首页,要如何更改代码呢? |