Embedding custom component Touch UI dialogs within other custom component Touch UI dialogs

499 views Asked by At

What I'm trying to accomplish is to setup a series of subcomponents that can be embedded into components to add the same fields across many components but have them all pull from a single location, for example adding title and teaser fields in the parent components' dialogs. That way if we ever need to modify or add to that list, we can make the change within the subcomponent dialog and have it propagate to all inheriting dialogs. Currently, we just copy/paste everything and they inevitably eventually get out of sync and it's a pain to maintain.

I've seen mention of creating overrides using the Touch UI version of inclusion, granite/ui/components/foundation/include. The following code in a .content/xml hasn't worked.

<testembed
    jcr:primaryType="nt:unstructured"
    sling:resourceType="granite/ui/components/foundation/ui/include"
    path="/apps/[path-to-custom-component/cq:dialog/content/items" />

I've tried various forms of the path to mention /apps or not, I've tried relative to /libs, but nothing seems to give any result.

I've done similar things to core components using sling:resourceSuperType, but I'd like to avoid that as much as possible here since it adds a layer of complexity and we already use some supertype functionality so it wouldn't be capable of overriding two components at once (unless it is...). It would also remove flexibility to place the embedded fields where they make sense to any given component.

0

There are 0 answers