DEDEcms默认模板文件夹(templets)的各文件含义

2015-09-09dedecms教程
107

下面主要讲解以下几个地方
1,DEDEcms默认模板文件夹(templets)的各文件含义
2,模板风格的存放形式以位置;
3,模板风格的命名规则;
4,模板风格的定义方法;
 

一,模板存放形式

在织梦(DedeCMS)系统中,所有的模板存放形式均是以文件的形式存放在系统模板目录(templets)下的默认模板风格目录里。

二,模板命名规则

刚才我们了解到,织梦的模板风格是以文件形式存放的。它的命名规则基本上按照如下形式:

网站首页:index.htm
封面模板:index_模型识别ID.htm
列表模板:list_模型识别ID.htm
内容模板:article_article.htm

当然,这只是通常情况下的命名规则。实际上,在织梦(DedeCMS)里模板文件的命名是任意的。只要您创建并设置好就可以。当然,为了让这个任意变得更加具体,我也给大家几个注意的地方:

  1. 文件名称请不要含有中文
  2. 文件后缀请以.htm结尾
  3. 创建好以后,到网站后台去设置并应用

三,模板的设置方法

当我们创建好了模板之后,您可以登陆网站后台,切换到『系统』选项卡,点击『系统基本参数』,将里面的“模板默认风格”表单填写为您新建的模板文件夹名称,如下图:


点击保存提交即可。
当然,如果您的列表页、内容页、封面页模板不是按照上面的标准格式创建,那么就请继续切换到『核心』选项卡,点击『网站栏目管理』,进入您需要修改的栏目编辑界面,并切换到『高级选项』,把你们的模板文件名修改为您自己的模板,如下图:

 

 

四,默认模板含义

我们现在讲的这个模板主要是讲它的一些目录和文件存放位置以及它作用。

|-- templets 默认模板目录
|-- templets -- default 默认模板风格目录
|-- templets -- default -- images 默认模板所用到相关图片存放目录
|-- templets -- default -- js 默认模板所用到相关JS存放目录
|-- templets -- default -- style 默认模板所用到的相关CSS样式文件存放目录;
|-- templets -- default -- advancedsearch.htm 自定义模型高级搜索模板
|-- templets -- default -- ajaxfeedback.htm 前台Ajax无刷新评论模板
|-- templets -- default -- article_article.htm 自带文章模型内容页模板
|-- templets -- default -- article_article_frame.htm 自带文章模型内容页模板(支持二级域名的备用模板)
|-- templets -- default -- article_article1.htm 自带文章模型内容页模板(随机备用)
|-- templets -- default -- article_article2.htm 自带文章模型内容页模板(随机备用)
|-- templets -- default -- article_default.htm 系统模型内容页不存在时的默认模板
|-- templets -- default -- article_default_sg.htm 独立模型内容页不存在时的默认模板
|-- templets -- default -- article_image.htm 自带图集模型内容页模板
|-- templets -- default -- article_image_cl.htm 自带图集模型内容页可选模板
|-- templets -- default -- article_image_frame.htm 自带图集模型内容页可选模板
|-- templets -- default -- article_image_new.htm 自带图集模型内容页可选模板
|-- templets -- default -- article_infos.htm 自带分类信息模型内容页模板
|-- templets -- default -- article_shop.htm 自带商品模型内容页模板
|-- templets -- default -- article_soft.htm 自带软件模型内容页模板
|-- templets -- default -- article_soft_frame.htm 自带软件模型内容页可选模板
|-- templets -- default -- article_spec.htm 专题模型内容页可选模板
|-- templets -- default -- article_spec_test.htm 无用模板,忽略
|-- templets -- default -- footer.htm 前台通用底部模板
|-- templets -- default -- googlemap.htm 前台Goolge地图模板
|-- templets -- default -- head.htm 前台通用头部模板
|-- templets -- default -- head2.htm 前台通用头部可选模板
|-- templets -- default -- index.htm 前台网站首页模板
|-- templets -- default -- index_article.htm 自带文章模型频道封面页模板
|-- templets -- default -- index_default.htm 系统模型封面页模板不存在时默认模板
|-- templets -- default -- index_default_sg.htm 独立表单模型封面页模板不存在时默认模板
|-- templets -- default -- index_image.htm 自带图集模型封面页模板
|-- templets -- default -- index_infos.htm 自带分类信息模型封面页模板
|-- templets -- default -- index_shop.htm 自带商品模型封面页模板
|-- templets -- default -- index_soft.htm 自带软件模型封面页模板
|-- templets -- default -- infosw9_index.htm 无效模板,忽略
|-- templets -- default -- infosw9_list.htm 无效模板,忽略
|-- templets -- default -- list_article.htm 自带文章模型栏目列表页模板
|-- templets -- default -- list_default.htm 系统模型列表页模板不存在时默认模板
|-- templets -- default -- list_default_sg.htm 独立表单模型列表页模板不存在时默认模板
|-- templets -- default -- list_free.htm 自由列表模板
|-- templets -- default -- list_image.htm 自带图集模型列表页模板
|-- templets -- default -- list_infos.htm 自带分类信息模型列表页模板
|-- templets -- default -- list_shop.htm 自带商品模型列表页模板
|-- templets -- default -- list_soft.htm 自带软件模型列表页模板
|-- templets -- default -- list_spec.htm 自带专题模型列表页模板
|-- templets -- default -- search.htm 搜索结果页模板
|-- templets -- default -- singlepage.htm 单页文档模板
|-- templets -- default -- tag.htm 默认TAG标签首页模板
|-- templets -- default -- taglist.htm 默认TAG标签列表模板

