發(fā)表日期:2019-12 文章編輯:小燈 瀏覽次數(shù):5345
不同于Wordpress,Phpcms默認(rèn)不支持隨機(jī)文章調(diào)用,必須自己動(dòng)手實(shí)現(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}
上述代碼只做了一點(diǎn)修改:order="rand()",其它與正常調(diào)用一樣。
作者:Esion 來源:http://www.cnblogs.com/esion 轉(zhuǎn)載請(qǐng)注明出處。
日期:2019-12 瀏覽次數(shù):5737
日期:2019-12 瀏覽次數(shù):5154
日期:2019-12 瀏覽次數(shù):4923
日期:2019-12 瀏覽次數(shù):5154
日期:2019-12 瀏覽次數(shù):5318
日期:2019-12 瀏覽次數(shù):5057
日期:2019-12 瀏覽次數(shù):5344
日期:2019-12 瀏覽次數(shù):4965
日期:2019-12 瀏覽次數(shù):5525
日期:2019-12 瀏覽次數(shù):5562
日期:2019-12 瀏覽次數(shù):5250
日期:2019-12 瀏覽次數(shù):5855
日期:2019-12 瀏覽次數(shù):5282
日期:2019-12 瀏覽次數(shù):5050
日期:2019-12 瀏覽次數(shù):5173
日期:2019-12 瀏覽次數(shù):5046
日期:2019-12 瀏覽次數(shù):5299
日期:2019-12 瀏覽次數(shù):5107
日期:2019-12 瀏覽次數(shù):5113
日期:2019-12 瀏覽次數(shù):6513
日期:2019-12 瀏覽次數(shù):5587
日期:2019-12 瀏覽次數(shù):4975
日期:2019-12 瀏覽次數(shù):4988
日期:2019-12 瀏覽次數(shù):5075
日期:2019-12 瀏覽次數(shù):5756
日期:2019-12 瀏覽次數(shù):4927
日期:2019-12 瀏覽次數(shù):4945
日期:2019-12 瀏覽次數(shù):5135
日期:2019-12 瀏覽次數(shù):4842
日期:2019-12 瀏覽次數(shù):5122
Copyright ? 2013-2018 Tadeng NetWork Technology Co., LTD. All Rights Reserved.