How to programmatically force a theme in 6.4

Christopher_Pa4 18-07-2018

I have created a custom theme, and in 6.4 you can choose a theme at form creation (rather than waiting until editing the form).

However, is there a way to programmatically force a theme so that the new theme is the default, rather than Canvas?

Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

DarrenBiz 18-07-2018

This took a little bit of hunting down in the af JavaScript because the documentation on creating custom templates in 6.4 [1] is incorrect (/libs/fd/af/templates no longer exists). The reference templates in 6.4 now live under /conf, so I copied and pasted the /conf/ReferenceEditableTemplates node and created my own custom template folder (my-templates). I deleted all templates in /conf/my-templates/settings/wcm/templates except the blank reference template.

There are two ways now to change the default theme. If you are already in CRXDE, then just look in the themeRef property under /conf/my-templates/settings/wcm/templates/blank/initial/jcr:content/guideContainer. Change this property to point to the theme you want, click Save All and you are done.

Or in the Coral Template Editor, you can edit the Initial Content of the template using the drop-down on the top right. Select the Adaptive Form Container and click the wrench icon. You should now see the default settings for the new template Adaptive Form container. Select the Theme you want to display in the new form dialog by default.

Test out your new template by creating a new Adaptive Form and select your new template - your default theme should show as whatever you changed it to.

[1] Adobe Experience Manager Help | Creating a custom adaptive form template