Hi guys im trying to get descriptions working alongside the fantastic file plugin.
Im trying this code:
<?php
$pictureNames = "{parts-description}";
$pictureNamesArray = explode(",",$pictureNames);
$pictureCounter = 0;
?>
{p-image}
<div class="content-inner">
<a href="http://{file_url}" class="imger">{file_thumb_url}</a>
<?php echo "$pictureNamesArray[$pictureCounter]"; $pictureCounter++; ?>
</div>
{/p-image}As you will see im trying to explode the data with a comma. Iv tried a “\n” for line breaks but it still doesnt output the proper html. Iv turned formating off in the custom field but im getting something similar to this.
<div class="content-inner">
<a href="http://.../images/uploads/parts/HAYTER-1030.jpg" class="imger">...images/uploads/parts/HAYTER-1030_thumb.jpg</a>
KTM 123 pic 1
</div>
<div class="content-inner">
<a href="http://images/uploads/parts/Hayter_logo_Large.gif" class="imger">/uploads/parts/Hayter_logo_Large_thumb.gif</a>
KTM pic 2
Notice the empty on the second proposed paragraph.
As always any help appreciated.Thanks.