问题:
可以显示新闻,但是点击了以后弹出新窗口,但是无法显示那条新闻。希望懂的朋友帮忙。
<!--{get sql="select title from phpcms_content where catid=12 order by contentid desc,catid desc" rows="10"}-->
<ul class="text_list">
<a href="{$r[url]}" target="_blank" class="{$r[style]}">{$r[title]}</a>
</ul>
<!--{/get}-->
回答:
<!--{get sql="select title,url from phpcms_content where status=99 and catid in(select catid from phpcms_category where parentid=11) order by contentid desc,catid desc" rows="10"}-->
<ul class="text_list">
<a target="_blank" class="{$r[style]}" href="{$r[url]}">{str_cut($r[title],26)}</a>
</ul>
<!--{/get}-->
推荐使用:
sql = "select title,url from phpcms_content where status=99 ".get_sql_catid(11)." order by contentid desc,catid desc"