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,'','',''); myajax.SendGet2("{dede:global.cfg_basehost/}{dede:global.cfg_phpurl/}/arcmulti.php?mtype=0&pnum="+pagenum+'&tagid='+tagid); myajax = new DedeAjax(taget_obj_page,false,false,'','',''); myajax.SendGet2("{dede:global.cfg_basehost/}{dede:global.cfg_phpurl/}/arcmulti.php?mtype=1&pnum="+pagenum+'&tagid='+tagid); DedeXHTTP = null; } --> </script>
Column 5 pagination List tag:
The code is as follows:
{dede:arclist typeid='1,2,3,4' row='100' titlelen='50' infolen='100' imgwidth='120' imgheight='40' listtype='all' orderby='pubdate' keyword='' channelid='1' tagid='dedecms' pagesize='20'} [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='1,3,4,5,6,7,8,9' noflag=h} //表示调用10条 标题长度为50 频道id为13456789 非头条的信息 <div class="indexbox"> [field:array runphp='yes']@me = (strpos(@me['litpic'],'defaultpic') ? "" : "<a style='float:left' href='{@me['arcurl']}'><img alt='{@me['title']}' src='{@me['litpic']}' height=70 /></a>"); [/field:array] //表示 有图片则调用缩略图 没有则不显示 <h2><a href="[field:arcurl/]">[field:title/]</a> [field:senddate runphp='yes'] $ntime = time(); $oneday = 3600 * 24; if(($ntime - @me)<$oneday) @me = "<span style='color:red;font-size:12px;'>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!