By tms8707056 on
I have created an image_gallery content type. I would like the teasers on the fron page of my site to have a link that says "View All Pictures" instead of "Read More". I have created a template file for this content type and figured out that the block below handles the link.
<?php if ($links): ?>
<div class="links"><?php print $links; ?></div>
<?php endif; ?>How can I modify that section to read "View All Pictures" and link to the full page of content? Is this possible in the template file for the content type?
Comments
You have a bunch of
You have a bunch of options
1. Write a custom module and implement hook_link_alter() (D6 only)
2. The template stuff ofcourse. Reimplement phptemplate_links as necessary into your new theme.
3. Do it with ReadMore Tweak? (Not sure)
4. Do it with Contemplate by manually coding whatever you'd want into the teaser
- Pavan Keshavamurthy
http://grahana.net/
- Pavan Keshavamurthy
http://grahana.net/
Figured it out...
I actually figured out a way to do it. I used the Custom Links module to insert the new "View All Photos" link. I removed the "Read more" link with code I found over at FreshBlurbs.com for moving the "Read more" link.
Original code (http://www.freshblurbs.com/how-hack-read-more-drupal):
Remove the following line to prevent the link from displaying on teasers.
In Drupal 7, perhaps a patch is necessary?
I had this exact same issue and in Drupal 7, thought I could alter the locale to modify the "Read more" link in taxonomy teaser list views.
I could, by editing in settings.php like this:
Problem is, then all content types show "Product Data", and I just want it for "Products."
The fix is to patch the node.module, which I know is a no-no, but unfortunately, it's not leveraging the context option which allows the translation to serve a context of where it's translating something. So the following change in node.module:
Allows me to modify "Read more" based on the content type. Much cleaner. Not sure how to propose this change as a patch.
Final result:
Cheers.
Related Issue Queue Item
Wanted to link back from here to https://drupal.org/node/49428