發(fā)表日期:2019-12 文章編輯:小燈 瀏覽次數(shù):4893
不同于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ù):5280
日期:2019-12 瀏覽次數(shù):4704
日期:2019-12 瀏覽次數(shù):4460
日期:2019-12 瀏覽次數(shù):4689
日期:2019-12 瀏覽次數(shù):4825
日期:2019-12 瀏覽次數(shù):4611
日期:2019-12 瀏覽次數(shù):4892
日期:2019-12 瀏覽次數(shù):4500
日期:2019-12 瀏覽次數(shù):5017
日期:2019-12 瀏覽次數(shù):5059
日期:2019-12 瀏覽次數(shù):4798
日期:2019-12 瀏覽次數(shù):5367
日期:2019-12 瀏覽次數(shù):4811
日期:2019-12 瀏覽次數(shù):4609
日期:2019-12 瀏覽次數(shù):4697
日期:2019-12 瀏覽次數(shù):4546
日期:2019-12 瀏覽次數(shù):4854
日期:2019-12 瀏覽次數(shù):4654
日期:2019-12 瀏覽次數(shù):4681
日期:2019-12 瀏覽次數(shù):6052
日期:2019-12 瀏覽次數(shù):5138
日期:2019-12 瀏覽次數(shù):4507
日期:2019-12 瀏覽次數(shù):4560
日期:2019-12 瀏覽次數(shù):4602
日期:2019-12 瀏覽次數(shù):5339
日期:2019-12 瀏覽次數(shù):4475
日期:2019-12 瀏覽次數(shù):4438
日期:2019-12 瀏覽次數(shù):4705
日期:2019-12 瀏覽次數(shù):4336
日期:2019-12 瀏覽次數(shù):4648
Copyright ? 2013-2018 Tadeng NetWork Technology Co., LTD. All Rights Reserved.