Forum

Thread tagged as: Error, Gallery

Gallery spitting out blanks

Hi

At the end of my page html output from the page function 'perch_gallery_album_images', I am getting a blank <li> as follows:

<li>
        <a href="" class="gallery-link">
            <img src="" width="" height="" alt="">
        </a>
    </li>

Any reason why this would be ? There is no gallery item there. Tried deleting and readding last item to no avail.

Thanks

Adam Menczykowski

Adam Menczykowski 1 points

  • 7 years ago

This is the template code for a_list_image.html

<perch:before>
    <h1><perch:gallery id="albumTitle" /> Gallery</h1>

    <ul class="imagelisting glist">
</perch:before>
    <li>
        <a href="<perch:gallery id="main"  />" class="gallery-link">
            <img src="<perch:gallery id="small" />" width="<perch:gallery id="small-w" />" height="<perch:gallery id="small-h" />" alt="<perch:gallery id="imageAlt" />" />
        </a>
    </li>
<perch:after>
    </ul>
</perch:after>

Here is how I'm calling it on the master page:

<?php 
    perch_content_create('Gallery Name', array(
        'template' => 'gallery_name.html'
        ));
    $gallery_name = perch_content('Gallery Name', true);

    perch_gallery_album_images($gallery_name); ?>
Drew McLellan

Drew McLellan 2638 points
Perch Support

Did you have any failed uploads?

Not that I know of... how can I check? by looking in the DB?

Drew McLellan

Drew McLellan 2638 points
Perch Support

There's where I'd imagine the empty item could come from.