Home  >  Article  >  CMS Tutorial  >  How to do paging in dedecms

How to do paging in dedecms

(*-*)浩
(*-*)浩Original
2019-07-13 14:15:173034browse

Sometimes when making a Dreamweaver template, it is necessary to achieve the home page paging effect, but the Dreamweaver homepage itself does not have a paging function, so how to achieve the Dreamweaver home page paging?

How to do paging in dedecms

There are two ways to achieve this:

Use arclist tag Ajax to implement Dreamweaver home page paging

1 .Introduce

<script language="javascript" type="text/javascript" src="{dede:global.cfg_cmsurl/}/include/dedeajax2.js"></script>

in the home page 2. Add

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

before or 3. Must contain in arclist tag tagid and pagesize parameters. The first is the cache name, and the second is the number of single page entries.

{dede:arclist tagid='index' pagesize='20'}
<li><a href="[field:arcurl/]" >[field:title/]</a></li>
<p>[field:info/]...</p>
{/dede:arclist}

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

{dede:arcpagelist tagid='index'/}

It can be used normally after testing, but considering that it is loaded with Ajax , will not be crawled and indexed by spiders, consider using another method to achieve it.

Cross-column ID to realize paging on DreamWeaver homepage

The cross-column ID can only write the last-level column ID, which is the column ID to which your article belongs;

You cannot use "Update Homepage HTML" or "One-click Update", you must use "Update Column HTML";

Homepage" channel cannot be set to dynamic.

When DedeCMS is paging, The links to the "first page" and "home page" of other paginations are different from the links to the channel, but they are actually the same page. Completely repeated pages will reduce the weight score.

More For DedeCMS related technical articles, please visit the DedeCMS Tutorial column to learn!

The above is the detailed content of How to do paging in dedecms. 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