發(fā)表日期:2019-12 文章編輯:小燈 瀏覽次數(shù):5166
不同于Wordpress,Phpcms默認(rèn)不支持隨機(jī)文章調(diào)用,必須自己動(dòng)手實(shí)現(xiàn),調(diào)用代碼如下:
- {pc:content action="lists" catid="$catid" num="8" order="rand()" return="info"}
- <ul class="list lh24 f13">
- {loop $info $v}
- <li><a href="{$v['url']}" target="_blank" title="{$v['title']}"{title_style($v[style])}>{$v['title']}</a></li>
- {/loop}
- </ul>
- {/pc}
上述代碼只做了一點(diǎn)修改:order="rand()",其它與正常調(diào)用一樣。
作者:Esion 來源:http://www.cnblogs.com/esion 轉(zhuǎn)載請(qǐng)注明出處。
日期:2019-12 瀏覽次數(shù):5581
日期:2019-12 瀏覽次數(shù):4984
日期:2019-12 瀏覽次數(shù):4739
日期:2019-12 瀏覽次數(shù):4976
日期:2019-12 瀏覽次數(shù):5112
日期:2019-12 瀏覽次數(shù):4887
日期:2019-12 瀏覽次數(shù):5165
日期:2019-12 瀏覽次數(shù):4802
日期:2019-12 瀏覽次數(shù):5341
日期:2019-12 瀏覽次數(shù):5388
日期:2019-12 瀏覽次數(shù):5083
日期:2019-12 瀏覽次數(shù):5674
日期:2019-12 瀏覽次數(shù):5097
日期:2019-12 瀏覽次數(shù):4886
日期:2019-12 瀏覽次數(shù):4992
日期:2019-12 瀏覽次數(shù):4835
日期:2019-12 瀏覽次數(shù):5133
日期:2019-12 瀏覽次數(shù):4933
日期:2019-12 瀏覽次數(shù):4944
日期:2019-12 瀏覽次數(shù):6330
日期:2019-12 瀏覽次數(shù):5411
日期:2019-12 瀏覽次數(shù):4807
日期:2019-12 瀏覽次數(shù):4833
日期:2019-12 瀏覽次數(shù):4886
日期:2019-12 瀏覽次數(shù):5590
日期:2019-12 瀏覽次數(shù):4759
日期:2019-12 瀏覽次數(shù):4710
日期:2019-12 瀏覽次數(shù):4984
日期:2019-12 瀏覽次數(shù):4615
日期:2019-12 瀏覽次數(shù):4942
Copyright ? 2013-2018 Tadeng NetWork Technology Co., LTD. All Rights Reserved.