Forum
Images in a carousel using a template
I am trying to apply apply a template to a Carousel. This template is stored in perch/templates/content as homeCarousel.html
<img class="border" scr="<perch:content id="image" type="image" label="Carousel image" width="1000 px" height="470 px" crop="true" />" alt="<perch:content id="alt" type="text" label="image description" />"/>
I have created 4 regions for each of the images within the carousel.
<div class="slider-wrapper theme-default">
<div id="slider" class="nivoSlider">
<?php perch_content('Carousel One'); ?>
<?php perch_content('Carousel Two'); ?>
<?php perch_content('Carousel Three'); ?>
<?php perch_content('Carousel Four'); ?>
</div><!-- end #nivoSlider -->
</div><!-- end #slider-wrapper theme-default -->
The result so far is: https://www.preview.terencedonovan.co.uk/index.php
The carousel is showing in that the 4 buttons are showing along with the top most parts of the forward/previous buttons. But no sign of the image. The 4 images have been loaded in to the assetts folder within the Perch CMS.
Any help would be appreciated...
Cheers Paul
You've spelt src as scr
Thanks very much for spotting that, I have changed it but it's still not working. Very frustrating!
Did you go back into the region(s) and click save?
Thank you so much... you are a star!!!
No problem,
I would recommend using multi regions rather than setting up new region for each image (that way content editors can add as many as they like)
docs