Page History
...
这里是基于stkArticle
模板的一个新页面上的自动生成组件。
特性组件
特性模板主要由在页面模板的特性模板主要通过页面模板的main/content
区域绘制的组件区分开。区域绘制的组件标识。stkImagGallery
,stkFAQ
,stkSiteMap
等组件在stkImageGallery
, stkFAQ
, stkSiteMap
等模板的该区域绘制。组件由页面模板自动绘制,由自动生成特性完成。
组件定义与其他组件使用的配置方法,您可以在特性组件定义与其他组件配置方法相同,您可以在STK > 模板定义 /components/features
里查看。
下列所示的stkSiteMap
组件:
- 使用使用了
SiteMapParagraphModel
,包含了业务逻辑,并使,这个模型类包含业务逻辑,并使maxLevels
,、showSiteMapRoot
,和titleToUse
属性对脚本可用。 - 由
siteMap.ftl
脚本绘制,该脚本可在脚本绘制。该脚本在STK > 模板/templating-kit/components/features/siteMap.ftl
找到。。
Advanced Tables - Table Plus | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||
|
当一个基于stkSiteMap
模板的页面被创建时,组件被使用区域定义(见下表)中配置的缺省值绘制。编辑者可以在模板的页面被创建时,组件使用区域定义中配置的缺省值(见下表)绘制。编辑者可以在STK > 对话框定义 /components/features/stkSiteMap
下配置的stkSiteMap
组件对话框里修改这些缺省值。查看组件对话框里修改这些缺省值。您也可以查看demo-project/service/site-map
页了解它是如何工作的。
在stkSiteMap
页面模板的页面模板里,areas/main/areas/content
节点下:节点的:
/autoGeneration
节点在generatorClass
节点的CopyGenerator
类里分配。该生成器创建节点和属性,其中属性和链接到类里分配。该生成器创建节点和属性,使他们与templateId
属性并且只适用于属性里链接到的且只适用于autoGeneration
节点的配置一致。- 在
autoGeneration/content/singleton
节点里: - 缺省值被分配给显示给组件模型的属性。组件模型显示的属性使用缺省值。
nodeType
被设置为设置为mgnl:component
。templatedId
属性引用stkSiteMap
组件定义,使用<module name>:<path to component>
结构。
Advanced Tables - Table Plus | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
这里是这是stkSiteMap
组件和demo-project/service/site-map
页面上的对话框。
...
在上面的对话框里,maxLevels
属性被设置为4
。这是因为模板定义里的缺省值,这是因为模板定义里的缺省值3
在此页上已经被覆写了。新值4
被存在JCR中,您可以在工具 > JCR /demo-project/service/site-map/content/singleton
中验证。
Advanced Tables - Table Plus | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||
|
如果您想要在模板定义中修改一个自动生成的组件的缺省设置,您需要首先在JCR浏览器中删除这个内容节点(如果您想要在模板定义中修改一个自动生成组件的默认设置,您需要首先在JCR浏览器中删除这个内容节点(singleton
)并刷新该页。系统会使用新的模板定义属性在页面上重新创建该组件。这是一个已知问题,您可以在MAGNOLIA-4482里跟踪进展。