I recently posted a question over at Drupal Answers - Stack Overflow which I thought might be better addressed here.
I am simply trying to change the "more-link" on a node display. My understanding was that that could be done by
adding an implementation of theme_more_link to template.php. However, that doesn't appear to work. I then noticed the
HOOK_theme implementation with its comment: // @TODO: Needs detailed comments. Patches welcome!
I tried adding a line:
$hooks['more_link'] = array( 'arguments' => array('url' => NULL, 'title' => NULL) );
to this hook. But that also failed. I then had a look at the value of $hooks returned by zen_theme() and it was a null array.
Is zen_theme() used by the zen theme and if so why are no hooks defined?
If anyone has the time, an explanation of how to do this would be helpful.
Thanks,
Note: the latest version of my code is at: http://pastebin.com/K2HztnFQ
Comments
I think you're trying to work
I think you're trying to work a little too hard at this. All you should have to do is to add a THEME_more_link() implementation in your subtheme's (not Zen's) template.php file. So if the system name of your subtheme is "myzen," the function name would be "myzen_more_link()." That should be all you need to do - no need to change anything in Zen's core files.
The Boise Drupal Guy!
Thanks for the comment
This was the first thing I tried. For some reason the function is never called. You can see this in the discussion that I referenced.
Hmm. Did you do a cache clear
Hmm. Did you do a cache clear after creating the new hook implementation?
The Boise Drupal Guy!