Home > CMS Tutorial > DEDECMS > body text

How to implement paging in DreamWeaver arclist tags

藏色散人
Release: 2019-11-15 11:20:20
Original
2593 people have browsed it

How to implement paging in DreamWeaver arclist tags

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>
Copy after login

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,&#39;&#39;,&#39;&#39;,&#39;&#39;);
myajax.SendGet2("/plus/arcmulti.php?mtype=0&pnum="+pagenum+&#39;&tagid=&#39;+tagid);
myajax = new DedeAjax(taget_obj_page,false,false,&#39;&#39;,&#39;&#39;,&#39;&#39;);
myajax.SendGet2("/plus/arcmulti.php?mtype=1&pnum="+pagenum+&#39;&tagid=&#39;+tagid);
DedeXHTTP = null;
}
</script>
Copy after login

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=&#39;index&#39; pagesize=&#39;5&#39;}
<li><b><a href="[field:arcurl/]" style="color: #FF6633">[field:title/]</a></b></li>
<p class="my_tj_info">[field:info/]...</p>
{/dede:arclist}
Copy after login

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=&#39;index&#39;/}
Copy after login

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,&#39;&#39;,&#39;&#39;,&#39;&#39;);
myajax.SendGet2("/plus/arcmulti.php?mtype=0&pnum="+pagenum+&#39;&tagid=&#39;+tagid);
myajax = new DedeAjax(taget_obj_page,false,false,&#39;&#39;,&#39;&#39;,&#39;&#39;);
myajax.SendGet2("/plus/arcmulti.php?mtype=1&pnum="+pagenum+&#39;&tagid=&#39;+tagid);
DedeXHTTP = null;
}
</script>
{dede:arclist tagid=&#39;index&#39; pagesize=&#39;5&#39;}
<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=&#39;index&#39;/}
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template