WordPress.org

Ready to get started?Download WordPress

Forums

NextGEN Gallery
Nextgen Custom template - Conditional Statement not working (2 posts)

  1. emj
    Member
    Posted 3 years ago #

    Hi all

    Am using Nextgen to create a portfolio gallery on my website. Portfolio will contain thumbs that link to a bigger version of the image, and thumbs that when clicked on, will play a youtube video, both will load in lightbox (vidbox) window.

    Basically, am trying to create an If /else statement that looks for a youtube URL in the description field. If a URL exists, open it, otherwise, open to a larger version of the image.

    Am using this code - the first part is fine, but the else doesnt seem to work:

    description)) { echo $image->description; } else { echo $image->imageURL; } ?> " title="<?php echo $image->description ?>" <?php echo $image->thumbcode ?> >

    If anyone could help out, would be much appreciated!

    :)

  2. emj
    Member
    Posted 3 years ago #

    sorry:

    <a rel="vidbox 800 600" href="<?php if (!empty($image->description)) { echo $image->description; } else { echo $image->imageURL; } ?> " title="<?php echo $image->description ?>" <?php echo $image->thumbcode ?> >

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.