發(fā)表日期:2019-12 文章編輯:小燈 瀏覽次數(shù):5108
不同于Wordpress,Phpcms默認不支持隨機文章調(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ù):5519
日期:2019-12 瀏覽次數(shù):4913
日期:2019-12 瀏覽次數(shù):4676
日期:2019-12 瀏覽次數(shù):4906
日期:2019-12 瀏覽次數(shù):5050
日期:2019-12 瀏覽次數(shù):4818
日期:2019-12 瀏覽次數(shù):5107
日期:2019-12 瀏覽次數(shù):4738
日期:2019-12 瀏覽次數(shù):5274
日期:2019-12 瀏覽次數(shù):5313
日期:2019-12 瀏覽次數(shù):5018
日期:2019-12 瀏覽次數(shù):5604
日期:2019-12 瀏覽次數(shù):5034
日期:2019-12 瀏覽次數(shù):4823
日期:2019-12 瀏覽次數(shù):4925
日期:2019-12 瀏覽次數(shù):4768
日期:2019-12 瀏覽次數(shù):5075
日期:2019-12 瀏覽次數(shù):4872
日期:2019-12 瀏覽次數(shù):4884
日期:2019-12 瀏覽次數(shù):6267
日期:2019-12 瀏覽次數(shù):5355
日期:2019-12 瀏覽次數(shù):4737
日期:2019-12 瀏覽次數(shù):4776
日期:2019-12 瀏覽次數(shù):4831
日期:2019-12 瀏覽次數(shù):5529
日期:2019-12 瀏覽次數(shù):4696
日期:2019-12 瀏覽次數(shù):4650
日期:2019-12 瀏覽次數(shù):4924
日期:2019-12 瀏覽次數(shù):4558
日期:2019-12 瀏覽次數(shù):4875
Copyright ? 2013-2018 Tadeng NetWork Technology Co., LTD. All Rights Reserved.