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