I am almost two impelementation’s old with Day’s CQ WEM. When I started with CQ product, one thing which kept me guessing within CQ was the separation of content from presentation.
As per my understanding of CQ, a component is the one which holds data, dialogs to capture information and presenting the information. One of the ground rule for a CMS system is separation of content from presentation but its initial usage looks to voilate this rule. If the same content is presented in three different formats, it is pretty common in CQ to end up adding the same content three times through different components usage. And if the site is pretty huge, I can easily image the content getting out of sync soon within the same site, not even accounting for any external interfaces.
No doubt, CQ is pretty powerful and its underlying architecture can allow you to do almost everything, along with its paragraph system. For our implementations, we followed an approach as described below. I am sure this is nothing new but I never saw such information on sites, so I thought of putting togather this post. In order to achieve separation of content from presentation, we defined three different categories of components:
These are data buckets which holds data without any presentation logic built into them. It presents user with a dialog box along with various tabs to capture information.
These are components which extract information from data components and display the content in the desired format.
There are common set of properties defined to capture common assets information either as part of data component or presentation component.
Let me try to explain with an example:
Suppose there is a need to build a website for hospitality group which has number of restaurants scattered across the globe. These restaurants are logically grouped into regions, for example, Asian, European, American etc. As part of restaurant, there is a need to capture information including: Name of the restaurant, Location, Region, image of the restaurant, Description of the place, Opening hours, facilities etc. The information for restaurants are displayed on various pages, on the restaurants home page, maps pages, regional pages etc.