發(fā)表日期:2019-12 文章編輯:小燈 瀏覽次數(shù):5178
不同于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ù):5592
日期:2019-12 瀏覽次數(shù):4993
日期:2019-12 瀏覽次數(shù):4753
日期:2019-12 瀏覽次數(shù):4985
日期:2019-12 瀏覽次數(shù):5121
日期:2019-12 瀏覽次數(shù):4895
日期:2019-12 瀏覽次數(shù):5177
日期:2019-12 瀏覽次數(shù):4813
日期:2019-12 瀏覽次數(shù):5353
日期:2019-12 瀏覽次數(shù):5397
日期:2019-12 瀏覽次數(shù):5093
日期:2019-12 瀏覽次數(shù):5691
日期:2019-12 瀏覽次數(shù):5108
日期:2019-12 瀏覽次數(shù):4895
日期:2019-12 瀏覽次數(shù):5005
日期:2019-12 瀏覽次數(shù):4851
日期:2019-12 瀏覽次數(shù):5148
日期:2019-12 瀏覽次數(shù):4945
日期:2019-12 瀏覽次數(shù):4953
日期:2019-12 瀏覽次數(shù):6337
日期:2019-12 瀏覽次數(shù):5425
日期:2019-12 瀏覽次數(shù):4818
日期:2019-12 瀏覽次數(shù):4840
日期:2019-12 瀏覽次數(shù):4898
日期:2019-12 瀏覽次數(shù):5601
日期:2019-12 瀏覽次數(shù):4774
日期:2019-12 瀏覽次數(shù):4722
日期:2019-12 瀏覽次數(shù):4994
日期:2019-12 瀏覽次數(shù):4624
日期:2019-12 瀏覽次數(shù):4952
Copyright ? 2013-2018 Tadeng NetWork Technology Co., LTD. All Rights Reserved.