By johnnybegood on
Can somebody please indicate me how to change, if possible, the link title "Read the rest of this posting" without touching the core.
This line is in the node_link function in /modules/node.module. Can I do something about it in template.php in my theme folder?
The small issue I have with this is that when testing my site to pass AA accessibility all my "read more" links have the same title and I'd like to change that so each one has a unique title.
Thanks!
Comments
Try...
http://drupal.org/project/themesettings
Michelle
--------------------------------------
My site: http://shellmultimedia.com
In a module this is easy
hook_link_alter is specifically for doing something like this:
Nancy W.
Drupal Cookbook (for New Drupallers)
Adding Hidden Design or How To notes in your database
NancyDru
Thanks guys
Thank you very much guys!
The Theme Settings module is interesting but I don't think it allows me to have a unique title for each link. For example if my article is entitled "news from UK" I'd like to have on the title link of the teaser something like: "read more news from UK". I thought here to attach the node title to the string maybe. That way all read more link titles would be different.
About using the hook, sorry for the nooby question but where should I add this? Do you mean I should write a module to implement this? Is it not possible to call this in template.php?
Once again thanks for your help.
Yes, it needs to be a module
Yes, it needs to be a module. On the plus side, that makes it theme-independent.
Nancy W.
Drupal Cookbook (for New Drupallers)
Adding Hidden Design or How To notes in your database
NancyDru
I got my accessible link titles
Thanks for your tip Nancy. I ended up playing with hook_link and now I got what I need it. I leave the code if someone else needed it.
Updating Theme Settings
Interesting idea: including the node title in the read more link.
We could extend that idea and allow any node meta data in the read more link.
Seeing as I’m the author of the Theme Settings module, I think I’ll add that feature to the upcoming 5.x-2.0 version.
- John
Albin.Net : friendly web development
- John (JohnAlbin)