织梦Dedecms获取上一级栏目名称及链接代码 {dede:field name=typeid runphp=yes} global $dsql; /*获取当前栏目信息*/ $typeid = @me; $query = SELECT reid FROM dede_arctype where id = $typeid; $rs = $dsql-GetOne($query); $reid = $rs[reid];//获取到栏目的上级栏目 /*获取上级栏目...
织梦autoindex从02开始到10的写法 写法如下: {dede:arclist } [field:global name=autoindex runphp=yes]if(@me%10==0){@me=10;}else{@me=0.@me=$GLOBALS[autoindex]+1;}[/field:global] {/dede:arclist}...
织梦dede列表页实现隔行_多行随意换色 标签说明: arclist 标签下使用 [field:global.autoindex/] 默认从1开始 channel 标签下使用 [field:global.autoindex/] 默认从0开始 channelartlist 标签下使用 {dede:global.itemindex/} 默认从1开始 arclist 从0开始[field:gl...
arclist的分页使用方法 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)...
织梦dedecms channel标签中使用php和sql {dede:channel type=son } [field:id runphp=yes] global $dsql; $sql=Select content from arctype where id=@me; $row=$dsql-getone(); ...... ..... [/field:id] {/dede:channel}...
织梦Dedecms获取上一级栏目名称及链接 {dede:field name=typeid runphp=yes} global $dsql; /*获取当前栏目信息*/ $typeid = @me; $query = SELECT reid FROM dede_arctype where id = $typeid; $rs = $dsql-GetOne($query); $reid = $rs[reid];//获取到栏目的上级栏目 /*获取上级栏目...
织梦添加一个函数,实现任意字段调用 先上代码 function table($table, $field, $id) { global $dsql; $primarys = array(); $table = strpos($table, #@_) === false?(strpos($table, dede_) ===false?.$table:str_replace(dede_,,$table)):$table; $dsql - Execute(me,SHOW COLUMNS FROM `$table`); w...
dede根据任意栏目id获取顶级栏目名称的自定义函数 //获取顶级栏目名 function GetTopTypenameById($id) { global $dsql; $row = $dsql-GetOne(SELECT typename,topid FROM idea_arctype WHERE id= $id); if ($row[topid] == 0) { return $row[typename]; } else { $row1 = $dsql-GetOne(SELECT typename FROM ide...
dedecms织梦dede:channel里面调用文章列表 {dede:channel type=son noself=yes}[field:id runphp=yes]global $dsql;$sql = SELECT arc.* FROM `mydiy_archives` arc where arc.arcrank-1 AND arc.typeid = @me ORDER BY arc.id desc limit 10;$dsql-SetQuery($sql);$dsql-Execute(t);$result = ;while($row = $ds...
dedecms arclist列表循环调用顶级栏目名称方法 添加到include/extend.func.php里 function gettopname($aid){ global $dsql; $sql = SELECT tt.typename,tt.typedir from arctiny as a join arctype as t on a.typeid = t.id join arctype as tt on t.topid=tt.id where a.id = $aid ; $row = $dsql-GetOne($sql)...
织梦arclist标签实现分页的方法 首先 必须在首页的/head前面加上 script language=javascript type=text/javascript src={dede:global.cfg_cmsurl/}/include/dedeajax2.js/script 第二步:必须引入以下javascript代码: script function multi(pagenum,tagid) { var taget_ob...
织梦DEDECMS调用文章TAG标签并加上链接的方法 1.如果是列表页使用以下代码: [field:id runphp=yes] global $cfg_cmspath; $tags = GetTags(@me); $revalue =; $tags = explode(,,$tags); foreach($tags as $key=$value){ if($value){ $revalue .=a href=.$cfg_cmspath./tags.php?/.$value./.$value./a...