【发布时间】:2018-08-28 21:58:09
【问题描述】:
我想向 OOTB 页面组件触摸 UI 对话框 (/libs/foundation/components/page) 添加一个新选项卡,以便从该 OOTB 组件继承的所有页面都将具有这些字段。
不幸的是,仅将选项卡添加到每个模板组件不是一个选项,因为我正在构建一个插件而不是一个实现。
我一直在尝试覆盖 /libs/foundation/components/page/_cq_dialog/content/items/tabs/items/ 并将我的选项卡添加到该叶 items 节点,但是它不会拉动其余的 OOTB 选项卡。我认为这是因为它不是叶节点,并且在进行叠加时它想要成为。所以我需要以某种方式将我定义的内容与 OOTB 触摸 ui 对话框合并。
这是我的/apps/foundation/components/page/_cq_dialog 节点:
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
jcr:primaryType="nt:unstructured"
jcr:title="Page"
sling:resourceType="cq/gui/components/authoring/dialog"
extraClientlibs="[cq.common.wcm,cq.siteadmin.admin.properties]"
mode="edit">
<content
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/container"
class="cq-dialog-content-page">
<items jcr:primaryType="nt:unstructured">
<tabs
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/container"
rel="cq-siteadmin-admin-properties-tabs">
<layout
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/layouts/tabs"
type="nav"/>
<items jcr:primaryType="nt:unstructured">
<custom
jcr:primaryType="nt:unstructured"
jcr:title="Custom"
sling:resourceType="granite/ui/components/foundation/section">
<layout
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/layouts/fixedcolumns"
margin="{Boolean}false"/>
<items jcr:primaryType="nt:unstructured">
<column
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/container">
<items jcr:primaryType="nt:unstructured">
<customsection
jcr:primaryType="nt:unstructured"
jcr:title="Custom field"
sling:resourceType="granite/ui/components/foundation/form/fieldset">
<items jcr:primaryType="nt:unstructured">
<customfield
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/textfield"
fieldLabel="custom field"
name="customField"/>
</items>
</customsection>
</items>
</column>
</items>
</custom>
</items>
</tabs>
</items>
</content>
</jcr:root>
谢谢!
【问题讨论】:
标签: java xml aem aem-touch-ui