adding "Continue Reading" link

Permalink Browser Info Environment
Is there any way to add a link at the end of each teaser text like "Continue Reading..." or "more..."?

Thanks,
Michael LaBash

Type: Discussion
Status: New
lavapen
View Replies:
jordanlev replied on at Permalink Reply
jordanlev
Yes, you can do this by modifying the template as follows (assuming you're running Concrete5.5 or 5.6 and using the latest version of the addon):

1) copy this file:
SITEROOT/packages/page_list_teasers/blocks/page_list/templates/teasers.php

...to here:
SITEROOT/packages/page_list_teasers/blocks/page_list/templates/teasers.php

(you'll need to create some of those folders in the /blocks/ directory to put the copy of the "teasers.php" file into)

2) Edit the copy of the file ( SITEROOT/blocks/page_list/templates/teasers.php ), and find this chunk of code:
<div class="ccm-page-list-description">
   <?php  echo $teaser; ?>
</div>

...and change it to something like this:
<div class="ccm-page-list-description">
   <?php echo $teaser; ?>
   <a href="<?php  echo $url; ?>">Continue Reading...</a>
</div>


Hope that helps!

-Jordan
lavapen replied on at Permalink Reply
lavapen
Thanks. I'll try it out.

Is there any difference between the first two locations you listed...I cant see it:

1) Copy this file:
SITEROOT/packages/page_list_teasers/blocks/page_list/templates/teasers.php
...to here:
SITEROOT/packages/page_list_teasers/blocks/page_list/templates/teasers.php

Thanks!
Michael

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.