發(fā)表日期:2019-12 文章編輯:小燈 瀏覽次數(shù):5190
不同于Wordpress,Phpcms默認不支持隨機文章調(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ù):5604
日期:2019-12 瀏覽次數(shù):5004
日期:2019-12 瀏覽次數(shù):4765
日期:2019-12 瀏覽次數(shù):5001
日期:2019-12 瀏覽次數(shù):5140
日期:2019-12 瀏覽次數(shù):4908
日期:2019-12 瀏覽次數(shù):5189
日期:2019-12 瀏覽次數(shù):4823
日期:2019-12 瀏覽次數(shù):5370
日期:2019-12 瀏覽次數(shù):5405
日期:2019-12 瀏覽次數(shù):5104
日期:2019-12 瀏覽次數(shù):5705
日期:2019-12 瀏覽次數(shù):5122
日期:2019-12 瀏覽次數(shù):4906
日期:2019-12 瀏覽次數(shù):5019
日期:2019-12 瀏覽次數(shù):4867
日期:2019-12 瀏覽次數(shù):5161
日期:2019-12 瀏覽次數(shù):4954
日期:2019-12 瀏覽次數(shù):4969
日期:2019-12 瀏覽次數(shù):6351
日期:2019-12 瀏覽次數(shù):5441
日期:2019-12 瀏覽次數(shù):4833
日期:2019-12 瀏覽次數(shù):4853
日期:2019-12 瀏覽次數(shù):4912
日期:2019-12 瀏覽次數(shù):5613
日期:2019-12 瀏覽次數(shù):4782
日期:2019-12 瀏覽次數(shù):4741
日期:2019-12 瀏覽次數(shù):5006
日期:2019-12 瀏覽次數(shù):4645
日期:2019-12 瀏覽次數(shù):4964
Copyright ? 2013-2018 Tadeng NetWork Technology Co., LTD. All Rights Reserved.