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

By Jason - May 14, 2010

Hi,

If you could attach the file News_list.php I can take a look at it for you.

Also, what are you using as the criteria for not including a link?

Thanks.
---------------------------------------------------
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] 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.