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

can we enable style system in classic template?

Avatar

Avatar
Validate 1
Level 1
ramaem12
Level 1

Like

1 like

Total Posts

25 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Boost 1
View profile

Avatar
Validate 1
Level 1
ramaem12
Level 1

Like

1 like

Total Posts

25 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Boost 1
View profile
ramaem12
Level 1

29-06-2020

I followed below approach to enable the style system in Static templates.

For Enabling Style system I added below design dialogue in my component.

<styletab
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/include"
path="/mnt/overlay/cq/gui/components/authoring/dialog/style/tab_design/styletab"/>

1) It is working perfectly in editable templates.

working behavior of my Component in editable template.

Editable template working brush iconEditable template working brush icon

 

2) But it is not working in the Static template. I followed the below procedure to enable the style system in my component.

Static template design modeStatic template design mode

 

After I added the above values in my component design mode, I can see the brush icon in the static template, but I cannot see the values of Quote Block and Test2 in authoring mode.

static template missing values in brush iconstatic template missing values in brush icon

AEM 6.4 Classic

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Give Back 3
Level 2
tatvam
Level 2

Likes

13 likes

Total Posts

15 posts

Correct Reply

1 solution
Top badges earned
Give Back 3
Give Back
Boost 5
Boost 3
Boost 10
View profile

Avatar
Give Back 3
Level 2
tatvam
Level 2

Likes

13 likes

Total Posts

15 posts

Correct Reply

1 solution
Top badges earned
Give Back 3
Give Back
Boost 5
Boost 3
Boost 10
View profile
tatvam
Level 2

29-06-2020

If I have to think through the need for this, I can assume that

 

1) You have (to manage) static and editable templates

2) (at least some of the )New components need to be supported in both static and editable templates

3) Since one is developing components with style system, might want to leverage the style system concept in static as well.

 

Otherwise, one might as well migrate the static to editable templates. Seems like for some reason you don't want to do that. Anyways, leaving the issues related to migration aside.

In edit mode, when you click the "styles" icon from the toolbar, the styles (that are defined) are pulled from the corresponding component/policy node and populated in the dropdown. This is done by the corresponding markup (form submit) and ajax request. These come from the editable template clientlibs.

 

It is worth a try to compare the static vs editable template "editor.html" clientlibs and add the editable template clientlibs in static template. If, these clientlibs by default do not provide you the expected "style system" functionality, you'd have to override this to achieve what you want. Have to say, it would be an interesting exercise 🙂

 

Answers (2)

Answers (2)

Avatar

Avatar
Give Back 5
Employee
vanegi
Employee

Likes

392 likes

Total Posts

378 posts

Correct Reply

148 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 10
Give Back
Boost 50
View profile

Avatar
Give Back 5
Employee
vanegi
Employee

Likes

392 likes

Total Posts

378 posts

Correct Reply

148 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 10
Give Back
Boost 50
View profile
vanegi
Employee

30-06-2020

It is not possible to use Style System with static templates, its a feature of editable template to allow developers and template editors to create multiple visual variations of a component, see [0]. Style System uses design dialog to allow author to add all styles for components which will be available at time of component editing.These values are store styles inside components policy under editable templates node.

 

You can always migrate old static template to editable template to make use of this feature.

 

[0]: https://docs.adobe.com/content/help/en/experience-manager-65/developing/components/style-system.html

 

 

 

Avatar

Avatar
Affirm 50
MVP
Vaibhavi
MVP

Likes

216 likes

Total Posts

181 posts

Correct Reply

61 solutions
Top badges earned
Affirm 50
Validate 1
Ignite 1
Give Back 5
Give Back 3
View profile

Avatar
Affirm 50
MVP
Vaibhavi
MVP

Likes

216 likes

Total Posts

181 posts

Correct Reply

61 solutions
Top badges earned
Affirm 50
Validate 1
Ignite 1
Give Back 5
Give Back 3
View profile
Vaibhavi
MVP

29-06-2020

Hi @ramaem12 , 

Style system is supported on editable template. On static template feature is not supported. 

 

I can see you have added piece of script necessary to enable style system . But it doesn't work in static template. Libraries necessary to support the style system is loaded as a part of editable template not in static. 

If you need to consume the feature, you need to convert the static templates into editable templates.