Where to store global property for simple logo component | Community
Skip to main content
Level 3
October 16, 2015
Solved

Where to store global property for simple logo component

  • October 16, 2015
  • 3 replies
  • 1004 views

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?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

Sham_HC
Sham_HCAccepted solution
Level 10
October 16, 2015
Level 3
October 16, 2015

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

Level 2
October 16, 2015

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.