發(fā)表日期:2019-12 文章編輯:小燈 瀏覽次數(shù):5387
不同于Wordpress,Phpcms默認(rèn)不支持隨機(jī)文章調(diào)用,必須自己動手實(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)載請注明出處。
日期:2019-12 瀏覽次數(shù):5766
日期:2019-12 瀏覽次數(shù):5195
日期:2019-12 瀏覽次數(shù):4959
日期:2019-12 瀏覽次數(shù):5178
日期:2019-12 瀏覽次數(shù):5352
日期:2019-12 瀏覽次數(shù):5087
日期:2019-12 瀏覽次數(shù):5386
日期:2019-12 瀏覽次數(shù):4995
日期:2019-12 瀏覽次數(shù):5560
日期:2019-12 瀏覽次數(shù):5595
日期:2019-12 瀏覽次數(shù):5285
日期:2019-12 瀏覽次數(shù):5888
日期:2019-12 瀏覽次數(shù):5317
日期:2019-12 瀏覽次數(shù):5085
日期:2019-12 瀏覽次數(shù):5204
日期:2019-12 瀏覽次數(shù):5083
日期:2019-12 瀏覽次數(shù):5329
日期:2019-12 瀏覽次數(shù):5150
日期:2019-12 瀏覽次數(shù):5150
日期:2019-12 瀏覽次數(shù):6554
日期:2019-12 瀏覽次數(shù):5623
日期:2019-12 瀏覽次數(shù):5007
日期:2019-12 瀏覽次數(shù):5016
日期:2019-12 瀏覽次數(shù):5102
日期:2019-12 瀏覽次數(shù):5785
日期:2019-12 瀏覽次數(shù):4961
日期:2019-12 瀏覽次數(shù):4981
日期:2019-12 瀏覽次數(shù):5164
日期:2019-12 瀏覽次數(shù):4872
日期:2019-12 瀏覽次數(shù):5151
Copyright ? 2013-2018 Tadeng NetWork Technology Co., LTD. All Rights Reserved.