Muut
October 29, 2015, 4:12pm
1
Hello,
I’m happy to announce I’ve just started developing a plugin to easily use ALL the Bootstrap elements in the Grav way.
For example, to define a carousel, in your page header just add this definition:
gravstrap:
carousel:
carousel1:
id: bscarousel
previous_label: Previous
next_label: Next
items:
0:
image: image1.jpg
caption: an awesome image
1:
image: image2.jpg
caption: another awesome image
and render it in your twig template as follows:
Muut
October 29, 2015, 4:23pm
2
Should be interesting! Let us know when you have more info for sure.
Next time please past your code in triple backticks to make it easier to read
Muut
October 29, 2015, 4:36pm
3
Sorry, here’s the fixed code:
gravstrap:
carousel:
# Add as many carousels as you need
carousel1:
id: bscarousel
previous_label: Previous
next_label: Next
items:
0:
image: image1.jpg
caption: an awesome image
1:
image: image2.jpg
caption: another awesome image
and to render it just add this to your template:
{{ gravstrap.carousel1 }}
---