If URL IS ENTERED - use as link

3 posts by 2 authors in: Forums > CMS Builder
Last Post: January 22, 2014   (RSS)

By Damon - January 22, 2014

Hi Tina,

Try this:

<?php if($record['stallion_url']) : ?>
    <a href="<?php echo $record['stallion_url']; ?>"><?php echo htmlencode($record['title']); ?></a>
<?php else : ?>
    <a href="<?php echo $record['_link']; ?>"><?php echo htmlencode($record['title']); ?></a>
<?php endif; ?>

Let me know if this works for you.

Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By csdesign - January 22, 2014

Damon, It worked perfectly!! Thank you very much!