Hi all
Small problem trying to show some values from my perl variables. Sorry if this is going over old ground from a previous thread, though tried everything and can't figure out whats wrong.
The image snippet below works, the caption and photographer part show nothing, no values.
<img src="{iw_value name='$image'/}" class="slider-image"/>Full code
<iw_iterate var="image" list="items.gallery.images">
<iw_perl>
my $image = iwpt_dcr_value('image.image');
my $caption = iwpt_dcr_value('image.imagecaption');
my $photographer = iwpt_dcr_value('image.photographer');
</iw_perl>
<div class="slide">
<img src="{iw_value name='$image'/}" class="slider-image"/>
<div class="overlay-text">
<p>{iw_value name='$caption'/}</p>
<p class="copyright">© {iw_value name='$photographer'/}</p>
</div>
</div>
</iw_iterate>
If it helps, here is my capture form code:
<!-- photo gallery/carousels -->
<container name="gallery">
<!-- image and caption work as a group -->
<container name="images" default="0" min="0" max='unbounded'>
<!-- image field -->
<item name="image" max='1' required="t">
<label>Image (Width 500px approx)</label>
<description>Add images for carousel gallery [jpg].</description>
<browser initial-dir="/static/images/"
ceiling-dir="/static/" extns=".jpg,.jpeg"
size="50" maxlength="1000" />
</item>
<!-- image caption field -->
<item name="imagecaption" max='1' required="t">
<label>Caption (Add a generous description)</label>
<description>Add a description about the photograph</description>
<text size="80" maxlength="400" />
</item>
<!-- photogrpahers name field -->
<item name="photogrpaher" max='1' required="t">
<label>Photographers Name</label>
<description>Copyright notice displays under photograph</description>
<text size="80" maxlength="50" />
</item>
</container>
</container>
Can anybody see what I'm doing wrong?
Cheers, Barry