Link to detail page

7 posts by 4 authors in: Forums > CMS Builder
Last Post: May 17, 2010   (RSS)

If there is no detail page to go to on a list page how can I remove the link to the detail page, but keep it for other list items on the list page?

Re: [MercerDesign] Link to detail page

By Chris - October 19, 2009 - edited: October 19, 2009

Hi MercerDesign,

How do you determine whether there's no detail page?

If you can give me concrete examples of when your detail link should and should not appear, I can probably come up with a simple solution for you.

P.S. If possible, please post your PHP source code for your page also.
All the best,
Chris

Re: [chris] Link to detail page

Hi, here is an example on the first entry, we don't need any content on the page after clicking Find out more >> so I need to hide that link.

http://www.ardingly.com/cmsTest/News_Independent_Schools_Sussex/News_list.php

Re: [Jason] Link to detail page

If there is no content in the "Content" field on the detail page then we don't want a link.
Attachments:

news_list.php 8K

Re: [MercerDesign] Link to detail page

By Damon - May 17, 2010

Hi,

If there is no content in the "Content" field on the detail page then we don't want a link.


Replace your current detail page link code with this code to only ouput the link to the detail page if there is content in the content field.

<?php if($record['content'] != "") : ?>
<p><b><a href="<?php echo $record['_link'] ?>">Find out more >></a></b></p>
<?php endif; ?>


If the content field is left empty, no detail link will appear.
If the content field has content, a detail link will appear.

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] Link to detail page

Thank you, that has helped with so many sites we are doing.