Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Where to store global property for simple logo component

Avatar

Level 4

We are building a simple logo component. The requirement is to allow the content author to select an logo asset from the DAM that will be used across all pages in the site regardless of template.

If I use the design dialog to store this image path property it will only get stored per template and our site has up to 4. So you would need to select the logo up to 4 times.

Is there another/better way to do this? I have seen two solutions:

1) Change the design path for the component (http://labs.sixdimensions.com/blog/2013-06-17/changing-cq-components-design-path/)

2) Create a global properties page and the logo component can reference the image path stored here.

I'm very keen to maintain the "CQ way" of managing properties so using a dialog approach would be preferable. What are the other possible ways?

1 Accepted Solution

Avatar

Correct answer by
Level 10
3 Replies

Avatar

Correct answer by
Level 10

Avatar

Level 4

Thanks Sham. I'm not sure I like this approach as means you are referencing the content directory from within your application folder. Our components and templates are meant to be common across many sites so this approach would not work in that context.

Dan

Avatar

Level 2

One possibility would be to include your logo component into the component given as slingResourceSuperType's header.jsp using cq:include. That way the component will be included in all pages that use the supertype, and it's referenced jsp's.