...
Advanced Tables - Table Plus |
---|
heading | 0 |
---|
multiple | false |
---|
enableHeadingAttributes | false |
---|
enableSorting | false |
---|
class | m5-configuration-tree |
---|
enableHighlighting | false |
---|
|
|
...
Advanced Tables - Table Plus |
---|
heading | 0 |
---|
multiple | false |
---|
enableHeadingAttributes | false |
---|
enableSorting | false |
---|
class | m5-configuration-tree |
---|
enableHighlighting | false |
---|
|
节点名 | 值 |
---|
pages pages | | demo-features | | stkHome | | stkSection | | stkArticle | |
|
这些模板可供编辑者在页面应用里选择使用。它们可以出现在页面应用的模板下拉菜单里,只需要:
...
Section |
---|
Column |
---|
| 模板原型 Advanced Tables - Table Plus |
---|
heading | 0 |
---|
multiple | false |
---|
enableHeadingAttributes | false |
---|
enableSorting | false |
---|
class | m5-configuration-tree |
---|
enableHighlighting | false |
---|
| 节点名 | 值 |
---|
default | | templates | | prototype | | areas | | main | | areas | | intro | | areas | | infoBlock | |
|
|
Column |
---|
| 模板定义 Advanced Tables - Table Plus |
---|
heading | 0 |
---|
multiple | false |
---|
enableHeadingAttributes | false |
---|
enableSorting | false |
---|
class | m5-configuration-tree |
---|
enableHighlighting | false |
---|
| 节点名 | 值 |
---|
pages | | stkEvent | | areas | | main | | areas | | intro | | areas | | infoBlock | |
|
|
|
为了使模板具有唯一性,您可以在模板定义里:
...
有两个例外:
stkGlossary
模板使用它自己的modelClass
,即GlossaryTemplateModel
,这个模型类通过扩展STKPageModel<STKPage>
来完成按字母排序的词汇表。
Advanced Tables - Table Plus |
---|
heading | 0 |
---|
multiple | false |
---|
enableHeadingAttributes | false |
---|
enableSorting | false |
---|
class | m5-configuration-tree |
---|
enableHighlighting | false |
---|
|
节点名 | 值 |
---|
pages pages | | stkGlossary | | areas | | bodyID | glossary | category | feature | class | info.magnolia.module.templatingkit.templates.pages.STKPage | dialog | standard-templating-kit:pages/glossary/stkGlossaryProperties | i18nBasename | info.magnolia.module.templatingkit.messages | modelClass | info.magnolia.module.templatingkit.templates.GlossaryTemplateModel | renderType | stk | subcategory | glossary | title | templates.stkGlossary.title | visible | true |
|
在页面编辑器里,页面显示到内部或外部重定向的路径,但在预览里,则显示目标页面。/demo-project/service/m5-campaign
页面使用的是stkRedirect
模板。
...
extends属性
...
Advanced Tables - Table Plus |
---|
heading | 0 |
---|
multiple | false |
---|
enableHeadingAttributes | false |
---|
enableSorting | false |
---|
class | m5-configuration-tree |
---|
enableHighlighting | false |
---|
|
节点名 | 值 |
---|
pages | stkArticlepages | | stkArticlestkLargeArticle | | stkLargeArticle | | stkNews | | areas | | dialog | standard-templating-kit:pages/news/stkNewsProperties | extends | /modules/standard-templating-kit/templates/pages/stkArticle | subcategory | news | title | templates.stkNews.title |
|
...
Advanced Tables - Table Plus |
---|
heading | 0 |
---|
multiple | false |
---|
enableHeadingAttributes | false |
---|
enableSorting | false |
---|
class | m5-configuration-tree |
---|
enableHighlighting | false |
---|
|
节点名 | 值 |
---|
pages pages | | demo-features | | stkSectionNoExtras | | areas | | extends | /modules/standard-templating-kit/templates/pages/stkSection | title | Section no Extras | stkSectionNoHeader | | stkSectionFloating | |
|
extends属性也可设置为
override
来覆写部分扩展配置。参考使组件可用中的样例。
...
Advanced Tables - Table Plus |
---|
heading | 0 |
---|
multiple | false |
---|
enableHeadingAttributes | false |
---|
enableSorting | false |
---|
class | m5-configuration-tree |
---|
enableHighlighting | false |
---|
|
节点名 | 值 |
---|
stkSection | | areas | | main | | areas | | intro | | class | info.magnolia.module.templatingkit.templates.MainAreaIntro | dialog | standard-templating-kit:pages/section/stkSectionIntro | divID | page-intro | showAuthorDate | false | showTextFeatures | false |
|
使组件可用
...
Advanced Tables - Table Plus |
---|
heading | 0 |
---|
multiple | false |
---|
enableHeadingAttributes | false |
---|
enableSorting | false |
---|
class | m5-configuration-tree |
---|
enableHighlighting | false |
---|
|
节点名 | 值 |
---|
stkArticlestkArticle | | areas | | promos | | availableComponents | | stkTextImage | | id | standard-templating-kit:components/content/stkTextImage | stkQuotedText | | id | standard-templating-kit:components/content/stkQoutedText |
|
...
...
...
您可以这样来测试:以样例编辑者Eric(username/password=eric
)的身份登录,尝试在任意文章页面的content
区域添加stkHTML
组件。结果将会是,stkHTML
组件在选择器对话框里不可用。
...
特性模板覆写了默认类型,将其改为single
。特性组件在/areas/main/areas/content/autoGeneration/content/singleton
节点里添加。参考特色组件和自动生成的组件。
Advanced Tables - Table Plus |
---|
heading | 0 |
---|
multiple | false |
---|
enableHeadingAttributes | false |
---|
enableSorting | false |
---|
class | m5-configuration-tree |
---|
enableHighlighting | false |
---|
|
节点名 | 值 |
---|
stkImageGallery | | areas | | main | | areas | | content | | autoGeneration | | content | | singleton | | maxImages | 9 | nodeType | mgnl:component | templateId | standard-templating-kit:components/features/stkImageGallery | generatorClass | info.magnolia.rendering.generator.CopyGenerator | type | single |
|
使能区域
大多数区域在原型里是使能的,因此需要在特定的模板定义里禁用,改变默认设置。您可以将/areas/<area name>
内容节点下的enabled
属性节点值设置为false
来做到。另一方面,类似stage
或platform
的区域由于很少使用,所以在原型里是不使能的,这种情况就需要设置enabled
属性值为true
来改变。
...
- 对扩展模板与基本模板有着同样的作用。例如,如果您在
stkArticle
上禁用extras
,所有内容模板上都会禁用该区域;要在您的扩展模板上使能该区域,需要在扩展模板上添加enabled
属性并设置为true
。 - 可能影响页面布局。以下是一些样例,样例中的结果主要是由于页面排列和内容包装的方法造成的。
- 当
extras
被禁用时,main
区域会展开占用所有的可用空间。
- 当
promos
被禁用时,原本它占用的可用空间里什么都不会绘制。
- 当
base
、stage
或是sectionHeader
被禁用时,内容会上移显示,就像被禁用的区域不曾存在一样。区域在使能但不包含任何内容时,预览模式里也会发生同样的情况。下面的截图为禁用了stage
的stkHome
模板。
...
/areas/main
节点:- 使用它自己的类,
SectionMainArea
,来定义opener
区域属性。 - 由
/section/mainArea.ftl
脚本绘制。该脚本与默认使用的/global/mainArea.ftl
脚本唯一的不同在于,它使用[@cms.area name="opener"/]
标签添加了opener
区域。
/areas/main/areas/opener
节点:
...
默认情况下,您可以扩展stkHome
和stkSection
模板来配置一个浮显模板,这是因为它们都使用SectionMainArea
类和要点组件。其它的场景则需要定制。STK > 模板定义 /pages/demo-features/stkSectionFloating
里的stkSectionFloating
模板就是扩展stkSection
模板的一个例子,它:
这是基于stkSectionFloating
模板的demo-features/section-variables/floating
页在公共实例上的样子。该页解析到body
元素里包含的一个属性(attribute),即allowedBodyClass=nav-col-float2
里。main
区域的每个要点都包装在一个DIV元素内。
...
Advanced Tables - Table Plus |
---|
heading | 0 |
---|
multiple | false |
---|
enableHeadingAttributes | false |
---|
enableSorting | false |
---|
class | m5-configuration-tree |
---|
enableHighlighting | false |
---|
|
节点名 | 值 |
---|
pages | | stkSection | | areas | | variations | | newsletter | | areas | | sectionHeader | | enabled | false | extras | | enabled | false | promos | | enabled | false | base | | enabled | false |
|
如果您在任意基于stkSection
模板的页面上,只需将扩展名从.html
改为.newsletter
,变异形式的内容就出现了。
...
Advanced Tables - Table Plus |
---|
heading | 0 |
---|
multiple | false |
---|
enableHeadingAttributes | false |
---|
enableSorting | false |
---|
class | m5-configuration-tree |
---|
enableHighlighting | false |
---|
|
节点名 | 值 |
---|
pages | | stkArticle | | cssFiles | | articleStyles | | farFutureCaching | true | link | /resources/templating-kit/css/articleStyles.css | media | screen | jsFiles | | fireworks | | farFutureCaching | true | link | /resources/templating-kit/js/fireworks.js |
|
...
Advanced Tables - Table Plus |
---|
heading | 0 |
---|
multiple | false |
---|
enableHeadingAttributes | false |
---|
enableSorting | false |
---|
class | m5-configuration-tree |
---|
enableHighlighting | false |
---|
|
节点名 | 值 |
---|
components | | content | | teasers | | extras | | promos | | stkPromo | | features | | links | | stages | | footer | | pur | |
|
组件定义与页面定义相似,使用相同的模板定义对象。页面和组件使用相同路径语法引用它们的对话框。此外,页面和组件还使用相同的绘制工具绘制。
...
Advanced Tables - Table Plus |
---|
heading | 0 |
---|
multiple | false |
---|
enableHeadingAttributes | false |
---|
enableSorting | false |
---|
class | m5-configuration-tree |
---|
enableHighlighting | false |
---|
|
节点名 | 值 |
---|
components | | content | | stkQuotedText | | deletable | false | description | paragraphs.content.stkQuotedText.description | dialog | standard-templating-kit:components/content/stkQuotedText | i18nBasename | info.magnolia.module.templatingkit.messages | moveable | false | renderType | stk | templateScript | /templating-kit/components/content/quotedText.ftl | title | paragraphs.content.stkQuotedText.title | writable | true |
|
以上配置样例中,deletable
、moveable
和writable
属性的配置使组件可编辑,但不可移动或删除。以下为编辑者在页面编辑器里看到的。
...
Advanced Tables - Table Plus |
---|
heading | 0 |
---|
multiple | false |
---|
enableHeadingAttributes | false |
---|
enableSorting | false |
---|
class | m5-configuration-tree |
---|
enableHighlighting | false |
---|
|
节点名 | 值 |
---|
components | | teasers | | stkTeaser | | parameters | | areas | | description | paragraphs.teasers.stkTeaser.description | dialog | standard-templating-kit:components/teasers/stkTeaser | i18nBasename | info.magnolia.module.templatingkit.messages | modelClass | info.magnolia.module.templatingkit.templates.components.InternalTeaserModel | renderType | stk | templateScript | /templating-kit/components/teasers/internalPage.ftl | title | paragraphs.teasers.stkTeaser.title |
|
...
Advanced Tables - Table Plus |
---|
heading | 0 |
---|
multiple | false |
---|
enableHeadingAttributes | false |
---|
enableSorting | false |
---|
class | m5-configuration-tree |
---|
enableHighlighting | false |
---|
|
节点名 | 值 |
---|
components | | teasers | | stkTeaserNewsList | | parameters | | divClass | teaser latest | divIDPrefix | teaser | headingLevel | h2 | searchForSubcategory | news | teaserLinkType | internal | description | paragraphs.teasers.stkTeaserNewsList.description | dialog | standard-templating-kit:components/teasers/stkTeaserNewsList | i18nBasename | info.magnolia.module.templatingkit.messages | modelClass | info.magnolia.module.templatingkit.templates.components.NewsListModel | renderType | stk | templateScript | /templating-kit/components/teasers/newsList.ftl | title | paragraphs.teasers.stkTeaserNewsList.title |
|
...
Advanced Tables - Table Plus |
---|
heading | 0 |
---|
multiple | false |
---|
enableHeadingAttributes | false |
---|
enableSorting | false |
---|
class | m5-configuration-tree |
---|
enableHighlighting | false |
---|
|
节点名 | 值 |
---|
components | | teasers | | stkPureLinkList | | parameters | | areas | | linkList | | availableComponents | | stkInternalLink | | id | standard-templating-kit:components/links/stkInternalLink | stkExternalLink | | stkDownloadLink | | description | areas.components.linkList.description | enabled | true | templateScript | /templating-kit/components/links/linkListArea.ftl | title | areas.components.linkList.title | type | list | description | paragraphs.teasers.stkTeaserPureLinkList.description | dialog | standard-templating-kit:components/teasers/stkTeaserPureLinkList | i18nBasename | info.magnolia.module.templatingkit.messages | renderType | stk | templateScript | /templating-kit/components/teasers/pureLinkList.ftl | title | paragraphs.teasers.stkTeaserPureLinkList.title |
|
...
Advanced Tables - Table Plus |
---|
heading | 0 |
---|
multiple | false |
---|
enableHeadingAttributes | false |
---|
enableSorting | false |
---|
class | m5-configuration-tree |
---|
enableHighlighting | false |
---|
|
节点名 | 值 |
---|
components | | teasers | | stkTeaserContact | | parameters | | divClass | box vcard | divIDPrefix | teaser | headingLevel | h2 | teaserLinkType | internal | description | paragraphs.teasers.stkTeaserContact.description | dialog | standard-templating-kit:components/teasers/stkTeaserContact | i18nBasename | info.magnolia.module.templatingkit.messages | modelClass | info.magnolia.module.templatingkit.templates.components.ContactModel | renderType | stk | templateScript | /templating-kit/components/teasers/contact.ftl | title | paragraphs.teasers.stkTeaserContact.title |
|
...
Advanced Tables - Table Plus |
---|
heading | 0 |
---|
multiple | false |
---|
enableHeadingAttributes | false |
---|
enableSorting | false |
---|
class | m5-configuration-tree |
---|
enableHighlighting | false |
---|
|
节点名 | 值 |
---|
components | | extras | | stkExtrasContact | | parameters | | divIDPrefix | box | dialog | standard-templating-kit:components/extras/stkExtrasContact | extends | /modules/standard-templating-kit/templates/components/teasers/stkTeaserContact |
|
...
Advanced Tables - Table Plus |
---|
heading | 0 |
---|
multiple | false |
---|
enableHeadingAttributes | false |
---|
enableSorting | false |
---|
class | m5-configuration-tree |
---|
enableHighlighting | false |
---|
|
节点名 | 值 |
---|
pages | | stkEvent | | areas | | extras | | areas | | extras1 | | autoGeneration | | content | | calendar | | nodeType | mgnl:component | templateId | standard-templating-kit:components/extras/stkExtrasCalendar | generatorClass | info.magnolia.rendering.generator.CopyGenerator |
|
...
Advanced Tables - Table Plus |
---|
heading | 0 |
---|
multiple | false |
---|
enableHeadingAttributes | false |
---|
enableSorting | false |
---|
class | m5-configuration-tree |
---|
enableHighlighting | false |
---|
|
节点名 | 值 |
---|
pages | | stkArticle | | areas | | main | | areas | | content | | availableComponents | | autoGeneration | | content | | conference | | editHTML | <p><font color="#669900" size="+1">Sign up for the</font><font size="+1">....../strong></a>.</font> </p> | nodeType | mgnl:component | templateId | standard-templating-kit:components/content/stkHTML | generatorClass | info.magnolia.rendering.generator.CopyGenerator |
|
...
Advanced Tables - Table Plus |
---|
heading | 0 |
---|
multiple | false |
---|
enableHeadingAttributes | false |
---|
enableSorting | false |
---|
class | m5-configuration-tree |
---|
enableHighlighting | false |
---|
|
节点名 | 值 |
---|
components | | features | | stkSiteMap | | description | paragraphs.features.stkSiteMap.description | dialog | standard-templating-kit:components/features/stkSiteMap | i18nBasename | info.magnolia.module.templatingkit.messages | modelClass | info.magnolia.module.templatingkit.templates.components.SiteMapParagraphModel | renderType | stk | templateScript | /templating-kit/components/features/siteMap.ftl | title | paragraphs.features.stkSiteMap.title |
|
...
Advanced Tables - Table Plus |
---|
heading | 0 |
---|
multiple | false |
---|
enableHeadingAttributes | false |
---|
enableSorting | false |
---|
class | m5-configuration-tree |
---|
enableHighlighting | false |
---|
|
节点名 | 值 |
---|
pages | | stkSiteMap | | areas | | main | | areas | | intro | | content | | autoGeneration | | content | | singleton | | maxLevels | 3 | nodeType | mgnl:component | showSiteMapRoot | true | templateId | standard-templating-kit:components/features/stkSiteMap | titleToUse | title | generatorClass | info.magnolia.rendering.generator.CopyGenerator | type | single | class | info.magnolia.module.templatingkit.templates.MainArea |
|
...
Advanced Tables - Table Plus |
---|
heading | 0 |
---|
multiple | false |
---|
enableHeadingAttributes | false |
---|
enableSorting | false |
---|
class | m5-configuration-tree |
---|
enableHighlighting | false |
---|
|
节点名 | 值 |
---|
demo-project | | service | | site-map | | content | | singleton | | maxLevels | 4 | showSiteMapRoot | true | titleToUse | title |
|
如果您想要在模板定义中修改一个自动生成组件的默认设置,您需要首先在JCR浏览器中删除这个内容节点(singleton
)并刷新该页。系统会使用新的模板定义属性在页面上重新创建该组件。这是一个已知问题,您可以在MAGNOLIA-4482里跟踪进展。