diff --git a/README.md b/README.md index 788806b..bd741d1 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Gravstrap Plugin +`Gravstrap` is a [Grav](http://github.com/getgrav/grav) plugin that provides Bootstrap components as shortcodes. +A shortcode is defined by a simple structure and it is added to a Grav page to render a full component like a simple button, +or a more complex one like a carousel or a navbar, till a full complex module, like a portfolio. -`Gravstrap` is a [Grav](http://github.com/getgrav/grav) plugin that provides Bootstrap components as shortcodes. A shortcode is defined by a simple structure and it is added to a Grav page to render a full component like a simple button, or a more complex one like a carousel or a navbar, till a full complex module, like a portfolio. - -The full ducumentation is available at the [developer's website](http://diblas.net/plugins/use-bootstrap-components-as-shortcodes-in-grav-cms) +# Documentation +The full documentation is available at the [developer's website](http://diblas.net/plugins/gravstrap#documentation) diff --git a/shortcodes/Bootstrap/CarouselShortcode.php b/shortcodes/Bootstrap/CarouselShortcode.php index 4a408aa..05b7f0b 100644 --- a/shortcodes/Bootstrap/CarouselShortcode.php +++ b/shortcodes/Bootstrap/CarouselShortcode.php @@ -76,6 +76,7 @@ protected function renderOutput(ShortcodeInterface $shortcode) return $this->twig->processTemplate($this->template(), [ 'id' => $shortcode->getParameter('id'), 'name' => $shortcode->getParameter('name'), + 'images_path' => $shortcode->getParameter('images_path'), 'previous_label' => $this->defaultValue($shortcode->getParameter('previous_label'), 'Previous'), 'next_label' => $this->defaultValue($shortcode->getParameter('next_label'), 'Next'), 'items' => $this->shortcode->getStates($this->shortcode->getId($shortcode)), diff --git a/templates/bootstrap/carousel.html.twig b/templates/bootstrap/carousel.html.twig index 3044a69..0a7a1db 100644 --- a/templates/bootstrap/carousel.html.twig +++ b/templates/bootstrap/carousel.html.twig @@ -14,8 +14,8 @@ 'caption': item.content|trim, } %} {% endif %} -
- {{ grav.page.find('/images').media.images[values.image] }} +
+ {{ grav.page.find(images_path).media.images[values.image] }}
{% endfor %}