Read More link

3 posts by 2 authors in: Forums > CMS Builder
Last Post: April 10, 2009   (RSS)

I would like to create a new editor with two (wysiwyg) fields with one being for summary and the other for extended content which I understand how to do. What I would like though is for the extended content (Read More) link to only show if the extended content area is used.

Thanks
Tim

Re: [Ginslinger] Read More link

By Damon - April 10, 2009

Hi Tim,

Here is the code you are after, just change the names to match yours:

<?php if($record['extended_content'] != "") : ?>
<a href="<?php echo $record['_link'] ?>">Read More</a><br />
<?php endif; ?>

Add this to your index page and the "Read More" link won't appear if nothing was entered in the Extended Content field.
Cheers,
Damon Edis - interactivetools.com

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