" on the homepage; then introduce the "function multi()" code; then set "tagi" and "tagi" in the arclist tag pagesize" parameter can achieve paging."/> " on the homepage; then introduce the "function multi()" code; then set "tagi" and "tagi" in the arclist tag pagesize" parameter can achieve paging.">

Home  >  Article  >  CMS Tutorial  >  How to implement paging in DreamWeaver arclist tags

How to implement paging in DreamWeaver arclist tags

藏色散人
藏色散人Original
2019-11-15 11:20:202573browse

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>

in front of 9c3bca370b5104690d9ef395f2c5f8d1 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>

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}

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;/}

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;/}

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!

Statement:
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