Switching links on programs

4 posts by 3 authors in: Forums > CMS Builder
Last Post: May 13, 2009   (RSS)

Re: [interchanges] Switching links on programs

By Damon - May 12, 2009

Hi,

Trying using this code to only display the web link if there is no uploads:

<?php if(!$record['file']) : ?>
<?php echo $record['web_link'] ?><br />
<?php endif ?>

Hope that helps.
Cheers,
Damon Edis - interactivetools.com

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

Re: [Damon] Switching links on programs

Hey Damon,

That did not work when i placed it in the code. That essentially removed the link to the file and the URL and made all the links go back to my homepage which isnt even in the system. here is what i did which might be wrong, please let me know.

<?php foreach ($record['file'] as $upload): ?><a href="<?php if(!$record['file']) : ?><?php echo $record['web_link'] ?><?php endif ?>"><?php echo $record['title'] ?></a><?php endforeach ?>

Re: [interchanges] Switching links on programs

By ross - May 13, 2009

Hi there.

Could you post a link to the page you are working on? I'd like to see your code in action.

Thanks!
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/