Page History
...
Warning |
---|
在内容库里编辑模板脚本对评估,制造原型,或较小的项目比较理想。然后,长期来说这不利于维护。不要在生产环境中这样做。我们强烈建议您在一个版本控制系统中存储脚本,并将它们打包进一个项目模块。 |
参考模板样例 > 编辑模板脚本里更多信息。
STK脚本
STK template scripts are in the classpath of the webapp. Copies are editable in-place in STK > Templates. STK scripts are written in FreeMarker.
STK模板脚本在网络应用程序的类路径中。其副本在STK > Templates里就可以编辑。STK脚本是用FreeMarker写的。
脚本存储在The scripts are stored in child folders of the /templating-kit
folder:文件夹的子文件夹里:
components
contains component templates sorted by component type.包含按照组件类型分类的组件模板。pages
contains themain
page script and area scripts in subfolders.
This structure follows the template prototype structure. Area templates referenced in the template prototype are stored in the /global
folder.
main script
main
is the the master page script (Git). It is a good starting point to understand the system. It initializes the page editor on the author instance using the @cms.init
directive. It also contains the logic to set the bodyClass
and bodyID
.
The main script calls areas to render themselves using the @cms.area
directive. It renders the navigation using the #include
directive. The main
script wraps the areas in three DIV elements that creates a flexible page grid.
...
- 包含
main
页面脚本,区域脚本在子文件夹里。
此结构遵循模板原型结构。在模板原型里引用的区域模板都被存在/global
文件夹里。
main脚本
main
是主页面脚本(Git)。它是理解这个系统的一个好起点。它在编写实例上使用@cms.init
指令初始化页面编辑器,也包含了设置bodyClass
和bodyID
的逻辑。
main脚本使用@cms.area
指令来调用区域绘制它们自身。它使用#include
指令绘制导航。main
脚本用三个DIV元件包装区域,建立了一个可调的页面网格。
区域脚本
See STK areas for descriptions of STK area scripts.
...