Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Hardcoded style system

Avatar

Level 5

Hello,

As we know, there are restrictions on loading the style system in targeting mode. I’m trying an alternate approach: checking if the mode is edit or targeting, and then loading the style system tab in the dialog only for targeting mode (loading from the dialog with hardcoded values, not from editable template policies).

For my use case, I don’t need the “paintbrush” icon indicating the style system in targeting mode, as long as the style system is available when opening the dialog. I plan to use the same styleIds, hardcoded in the dialog dropdown for selection.

 

I’m just checking if anyone has tried this approach and found it successful. Please let me know.

4 Replies

Avatar

Community Advisor

Hi @test1234567 ,

Yes we had implemented styling using drop down of theme/style allowed for a given component.
It suffice the purpose and works well.

PS:

If required you can created a common node of theme/drop down and include in all the required dialog using resource include to act same as style system

Thanks

Avatar

Level 5

Thanks for your reply. Could you tell me if you have implemented the custom style dropdown only in targeting mode, while in non-targeting mode it is loaded from policies? If so, are you hiding the custom styles in non-targeting mode and showing them only in targeting mode? Also, have you checked for any specific cookies in targeting mode? If you have a sample or skeleton implementation, could you please share it?

Avatar

Administrator

@test1234567 Hey! Just wanted to see if this got resolved. If you solved it yourself, sharing your solution could really help others. And if one of the answers here helped you, marking it as accepted will guide future readers. Thanks!



Kautuk Sahni

Avatar

Level 4

Use Policy configuration to configure style system (OOTB). For targeting mode, I would recommend hiding it via authoring styles.