2

My Requirement is to have a global header and footer with author able properties. So if we update the properties on one page it should be reflected across all pages.

What is the best approach to achieve this in CQ5.

3 Answers 3

3

ACS AEM Commons now supports this functionality without use of an iparsys - Shared Component Properties (http://adobe-consulting-services.github.io/acs-aem-commons/features/shared-component-properties.html)

Configure your menu with Shared and/or Global properties and you can simply template it directly onto all of your pages (no iparsys required). You can then edit the header/footer from any page on the site and it will by updated on all pages.

Unlike using design dialogs, Shared Component Properties supports standard content activation and internationalization (values stored below the homepage) and anything else you would expect from content.

2

If all of your pages site under a hierarchy, you could use an Inherited Paragraph System (iparsys). This is from an old version of the documentation, but is still a good intro:

The inherited paragraph system is a paragraph system that also allows you to inherit the created paragraphs from the parent. You add paragraphs to iparsys at for example, /content/geometrixx/en/products and as result, all the subpages of products that also have iparsys with the same name inherit the created paragraphs from the parent. On each level, you can add more paragraphs, which are then inherited by the children pages. You can also cancel paragraph inheritance at a level at any time.

While not quite what you're describing in the original post (edit anywhere) it will allow you to edit the content once (at the parent page) and inherit the changes everywhere.

1
  • This is very similar to the inheritancevalue map process, and I would second @anotherdave's suggestion at looking at iparsys. The only reason our team decided to go with building our own inhertance vs using iparsys was because of some custom requirements that iparsys didn't give us. But out of the box, it's a great solution or interim solution while you decide.
    – Brodie
    Jan 13, 2014 at 22:00
0

Traditionally you could create the components and swap the dialogs out for design dialogs. Basically you would rename your component dialog to design_dialog.

What this will do is save the changes you make to this object to a design path under etc. You can set a design path for site by going to the top level parent and setting a designPath property.

So node structure might look something like

parentNode - @prop designPath = "designs/myapplication" childNode1 childNode2 etc...

Any component using a design_dialog on the parentNode or its children nodes will get their information from the designPath. If you do not set a design path, the infomration is saved under etc/designs/default (or defaults, not sure, going off the top of my head).

There are some alternatives to this:

What our team did was in our siteHeader component we use http://dev.day.com/docs/en/cq/current/javadoc/com/day/cq/commons/inherit/InheritanceValueMap.html (inheritancevalue map) instead of the regular value map. The inherited value map will traverse the tree up looking for items from it's parents. This is a great source for learning how to use valuemap instead of just the default properties object:

http://experiencedelivers.adobe.com/cemblog/en/experiencedelivers/2013/02/valuemap-and-his-friend.html

This does get complicated with larger sites, and you'll have to do a lot of customization to get the system working the way you want, but it's an option if you don't want to have to manually set designPaths for every new site your authors create.

Alternatively, if you do like the idea of using designPaths and design_dialogs, you can always hook into the page creation workflow and have the page component add a designPath property on creation (this is a lot easier said than done though).

hope that helps

2
  • We have implemented using design dialog but we have multiple templates in which we are including common header and footer components.Now design dialog creates node per template in etc/design and save properties .So if we need to update the header properties we have to go to each template page and do changes .
    – Nitin
    Jan 11, 2014 at 16:28
  • When you include the header/footer components have you tried doing something like <cq:include path="path/to/my/design" resourceType="my/headercomponent"/> ?
    – Brodie
    Jan 13, 2014 at 21:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.