發(fā)表日期:2019-12 文章編輯:小燈 瀏覽次數(shù):5304
不同于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ù):5684
日期:2019-12 瀏覽次數(shù):5106
日期:2019-12 瀏覽次數(shù):4877
日期:2019-12 瀏覽次數(shù):5109
日期:2019-12 瀏覽次數(shù):5270
日期:2019-12 瀏覽次數(shù):5012
日期:2019-12 瀏覽次數(shù):5303
日期:2019-12 瀏覽次數(shù):4925
日期:2019-12 瀏覽次數(shù):5483
日期:2019-12 瀏覽次數(shù):5508
日期:2019-12 瀏覽次數(shù):5205
日期:2019-12 瀏覽次數(shù):5811
日期:2019-12 瀏覽次數(shù):5236
日期:2019-12 瀏覽次數(shù):5010
日期:2019-12 瀏覽次數(shù):5118
日期:2019-12 瀏覽次數(shù):4998
日期:2019-12 瀏覽次數(shù):5259
日期:2019-12 瀏覽次數(shù):5057
日期:2019-12 瀏覽次數(shù):5065
日期:2019-12 瀏覽次數(shù):6471
日期:2019-12 瀏覽次數(shù):5537
日期:2019-12 瀏覽次數(shù):4930
日期:2019-12 瀏覽次數(shù):4935
日期:2019-12 瀏覽次數(shù):5021
日期:2019-12 瀏覽次數(shù):5704
日期:2019-12 瀏覽次數(shù):4876
日期:2019-12 瀏覽次數(shù):4885
日期:2019-12 瀏覽次數(shù):5095
日期:2019-12 瀏覽次數(shù):4790
日期:2019-12 瀏覽次數(shù):5076
Copyright ? 2013-2018 Tadeng NetWork Technology Co., LTD. All Rights Reserved.