發(fā)表日期:2019-12 文章編輯:小燈 瀏覽次數(shù):5057
不同于Wordpress,Phpcms默認(rèn)不支持隨機(jī)文章調(diào)用,必須自己動手實現(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}
上述代碼只做了一點修改:order="rand()",其它與正常調(diào)用一樣。
作者:Esion 來源:http://www.cnblogs.com/esion 轉(zhuǎn)載請注明出處。
日期:2019-12 瀏覽次數(shù):5457
日期:2019-12 瀏覽次數(shù):4862
日期:2019-12 瀏覽次數(shù):4618
日期:2019-12 瀏覽次數(shù):4859
日期:2019-12 瀏覽次數(shù):4996
日期:2019-12 瀏覽次數(shù):4769
日期:2019-12 瀏覽次數(shù):5056
日期:2019-12 瀏覽次數(shù):4668
日期:2019-12 瀏覽次數(shù):5216
日期:2019-12 瀏覽次數(shù):5248
日期:2019-12 瀏覽次數(shù):4964
日期:2019-12 瀏覽次數(shù):5540
日期:2019-12 瀏覽次數(shù):4974
日期:2019-12 瀏覽次數(shù):4768
日期:2019-12 瀏覽次數(shù):4868
日期:2019-12 瀏覽次數(shù):4713
日期:2019-12 瀏覽次數(shù):5030
日期:2019-12 瀏覽次數(shù):4824
日期:2019-12 瀏覽次數(shù):4829
日期:2019-12 瀏覽次數(shù):6212
日期:2019-12 瀏覽次數(shù):5295
日期:2019-12 瀏覽次數(shù):4673
日期:2019-12 瀏覽次數(shù):4724
日期:2019-12 瀏覽次數(shù):4774
日期:2019-12 瀏覽次數(shù):5481
日期:2019-12 瀏覽次數(shù):4643
日期:2019-12 瀏覽次數(shù):4603
日期:2019-12 瀏覽次數(shù):4872
日期:2019-12 瀏覽次數(shù):4509
日期:2019-12 瀏覽次數(shù):4817
Copyright ? 2013-2018 Tadeng NetWork Technology Co., LTD. All Rights Reserved.