Discuz! X3.2 在帖子标题显示分类信息中的某个字段内容的实现方法

1. 设计好一组分类信息;

2. 在列表页模板中填写帖子的标题格式,例如:

[{producer_value}][{artist_value}]{subject}[{size_value}{size_unit}]

3. 修改template\default\forum\forumdisplay_list.htm文件,将173行起的一组 if 语句替换成:

<!--{if !$thread[sortid]}-->
  <a href="forum.php?mod=viewthread&tid=$thread[tid]&

                  {if $_GET['archiveid']}archiveid={$_GET['archiveid']}&   {/if}extra=$extra"$thread[highlight]{if $thread['isgroup'] == 1 ||                $thread['forumstick']} target="_blank"{else} onclick="atarget(this)"{/if} class="s xst">$thread[subject]</a>
<!--{else}-->
                                            

        $stemplate[$thread[sortid]][$thread[tid]]
<!--{/if}-->

posted @ 2014-07-18 15:09  tomzzb  阅读(1613)  评论(0编辑  收藏  举报