Home  >  Article  >  CMS Tutorial  >  How does dede call articles or thumbnail lists in other columns with paging effect?

How does dede call articles or thumbnail lists in other columns with paging effect?

藏色散人
藏色散人Original
2019-12-19 09:48:351671browse

How does dede call articles or thumbnail lists in other columns with paging effect?

dedeHow to call articles or thumbnail lists in other columns with paging effect?

arclist call cannot set the pagesize attribute, so the article cannot be paginated. However, it seems that the list cannot call articles in the same column. How to achieve this now? Friends with similar needs can refer to this article

Recommended study: 梦Weavercms

Question i: I am making a website with 5 Column, the fifth column wants to call all the articles in the first four columns to create a summarized article collection. I found that the pagesize attribute cannot be set by calling arclist, so the article cannot be paginated. However, it seems that the list cannot call articles in the same column. How to achieve this now?

Answer: Call dedeajax2.js at the top of your 5th column template

Add

to the head part and the code is as follows:

<script language="javascript"> 
<!-- 
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("{dede:global.cfg_basehost/}{dede:global.cfg_phpurl/}/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("{dede:global.cfg_basehost/}{dede:global.cfg_phpurl/}/arcmulti.php?mtype=1&pnum="+pagenum+&#39;&tagid=&#39;+tagid); 
DedeXHTTP = null; 
} 
--> 
</script>

Column 5 pagination List tag:

The code is as follows:

{dede:arclist typeid=&#39;1,2,3,4&#39; row=&#39;100&#39; titlelen=&#39;50&#39; infolen=&#39;100&#39; imgwidth=&#39;120&#39; imgheight=&#39;40&#39; listtype=&#39;all&#39; orderby=&#39;pubdate&#39; keyword=&#39;&#39; channelid=&#39;1&#39; tagid=&#39;dedecms&#39; pagesize=&#39;20&#39;} 
[field:title/]

Paging tag plus {dede:arcpagelist tagid='dedecms'/}

Use the arclist tag to call other column article lists

A demo tag:

The code is as follows:

{dede:arclist row=10 titlelen=50 typeid=&#39;1,3,4,5,6,7,8,9&#39; noflag=h} 
//表示调用10条 标题长度为50 频道id为13456789 非头条的信息 
<div class="indexbox"> 
[field:array runphp=&#39;yes&#39;]@me = (strpos(@me[&#39;litpic&#39;],&#39;defaultpic&#39;) ? "" : "<a style=&#39;float:left&#39; href=&#39;{@me[&#39;arcurl&#39;]}&#39;><img alt=&#39;{@me[&#39;title&#39;]}&#39; src=&#39;{@me[&#39;litpic&#39;]}&#39; height=70 /></a>"); [/field:array] 
//表示 有图片则调用缩略图 没有则不显示 
<h2><a href="[field:arcurl/]">[field:title/]</a> 
[field:senddate runphp=&#39;yes&#39;] 
$ntime = time(); 
$oneday = 3600 * 24; 
if(($ntime - @me)<$oneday) @me = "<span style=&#39;color:red;font-size:12px;&#39;>new !</span>"; 
else @me = ""; 
[/field:senddate] 
//24小时内发布的文章加NEW!字样 
</h2> 
{/dede:arclist}

Write the CSS style yourself.

The above is the detailed content of How does dede call articles or thumbnail lists in other columns with paging effect?. 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