jiggy
jiggy

Reputation: 3826

How do I configure page properties in AEM 6?

I need to add some page metadata (SEO, Open Graph, etc) and have it be editable per page. In CQ5 I modified the page component dialog.xml to allow for custom fields and it was accessible through the sidekick. In the AEM 6 Touch UI, the sidekick is gone and the page properties available under the gear is configured in some other way that seemingly isn't documented. Is there a way to configure this in AEM 6? Or some other way to edit metadata?

Upvotes: 1

Views: 8553

Answers (2)

Nono Junang
Nono Junang

Reputation: 37

In AEM 6.1 you can use the sling resource merger to override/extend/hide existing touch ui dialogs nodes/properties as described here:

https://docs.adobe.com/docs/en/aem/6-1/develop/platform/sling-resource-merger.html

Let's say for example you would like to add a new textfield (SEO) to the basic tab during page creation.

Then you need to do the following:

  1. create the following node structure: /apps/foundation/components/page/cq:dialog/content/items/tabs/items/basic/items/column/items/title/items/seo, just the node structure without any content. All nodes can be of nt:unstructured.
  2. Set the property "sling:resourceSuperType" with the value "/libs/foundation/components/page/cq:dialog" on the node "/apps/foundation/components/page/cq:dialog"
  3. Assign the following properties to the "seo" node you created
sling:resourceType:granite/ui/components/foundation/form/textfield
fieldLabel:SEO
cq:showOnCreate:{Boolean}true
cq:hideOnEdit:{Boolean}false
name:./seo

When you create a new page in the touch UI mode then the new textfield SEO should display in the basic tab.

Upvotes: 2

Jura Khrapunov
Jura Khrapunov

Reputation: 1024

Touch UI uses different node type for its dialogs (cq:dialog vs dialog), check this article for details: https://helpx.adobe.com/experience-manager/using/creating-touchui-component.html

Upvotes: 5

Related Questions