1、设计模版内容
设计一个网页,文件名为index.html,图片、css、js资源均保存在index_files目录下。
html文件编码为unicode,即(UTF-16LE带签名)
<meta http-equiv="Content-Type" content="text/html; charset=unicode" >
其中标题和正文部分空出来,用关键词代替:
- 标题 <!--WizHtmlTitle-->
- 正文 <!--WizHtmlContent-->
2、定义文件及目录结构约定
目录结构要求如下:
preview.html 为英文预览页
preview_zh-cn.html为中文预览页
meta.xml 为定义的xml
显示模版meta.xml定义如下
<?xml version="1.0" encoding="UTF-8"?>
<META>
<CLASS>display template file</CLASS>
<VERSION>1.2</VERSION>
<DESCRIPTION>wizbrother wizknowledge display template file formate</DESCRIPTION>
</META>
新建模版meta.xml定义如下
<?xml version="1.0" encoding="UTF-8"?>
<META>
<CLASS>new document template file</CLASS>
<VERSION>1.3</VERSION>
<DESCRIPTION>wizbrother wizknowledge new document template file formate</DESCRIPTION>
</META>
3、压缩为zip文档,改名为ziw
将整个目录压缩打包为 zip文档,注意,不是rar文档
更名为.ziw
4、复制到模版目录下
将ziw文件复制到对应的目录下,即可添加为模版
文档新建模版数据目录:My Knowledge\templates\new
显示模版数据目录:My Knowledge\templates\display