How to achieve paging in the Dreamweaver arclist tag?
How to implement paging with Dreamweaver arclist tag
First of all, you must add
<script language="javascript" type="text/javascript" src=" {dede:global.cfg_cmsurl/}/include/dedeajax2.js"></script>
in front of on the homepage Step 2: The following javascript code must be introduced:
<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>
Step 3: The tagid and pagesize parameters must be included in the arclist tag. The first is the cache name, and the second is the number of single page entries; for example:
{dede:arclist tagid='index' pagesize='5'} <li><b><a href="[field:arcurl/]" style="color: #FF6633">[field:title/]</a></b></li> <p class="my_tj_info">[field:info/]...</p> {/dede:arclist}
Step 4: The arcpagelist tag must exist, and the cache parameter tagid must be declared and the cache parameter must be consistent with the tagid in arclist. For example:
{dede:arcpagelist tagid='index'/}
Now paste a complete code for everyone’s testing reference:
<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' pagesize='5'} <li><b><a href="[field:arcurl/]" style="color: #FF6633">[field:title/]</a></b></li> <p class="my_tj_info">[field:info/]...</p> {/dede:arclist} {dede:arcpagelist tagid='index'/}
The above is the detailed content of How to implement paging in DreamWeaver arclist tags. For more information, please follow other related articles on the PHP Chinese website!