1 Reply Latest reply on Jul 19, 2012 6:02 AM by Sham HC

    Attach Carousel to external API

    Ohadbp

      Hey,

       

      I am newbie to CQ5 and wonder about it's capabilities in order to decide if this is the system we should use in our company. I be greatful if you could answer the following.

       

       

      In my home page i have a carousle , instead of building a static list of articles i'd like on every page view to submit an API request and have the Carousel generate and load the list of articles from the API response.

       

      1) Is it possible to have the Carousel execute a javaScript that will perform the API call (or is there a built-in option for that? )

      2) Assuming this is possible, must i supply a list of articles or can my javaScript on it's own set titles / images / any other data used by the Carousel design?

      3) Regarding the Carousel design, how can one change the design and look and feel of a Carousel?

       

       

      Thanks.

      Ohad.

        • 1. Re: Attach Carousel to external API
          Sham HC Level 7

          Hi Ohad,

           

          Currently OOB carousel components gets list of pages by looking at property "pages" inside carousel node of the page. Example [0]. The list is fethched in [1] by using request.getAttribute("list").  The list is fetched based on page filter & interested in more details refer[2]. 

           

          1)   No build in option you need to custamize or develop.

          2)   You can update the property @pages [0] to have latest list of articles.  Please note OOB coursel only works for pages and not support for images.

          3)   You can overlay [1] & customize.   If you refering to jquery dynamic coursel then need to develop your own component.

           

          If you are planning for dynamic carousel please plan to handle the caching accordingly.

           

          [0]  /content/geometrixx/en/jcr:content/carousel/@pages

           

          [1] /libs/foundation/components/carousel/carousel.jsp

           

          [2]  /libs/foundation/src/impl/src/main/java/com/day/cq/wcm/foundation/List.java

           

          Thanks,

          Sham

          1 person found this helpful