4 Replies Latest reply on Feb 24, 2013 11:05 PM by Yogesh Upadhyay

    Dynamically load content based on parameters


      Hi guys,


      I have a got a CQ design question here:


      We are building a site which will render various header, footer, list of products and some sections of the main body depending on a set of parameters.


      There are over 300 variations of these parameters, therefore we need to create a machnism which helps to determine what content/page to render at runtime.


      We have thought about couple solutions but still not having a clear idea how they will work in CQ:


      1. Use good old queryString, get the parse the queryString, then in the main jsp page, add some logic and decide which jsp to page to include. But this means we will need potentially hundreds if not thousands of jsp pages to render different content.


      2. Use dynamic selector to include dynamic content. But does that eliminate the need of hundreds of jsp pages?


      Also, in CQ, what is the best practice to store these parameters in http session? Or should they be stored in sling http session instead?


      Many thanks!!!