dedecms织梦二次开发标签总结大全好代码教程

什么都可以不好,心情不能不好;什么都可以缺乏,自信不能缺乏;什么都可以不要,快乐不能不要;什么都可以忘掉,健身不能忘掉。
1、获取所有的顶级栏目列表带链接: {dede:channel type='top' row='8' currentstyle='<li><a rel="nofollow noopener noreferrer" href='~typelink~' class='thisclass'>~typename~</a></li>"} <li><a rel="nofollow noopener noreferrer" href='[field:typelink/]'>[field:typename/]</a></li> {/dede:channel} 2、获取指定的顶级栏目带链接: {dede:type typeid='id'} <a rel="nofollow noopener noreferrer" href="[field:typelink/]">[field:typename/]</a> {/dede:type} 3、文章列表标题带链接 type 指定栏目调用标签 (>=DedeCMS 3,DedeCMS 4,DedeCMS 5) 名称:type 功能:获取指定栏目链接 语法: {dede:type} <a rel="nofollow noopener noreferrer" href="[field:typelink /]">[field:typename /]</a> {/dede:type} 文件: \include\taglib\type.lib.php function lib_type(&$ctag,&$refObj) 默认底层模板: part_type_list.htm 参数: typeid=0 指定栏目ID,如果没有指定则获取当前页面下的环境变量 底层字段: id,typelink,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath,listman global 全局配置变量标签 (>=DedeCMS 3,DedeCMS 4,DedeCMS 5) 名称:global 功能:获取系统全局配置变量内容 语法: {dede:global.cfg_webname/} [field:global.cfg_webname/] 用于底层模板中 文件: 系统模板引擎 field 内容变量 名称:field 功能:用于获取特定栏目或者档案的字段值及常用的环境变量值 语法: {dede:field name='字段名'/} 或者 {dede:field.字段名/} 文件: 所有视图类中 默认底层模板: 无 参数: 板块模板:phpurl,indexurl,indexname,templeturl,memberurl, specurl 列表模板:position,title,phpurl,templeturl,memberurl,indexurl,indexname,specurl,栏目表dede_arctype的所有字段其中 position 为 “栏目一 > 栏目二” 这样形式的链接,title则为这种形式的标题 文档模板:position,phpurl,templeturl,memberurl,indexurl,indexname,specurl,id(同 ID,aid) 文档所有内容字段: 档案archives表 和 附加表的所有字段。 channel 获取栏目列表标签 名称:channel 功能:织梦常用标记,通常用于网站顶部以获取站点栏目信息,方便网站会员分类浏览整站信息 语法: {dede:channel type='top' row='8' current} <li><a rel="nofollow noopener noreferrer" href='[field:typelink/]'>[field:typename/]</a> </li> {/dede:channel} 文件: \include\taglib\channel.lib.php function lib_channel(&$ctag,&$refObj) 默认底层模板: channel_list.htm 参数: typeid = '0' 栏目ID reid = '0' 上级栏目ID row = '100' 调用栏目数 col = '1' 分多少列显示(默认为单列) type = 'son | sun' son表示下级栏目,self表示同级栏目,top顶级栏目 currentstyle = '' 应用样式 底层字段: ID(同 id),typeid, typelink, typename, typeurl,typedir(仅表示栏目的网址) 例: {dede:channel type='top'} <a rel="nofollow noopener noreferrer" href='[field:typelink /]'>[field:typename/]</a> {/dede:channel} currentstyle中支持~rel~、~id~、~typelink~、~typename~ 注:在没有指定typeid的情况下,type标记与模板的环境有关,如,模板生成到栏目一,那么type='son'就表示栏目一的所有子类 范例: 这个标签是全局常用标记,主要用于显示页面的栏目分类,我们可以查看默认模板\templets\default\head.htm中的相关代码: {dede:channel type='top' current} <li><a rel="nofollow noopener noreferrer" href='[field:typeurl/]'>[field:typename/]</a></li>{/dede:channel} 这里的栏目可以通过后台进行设置,栏目显示顺序按照排序的高低进行,我们可以在系统后台[核心]-[栏目管理]中进行栏目设置: autochannel 指定栏目 (> DedeCMS 4,DedeCMS 5) 名称:autochannel 功能:指定排序位置的单个栏目的链接 语法: {dede:autochannel partsort='2' typeid=1} <a rel="nofollow noopener noreferrer" href='[field:typelink/]'>[field:typename/]</a> {/dede:autochannel} 文件: \include\taglib\autochannel.lib.php function lib_autochannel(&$ctag,&$refObj) 默认底册模板: part_autochannel.htm 参数: partsort = '0' 栏目所在的排序位置 typeid='0' 获取单个栏目的顶级栏目 底层字段: id,typelink,typedir,isdefault,defaultname,ispart,namerule2,typename,moresite,siteurl,sitepath,listman

以上就是dedecms织梦二次开发标签总结大全好代码教程。有人不理解你很正常,不要做太多的解释,毕竟不理解那是他的事不是你的事。更多关于dedecms织梦二次开发标签总结大全好代码教程请关注haodaima.com其它相关文章!

您可能有感兴趣的文章
dedecms如何实现任意页面调用当前会员信息的方

DedeCMS织梦判断是否有二级栏目输出HTML代码

织梦dedecms dede:arclist输出取消换行符

dedecms文章添加字段填栏目id,内容页调用字段里的栏目文章

dedeCMS首页列表页文章页调用tag的方法