Designer Content Image Field Access For Gallery

Permalink
Hi,

I'm working on a website where I created a block with the fantastic Designer Content addon with image fields. These fields are for images in a gallery, which in view.php goes into an <ul> for the thumbnails. The first image is an attribute for the page, which works fine, however I cannot seem to access the images stored in the fields for the block (the loop).
Everything works fine i.e. no PHP errors, but the img src etc just remains blank.

Any help would be greatly appreciated. Code for view.php is below.

<?php  defined('C5_EXECUTE') or die("Access Denied.");
$imgHelper = Loader::helper('image');
$btc = $this;
?>
<div class="rg-gallery" id="rg-gallery">
        <div id="rg-header">
        </div>
        <div class="rg-thumbs">
        <!-- Elastislide Carousel Thumbnail Viewer -->
        <div class="es-carousel-wrapper">
            <div class="es-nav">
                <span class="es-nav-prev">Previous</span>
                <span class="es-nav-next">Next</span>
            </div>
            <div class="es-carousel" style="max-width: 280px">

 
mnakalay replied on at Permalink Best Answer Reply
mnakalay
Hello. Here's the working code
<?php  defined('C5_EXECUTE') or die("Access Denied.");
$imgHelper = Loader::helper('image');
?>
<div class="rg-gallery" id="rg-gallery">
    <div id="rg-header">
    </div>
    <div class="rg-thumbs">
        <!-- Elastislide Carousel Thumbnail Viewer -->
        <div class="es-carousel-wrapper">
            <div class="es-nav">
                <span class="es-nav-prev">Previous</span>
                <span class="es-nav-next">Next</span>
            </div>
            <div class="es-carousel" style="max-width: 280px">
                <ul>


However you would be better off modifying the controller to deal with thumbnails right away instead of doing it in the view.
danielcwaghorn replied on at Permalink Reply
Works spot on, didn't know you could add to arrays like that in PHP.

Many thanks.
mnakalay replied on at Permalink Reply
mnakalay
yes, that's multidimensional arrays you can put arrays inside arrays inside arrays inside...