發(fā)表日期:2019-12 文章編輯:小燈 瀏覽次數(shù):4777
不同于Wordpress,Phpcms默認不支持隨機文章調用,必須自己動手實現(xiàn),調用代碼如下:
- {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()",其它與正常調用一樣。
作者:Esion 來源:http://www.cnblogs.com/esion 轉載請注明出處。
日期:2019-12 瀏覽次數(shù):5191
日期:2019-12 瀏覽次數(shù):4589
日期:2019-12 瀏覽次數(shù):4338
日期:2019-12 瀏覽次數(shù):4590
日期:2019-12 瀏覽次數(shù):4715
日期:2019-12 瀏覽次數(shù):4497
日期:2019-12 瀏覽次數(shù):4776
日期:2019-12 瀏覽次數(shù):4410
日期:2019-12 瀏覽次數(shù):4932
日期:2019-12 瀏覽次數(shù):4930
日期:2019-12 瀏覽次數(shù):4692
日期:2019-12 瀏覽次數(shù):5257
日期:2019-12 瀏覽次數(shù):4684
日期:2019-12 瀏覽次數(shù):4487
日期:2019-12 瀏覽次數(shù):4584
日期:2019-12 瀏覽次數(shù):4465
日期:2019-12 瀏覽次數(shù):4731
日期:2019-12 瀏覽次數(shù):4549
日期:2019-12 瀏覽次數(shù):4584
日期:2019-12 瀏覽次數(shù):5953
日期:2019-12 瀏覽次數(shù):5032
日期:2019-12 瀏覽次數(shù):4403
日期:2019-12 瀏覽次數(shù):4429
日期:2019-12 瀏覽次數(shù):4507
日期:2019-12 瀏覽次數(shù):5242
日期:2019-12 瀏覽次數(shù):4366
日期:2019-12 瀏覽次數(shù):4339
日期:2019-12 瀏覽次數(shù):4623
日期:2019-12 瀏覽次數(shù):4232
日期:2019-12 瀏覽次數(shù):4531
Copyright ? 2013-2018 Tadeng NetWork Technology Co., LTD. All Rights Reserved.