發(fā)表日期:2019-12 文章編輯:小燈 瀏覽次數(shù):5071
不同于Wordpress,Phpcms默認(rèn)不支持隨機文章調(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ù):5475
日期:2019-12 瀏覽次數(shù):4880
日期:2019-12 瀏覽次數(shù):4636
日期:2019-12 瀏覽次數(shù):4872
日期:2019-12 瀏覽次數(shù):5013
日期:2019-12 瀏覽次數(shù):4782
日期:2019-12 瀏覽次數(shù):5070
日期:2019-12 瀏覽次數(shù):4692
日期:2019-12 瀏覽次數(shù):5235
日期:2019-12 瀏覽次數(shù):5265
日期:2019-12 瀏覽次數(shù):4979
日期:2019-12 瀏覽次數(shù):5560
日期:2019-12 瀏覽次數(shù):4993
日期:2019-12 瀏覽次數(shù):4787
日期:2019-12 瀏覽次數(shù):4885
日期:2019-12 瀏覽次數(shù):4730
日期:2019-12 瀏覽次數(shù):5043
日期:2019-12 瀏覽次數(shù):4836
日期:2019-12 瀏覽次數(shù):4844
日期:2019-12 瀏覽次數(shù):6233
日期:2019-12 瀏覽次數(shù):5311
日期:2019-12 瀏覽次數(shù):4693
日期:2019-12 瀏覽次數(shù):4740
日期:2019-12 瀏覽次數(shù):4792
日期:2019-12 瀏覽次數(shù):5495
日期:2019-12 瀏覽次數(shù):4660
日期:2019-12 瀏覽次數(shù):4612
日期:2019-12 瀏覽次數(shù):4886
日期:2019-12 瀏覽次數(shù):4521
日期:2019-12 瀏覽次數(shù):4833
Copyright ? 2013-2018 Tadeng NetWork Technology Co., LTD. All Rights Reserved.