Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By Z2222 on
How do you remove all $links from the teaser except the "read more" link?
Comments
hook_links_alter
hook_links_alter or change you theme. There are many posts out here about how to do it.
Nancy W.
Drupal Cookbook (for New Drupallers)
Adding Hidden Design or How To notes in your database
NancyDru
hook_link_alter()
By implementing hook_link_alter() whithin a module you can play around with the links.
$links
I'm not sure how to do that. I've seen the hook_link_alter() page but it assumes prior knowledge of information that I don't know where to find...
Here's some code you can
Here's some code you can drop into a custom module for your site.
$links
Thanks for the tip, but I'm not sure how to make a module. Is there a way to do it without creating a module?
Right now I'm doing something like:
But that doesn't work if I want a little more control—like maybe also leaving the link to the author's blog.
Docs
Just found the answer here:
http://drupal.org/node/134442
Yep that'll work as well -
Yep that'll work as well - though not as cleanly as using a module. Just be careful as
theme_links
is called by menus and all sorts so it would be easy to break the site.As far as I can tell,
As far as I can tell, $node->teaser is set at this point whether the node is being shown as a teaser or in full -- is there a way of distinguishing between teaser and full context?
Remove te Read More link completely
Hi All,
I have been reading a lot about modifying the teaser, including the module that changes the location where it is displayed. But I do not want to use that functionality at all. I just want the pages to be displayed fully. No Read more links.
Can someone help me and tell me how to do that?
Rob
you should start a new post
This is unrelated to the current conversation.
Look in /admin under the content stuff for post settings.
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide
Change your Teaser length to unlimited
Nancy W.
Drupal Cookbook (for New Drupallers)
Adding Hidden Design or How To notes in your database
NancyDru
You may use project "Fix teaserlinks"
The project Fix teaserlinks may be used to mange the visibility of the links that appear below teasers (i.e. “Add new comment”, “Log in or register to post comments” and “Read more”).
- gisle