网页特效代码_站长素材站移动版

DeDecms教程

主页 > CMS教程 > DeDecms教程 >

织梦DedeCMS实现首页arclist分页的教程

 织梦DedeCMS有时需要在首页进行分页,用自由列表不是很灵活方便,那么我们可以用ajax来实现arclist分页非常方便快捷。

  织梦DedeCMS实现首页arclist分页的教程

方法如下:

<script language="javascript" type="text/javascript" src="{dede:global.cfg_cmsurl/}/include/dedeajax2.js"></script>
<script>
function multi(pagenum,tagid)
{
var taget_obj = document.getElementById(tagid);
var taget_obj_page = document.getElementById("page_"+tagid);
myajax = new DedeAjax(taget_obj,false,false,'','','');
myajax.SendGet2("/plus/arcmulti.php?mtype=0&pnum="+pagenum+'&tagid='+tagid);
myajax = new DedeAjax(taget_obj_page,false,false,'','','');
myajax.SendGet2("/plus/arcmulti.php?mtype=1&pnum="+pagenum+'&tagid='+tagid);
DedeXHTTP = null;
}
</script>
{dede:arclist tagid='index' row='50' pagesize='10'}
<li>
    <h3><a href="[field:arcurl/]" style="color: #FF6633">[field:title/]</a></h3>
    <p>[field:info/]...</p>
</li>
{/dede:arclist}
{dede:arcpagelist tagid='index'/}

注:

tagid='index'是id标识
pagesize='10'是10条信息分一页
{dede:arcpagelist tagid='index'/}是分页标签

(责任编辑:admin)

    468x60