發(fā)表日期:2019-12 文章編輯:小燈 瀏覽次數(shù):5054
不同于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ù):5451
日期:2019-12 瀏覽次數(shù):4859
日期:2019-12 瀏覽次數(shù):4612
日期:2019-12 瀏覽次數(shù):4853
日期:2019-12 瀏覽次數(shù):4993
日期:2019-12 瀏覽次數(shù):4766
日期:2019-12 瀏覽次數(shù):5053
日期:2019-12 瀏覽次數(shù):4663
日期:2019-12 瀏覽次數(shù):5211
日期:2019-12 瀏覽次數(shù):5245
日期:2019-12 瀏覽次數(shù):4955
日期:2019-12 瀏覽次數(shù):5535
日期:2019-12 瀏覽次數(shù):4970
日期:2019-12 瀏覽次數(shù):4765
日期:2019-12 瀏覽次數(shù):4863
日期:2019-12 瀏覽次數(shù):4710
日期:2019-12 瀏覽次數(shù):5023
日期:2019-12 瀏覽次數(shù):4818
日期:2019-12 瀏覽次數(shù):4827
日期:2019-12 瀏覽次數(shù):6204
日期:2019-12 瀏覽次數(shù):5290
日期:2019-12 瀏覽次數(shù):4666
日期:2019-12 瀏覽次數(shù):4721
日期:2019-12 瀏覽次數(shù):4768
日期:2019-12 瀏覽次數(shù):5480
日期:2019-12 瀏覽次數(shù):4634
日期:2019-12 瀏覽次數(shù):4595
日期:2019-12 瀏覽次數(shù):4870
日期:2019-12 瀏覽次數(shù):4503
日期:2019-12 瀏覽次數(shù):4811
Copyright ? 2013-2018 Tadeng NetWork Technology Co., LTD. All Rights Reserved.