|-- templets -- lurd 默认Lurd相关模板风格目录(在前台不起作用,可忽略)

|-- templets -- plus 默认plus杂项功能相关模板风格目录
|-- templets -- plus -- feedback_quote_ajax.htm 前台Ajax评论引用模板
|-- templets -- plus -- feedback_templet.htm 评论页模板
|-- templets -- plus -- feedback_quote.htm 评论页引用模板
|-- templets -- plus -- bookfeedback_confirm.htm 小说评论页确认模板
|-- templets -- plus -- bookfeedback_quote.htm 小说评论引用模板
|-- templets -- plus -- bookfeedback_templet.htm 小说评论页模板
|-- templets -- plus -- bookfeedback_templet_js.htm 小说评论JS调用模板
|-- templets -- plus -- car.htm 购物车模板
|-- templets -- plus -- carbuyaction.htm 提交购买模板
|-- templets -- plus -- comments_frame.htm 评论二级域名模板
|-- templets -- plus -- digg_frame.htm 文档Digg二级域名模板
|-- templets -- plus -- download_links_templet.htm 下载地址页模板
|-- templets -- plus -- erraddsave.htm 错误提交页模板
|-- templets -- plus -- feedback_confirm.htm 评论确认页模板
|-- templets -- plus -- feedback_templet_js.htm 评论JS调用模板
|-- templets -- plus -- flink-add.htm 友情链接申请模板
|-- templets -- plus -- flink-list.htm 友情链接页模板
|-- templets -- plus -- guestbook.htm 留言薄插件模板
|-- templets -- plus -- guestbook-admin.htm 留言薄管理员模板
|-- templets -- plus -- guestbook-user.htm 留言薄用户模板
|-- templets -- plus -- heightsearch.htm 高级搜索页模板
|-- templets -- plus -- js.htm JS文件生成模板
|-- templets -- plus -- list_diyform.htm 自定义表单列表模板
|-- templets -- plus -- plus_foot.htm 杂项插件底部模板
|-- templets -- plus -- post_diyform.htm 自定义表单提交模板
|-- templets -- plus -- recommend.htm 文档推荐模板
|-- templets -- plus -- rss.htm 前台RSS文件模板
|-- templets -- plus -- rssmap.htm 前台RSS地图模板
|-- templets -- plus -- shops_action_payment.htm 商城订单购买页模板
|-- templets -- plus -- showphoto.htm 图集浏览模板
|-- templets -- plus -- sitemap.htm 网站地图模板
|-- templets -- plus -- view_diyform.htm 自定义表单浏览模板
|-- templets -- plus -- view_msg.htm 通用提示窗口模板
|-- templets -- plus -- view_msg_catalog.htm 栏目窗口提示模板
|-- templets -- plus -- vote.htm 投票结果显示模板
|-- templets -- plus -- win_templet.htm 通用提示模板

|-- templets -- system 默认各类系统底层模板模板风格目录(一般情况下无需变动)
|-- templets -- templet-dirlist.inc 默认模板文件夹配置文字说明
|-- templets -- templet-filelist.inc 默认模板文件名称配置说明
|-- templets -- templet-pluslist.inc 默认plus杂项功能文件名称配置说明

以上所列出来的仅供参考

The End

相关推荐

Dedecms织梦CMS如何添加自定义函数
我们在使用dedecms时候,需要拓展函数,那么这个函数需要写在哪个文件中呢?一般来说,需要写在:include/extend.func.php中,当然也可以写在其他公共文件中方便调用,以下是几个自定义函数示例...
2025-10-05 dedecms教程
80

dedecms怎么做判断?怎么在一个标签中输入另外一个标签?
我们在使用织梦DedeCMS系统程序开发网站中,经常遇到需要对文章标题进行字数限制,通常做法是在a标签中加入一个title属性,让鼠标放上去的时候显示完整标题。但是标题被剪裁掉一些字符而不完整,下面跟版网的小编就为你推荐另外几种标题调用方式,如进行标题...
2025-07-05 dedecms教程
69

dedecms怎样设置给图片添加水印
dedecms怎样设置给图片添加水印,具体步骤为: 一、进入系统基本参数中的附件设置,启用是否使用图片水印选项; 二、在图像水印设置中选择文字或图片水印类型,文字水印可调整字体、颜色、透明度及位置,图片水印则需上传png格式的半透明logo,并合理设置大...
2025-07-01 dedecms教程
147

dedecms织梦列表页字段怎么做判断
用到dedecms时候,有时候需要对文章列表、arclist输出时候的字段做判断显示,比如缩略图没有则不显示,有的时候就显示图片,并且固定尺寸,这个要怎么操作呢? 关于列表字段内自定义字段的调用方法,有数据则显示无数据则不显示(备注:limit=3,1意思是从第4...
2025-07-01 dedecms教程
68

织梦内容页使用if判断某个字段是否为空
我们在使用织梦dedecms时候,如何使用if判断某个字段是否为空呢?我们以文章页自定义字段website为例:使用if语句判断website网址是否为空,如果有显示website并加上网址,如果没有就不显示。 {wmd:field.website runphp='yes'}if(@me'') {@me = 'a href="'...
2025-06-21 dedecms教程
171

dedecms全局变量如何使用?
在使用dedecms的时候,全局变量用于存放全站通用信息。用户可通过后台模板全局变量管理添加或编辑变量,例如设置cfg_phone保存客服电话。调用时使用{wmd:global.cfg_变量名/}语法,在.htm模板或启用标签解析的文章内容中显示变量值。 在使用 DedeCMS 建站时...
2025-06-17 dedecms教程
138