1、Dreamweaver默认打开后缀名为ftl的文件时设计视图为灰色
用编辑器打开 X:\Dreamweaver CS4\Configuration\DocumentTypes\MMDocumentTypes.xml
修改后如下:
<documenttype id="HTML" internaltype="HTML" winfileextension="html,htm,shtml,shtm,stm,tpl,lasso,xhtml,ftl" macfileextension="html,htm,shtml,shtm,tpl,lasso,xhtml,ssi,ftl" file="Default.html" writebyteordermark="false">
保存退出。
2、修改Dreamweaver编辑器
编辑->首选参数-> 文件类型/编辑器 中增加 flt格式
3. 修改tags.xml
如 X:\Dreamweaver\Configuration\ThirdPartyTags\Tags.xml
加入
< !-- FreeMarker Tag By hety-->
<directive_spec tag_name="ftl_b1" start_string="[#" end_string="]" detect_in_attribute="true" icon="TemplateExpr.gif" icon_width="17" icon_height="15"/>
<directive_spec tag_name="ftl_e1" start_string="[/#" end_string="]" detect_in_attribute="true" icon="TemplateExpr.gif" icon_width="17" icon_height="15"/>
<directive_spec tag_name="ftl_i" start_string="[@" end_string="/]" detect_in_attribute="true" icon="TemplateExpr.gif" icon_width="17" icon_height="15"/>
<directive_spec tag_name="ftl_b2" start_string="<#" end_string=">" detect_in_attribute="true" icon="TemplateExpr.gif" icon_width="17" icon_height="15"/>
<directive_spec tag_name="ftl_e2" start_string="</#" end_string=">" detect_in_attribute="true" icon="TemplateExpr.gif" icon_width="17" icon_height="15"/>
<directive_spec tag_name="ftl_v" start_string="${" end_string="}" detect_in_attribute="true" icon="TemplateExpr.gif" icon_width="17" icon_height="15"/>
重启下dreamweaver
本文介绍如何通过修改Dreamweaver的相关配置文件使编辑器能够支持并正确显示FTL( Freemarker Template Language)文件。具体步骤包括修改MMDocumentTypes.xml以添加对.ftl文件的支持、设置首选参数以增加FLT格式、以及修改Tags.xml来识别特定的FTL标签。

1821

被折叠的 条评论
为什么被折叠?



