CMS - listings - wanting to have a <li> item appear with custom link when checked

5 posts by 2 authors in: Forums > CMS Builder
Last Post: July 15, 2010   (RSS)

Re: [meg] CMS - listings - wanting to have a <li> item appear with custom link when checked

By meg - July 15, 2010

Ok...so I looked into things a little further....I have a feeling it has something to do with the more advanced options in the Section Editor under list, multi-value checkbox: either "Get Options from Database" or "Get Options from MYSQL query"

Am I on the right track? If so, how do I do this? I'm treading new ground on these advanced options.

Again...I just want this checkbox, when activated, to add a menu item as such:
<li><a href="<?php echo $record['link_to_publication'] ?>" target="_blank">Link to Publication</a></li>

And actually have the link work, instead of displaying <?php echo $record['link_to_publication'] ?> as the link.

Re: [meg] CMS - listings - wanting to have a <li> item appear with custom link when checked

By Jason - July 15, 2010

Hi meg,

It seems like the field 'add_link_to_publication_button' will only ever have 1 value, it may be better to set it up as a regular check box. That way, if it's checked, we'll output some code, otherwise, we wont.

Something like this:

<?php if($record['add_link_to_publication_button']): ?>
<li><a href="<?php echo $record['link_to_publication'];?>" target="_blank">Link to Publication</a></li>
<?php endif ?>


Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

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

Re: [Jason] CMS - listings - wanting to have a <li> item appear with custom link when checked

By meg - July 15, 2010

Exactly! Works like a charm. [:)]
Thank you so much!!

Re: [meg] CMS - listings - wanting to have a <li> item appear with custom link when checked

By Jason - July 15, 2010

No problem. Glad everything is working for you now.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

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