Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

How to programmatically force a theme in 6.4

Avatar

Avatar
Validate 10
Level 3
Christopher_Pa4
Level 3

Likes

16 likes

Total Posts

54 posts

Correct Reply

4 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Validate 10
Level 3
Christopher_Pa4
Level 3

Likes

16 likes

Total Posts

54 posts

Correct Reply

4 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile
Christopher_Pa4
Level 3

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)

Avatar

Avatar
Validate 10
Level 5
DarrenBiz
Level 5

Likes

67 likes

Total Posts

205 posts

Correct Reply

37 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Validate 10
Level 5
DarrenBiz
Level 5

Likes

67 likes

Total Posts

205 posts

Correct Reply

37 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile
DarrenBiz
Level 5

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

Answers (2)

Answers (2)

Avatar

Avatar
Validate 10
Level 3
Christopher_Pa4
Level 3

Likes

16 likes

Total Posts

54 posts

Correct Reply

4 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Validate 10
Level 3
Christopher_Pa4
Level 3

Likes

16 likes

Total Posts

54 posts

Correct Reply

4 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile
Christopher_Pa4
Level 3

23-07-2018

Thanks! I had already set up a custom theme, so I was able to just change the themeRef property - I just couldn't find it before!

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

18-07-2018

Great answer!