进入PHPCMS v9后台—内容,进入PHPCMS的文章管理列表,要实现在文章标题前显示文章类别,就是可以直接在文章列表里看到类别,不需要点击进入编辑页面才可以看到,如下图: ![](http://img.shangxueba.cn/jyimg/20130306/jzjc/2013022109/4a545d3ae598802dc47b783d974d24a9.png)
PHPCMS v9在后台文章管理列表添加类别实现方法: 打开 phpcmsmodulescontenttemplatescontent_list.tpl.php 文件,找到 <span class="sh_symbol"><?</span>php <span class="sh_keyword">if</span><span class="sh_symbol">(</span>$status<span class="sh_symbol">==</span><span class="sh_number">99</span><span class="sh_symbol">)</span> <span class="sh_cbracket">{</span> <span class="sh_keyword">if</span><span class="sh_symbol">(</span>$r<span class="sh_symbol">[</span><span class="sh_string">'islink'</span><span class="sh_symbol">])</span> <span class="sh_cbracket">{</span> 在前面添加 <span class="sh_symbol"><</span>span style<span class="sh_symbol">=</span><span class="sh_string">"color:#CCC"</span><span class="sh_symbol">></span><span class="sh_symbol"><?</span>php $TYPE <span class="sh_symbol">=</span> <span class="sh_function">getcache</span><span class="sh_symbol">(</span><span class="sh_string">'type_content'</span><span class="sh_symbol">,</span><span class="sh_string">'commons'</span><span class="sh_symbol">);?></span>【<span class="sh_symbol"><?</span>php echo $TYPE<span class="sh_symbol">[</span>$r<span class="sh_symbol">[</span><span class="sh_string">'typeid'</span><span class="sh_symbol">]][</span><span class="sh_string">'name'</span><span class="sh_symbol">];?></span>】<span class="sh_symbol"></</span>span<span class="sh_symbol">></span> OK,现在后台文章管理列表里就可以显示类别了!
|