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
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 morecarousels
. Aslide
simply becomes an object with a title, text, image and a url.In order to get the carousel for the home page we do:
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: