Forum
Repeater image issue
Hi,
I'm having issues when using the repeater tags on most of my templates. The images are not appearing but the rest of the content, like the text are. Help would be much appreciated because I can't see what I'm doing wrong! This is one of my templates:
<perch:repeater id="team" label="Fundraising/Trustee Team">
<div class="col-md-3 col-sm-6 bottommargin">
<div class="team">
<div class="team-image">
<img src="<perch:content id="fundraiser" type="image" label="Image of Fundraising/Trustee Team Member" help="Please upload an image. Dimensions 400 x 300px">" alt="<perch:content type="text" label="Image description"/>">
</div>
<div class="team-desc">
<div class="team-title"><h4><perch:content id="name" type="text" label="Name"/></h4><span><perch:content id="role" type="text" label="Role"/></span></div>
</div>
</div>
</div>
</perch:repeater>
Your tags are malformed. This:
should be:
I'm also having issues with this:
What issues are you having Jade?
Try changing your ID. Dashes shouldn't be used in IDs.
should be
Hi Simon, I have tried that thanks. The image isn't appearing for some reason. The slider work statically but when I put the image tag in the image won't appear.
Have you re-added the image after changing the ID?
Yes, I have
Can you enable debug on the page. https://docs.grabaperch.com/perch/configuration/debug/
Perhaps it will show where the issue lies.
This is the debug for the page
This is the admin debug
If you view source on your page, can you see the image tag in the HTML?
Yes I can
It sounds like the template is working then - you should double check your front end code.
The front end code is working, as the slider works until I add the perch tags in.
Then you should compare the working and the non-working version to see what's different.
Can you show your page code?