Forum

Thread tagged as: Question, Problem, Gallery

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

Paul Browning

Paul Browning 0 points

  • 7 years ago

You've spelt src as scr

Dexter Harrison said:

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?

Dexter Harrison said:

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

Dexter Harrison said:

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

I will try that next, I have a few other pages where the content editors have to do just that!