slashroots / slashroots-website-v2

Slashroots Foundation Website
1 stars 0 forks source link

Carousel Generic - Modifications #63

Closed matjames007 closed 8 years ago

matjames007 commented 8 years ago

The idea here is for a carousel that is agnostic to content and can have multiple instances running on the same site. This was achieved by having a grouping as follows: A slide can be referenced by one or more carousels. A slide simply becomes an object with a title, text, image and a url.

In order to get the carousel for the home page we do:

GET api/carousel/<name> or GET api/carousel/HomePage

this will return an object with an _id. This _id can be used to retrieve the slides that are to be included for the referenced carousel by doing:

GET api/<id>/slides or GET api/342423223423ef2313ae/slides