發(fā)表日期:2019-12 文章編輯:小燈 瀏覽次數(shù):5164
不同于Wordpress,Phpcms默認(rèn)不支持隨機(jī)文章調(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ù):5577
日期:2019-12 瀏覽次數(shù):4978
日期:2019-12 瀏覽次數(shù):4736
日期:2019-12 瀏覽次數(shù):4971
日期:2019-12 瀏覽次數(shù):5108
日期:2019-12 瀏覽次數(shù):4884
日期:2019-12 瀏覽次數(shù):5163
日期:2019-12 瀏覽次數(shù):4798
日期:2019-12 瀏覽次數(shù):5334
日期:2019-12 瀏覽次數(shù):5384
日期:2019-12 瀏覽次數(shù):5082
日期:2019-12 瀏覽次數(shù):5670
日期:2019-12 瀏覽次數(shù):5092
日期:2019-12 瀏覽次數(shù):4882
日期:2019-12 瀏覽次數(shù):4989
日期:2019-12 瀏覽次數(shù):4831
日期:2019-12 瀏覽次數(shù):5129
日期:2019-12 瀏覽次數(shù):4929
日期:2019-12 瀏覽次數(shù):4941
日期:2019-12 瀏覽次數(shù):6327
日期:2019-12 瀏覽次數(shù):5409
日期:2019-12 瀏覽次數(shù):4803
日期:2019-12 瀏覽次數(shù):4831
日期:2019-12 瀏覽次數(shù):4882
日期:2019-12 瀏覽次數(shù):5587
日期:2019-12 瀏覽次數(shù):4755
日期:2019-12 瀏覽次數(shù):4706
日期:2019-12 瀏覽次數(shù):4982
日期:2019-12 瀏覽次數(shù):4611
日期:2019-12 瀏覽次數(shù):4938
Copyright ? 2013-2018 Tadeng NetWork Technology Co., LTD. All Rights Reserved.