發(fā)表日期:2019-12 文章編輯:小燈 瀏覽次數(shù):4663
不同于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)載請注明出處。
日期:2019-12 瀏覽次數(shù):5069
日期:2019-12 瀏覽次數(shù):4479
日期:2019-12 瀏覽次數(shù):4233
日期:2019-12 瀏覽次數(shù):4474
日期:2019-12 瀏覽次數(shù):4609
日期:2019-12 瀏覽次數(shù):4380
日期:2019-12 瀏覽次數(shù):4662
日期:2019-12 瀏覽次數(shù):4294
日期:2019-12 瀏覽次數(shù):4820
日期:2019-12 瀏覽次數(shù):4817
日期:2019-12 瀏覽次數(shù):4582
日期:2019-12 瀏覽次數(shù):5141
日期:2019-12 瀏覽次數(shù):4566
日期:2019-12 瀏覽次數(shù):4378
日期:2019-12 瀏覽次數(shù):4469
日期:2019-12 瀏覽次數(shù):4346
日期:2019-12 瀏覽次數(shù):4620
日期:2019-12 瀏覽次數(shù):4439
日期:2019-12 瀏覽次數(shù):4476
日期:2019-12 瀏覽次數(shù):5831
日期:2019-12 瀏覽次數(shù):4915
日期:2019-12 瀏覽次數(shù):4294
日期:2019-12 瀏覽次數(shù):4318
日期:2019-12 瀏覽次數(shù):4405
日期:2019-12 瀏覽次數(shù):5126
日期:2019-12 瀏覽次數(shù):4262
日期:2019-12 瀏覽次數(shù):4219
日期:2019-12 瀏覽次數(shù):4518
日期:2019-12 瀏覽次數(shù):4121
日期:2019-12 瀏覽次數(shù):4419
Copyright ? 2013-2018 Tadeng NetWork Technology Co., LTD. All Rights Reserved.