jiggy
jiggy

Reputation: 3826

AEM 6.0: Customize the page creation wizard?

I successfully overrode the page properties dialog for my custom page component and foolishly assumed it would apply to the create page wizard as well, but that form is still default. It has a load of fields we don't plan to use and is missing the new ones I've added. The docs don't say anything. Anyone know how this works? Bonus points if I reuse the dialog xml I've already created.

Upvotes: 0

Views: 1628

Answers (2)

Vifer
Vifer

Reputation: 11

I've been trying to to a similar thing, however, I want the page properties to be different per template - I can achieve this by adding properties to the template in my apps, but would like to expose these properties at page creation.

Like Jiggy said, you can copy /libs/wcm/core/content/sites/createpagewizard to /apps/wcm/core/content/sites/createpagewizard then go down the JCR path to where the tabs are, add your own tab with fields. For example, if I wanted to have a tab with vehicle properties and wanted to create a field to store the make, I would have to create it here:

/apps/wcm/core/content/sites/createpagewizard/jcr:content/body/content/items/properties/items/properties/items/tabs/items/vehicleproperties/items/title/items/make

To keep things simple, the vehicleproperties tab is just a renamed copy of the basic tab:

/apps/wcm/core/content/sites/createpagewizard/jcr:content/body/content/items/properties/items/properties/items/tabs/items/basic

just look at how the basic tab fields are constructed so you can replicate on your new tab or add to an existing tab.

unfortunately the wizard does not seem to be very flexible or intelligent enough to pick up the properties you have defined at the template level - unfortunately the change I have described is global, it sill show up for every single page you want to create.

Upvotes: 1

jiggy
jiggy

Reputation: 3826

Found the solution. The Create Page Wizard is configured in /libs/wcm/core/content/sites/createpagewizard so I added /apps/wcm/core/content/sites/createpagewizard. Copy paste the contents from libs and make my changes. Sadly, this thing is not composed of includable fragments, so it was all copy pasted. I was able to use a sling include of the custom tab I had created for page properties.

Upvotes: 0

Related Questions