I have tried the way described in http://api.drupal.org/api/drupal/includes%21theme.inc/function/theme_link/7#comment-24463

But as it seems it works on the main theme but not on a subtheme.

function MYTHEME_link($variables) {

Yeilds no result.

Applied on Zen theme which results the menus.

But on a subtheme it shows nothing. Anyone knows why?

  • Are you using the sub theme as your primary theme? Is it enabled?
    – Alex Gill
    Commented Oct 2, 2012 at 14:38
  • Both yes. I am using the subtheme as primary and enabled.
    – Lenin
    Commented Oct 10, 2012 at 14:06
  • Is it in the subtheme's template file or Zen's?
    – beth
    Commented Dec 15, 2012 at 14:43
  • Its in subtheme's template.
    – Lenin
    Commented Dec 15, 2012 at 14:53
  • Does your MYTHEME.info have the tag base theme="" set? Cache cleared? :) Commented Dec 17, 2012 at 7:39

1 Answer 1


I believe it is a typo, the function should be MYTHEME_link and not MYTHEME_links.Possible other ways to identify is use theme engine phptemplate_link instead of your theme name.

Try clearing your theme registry. Also Check whether you have spelled your theme machine name correctly.

function MYTHEME_link($variables) {
  • I have checked the same with zen theme as main and it worked but not when I call the same with subtheme.
    – Lenin
    Commented Dec 17, 2012 at 13:31
  • And also I had the typo, not what I have tried. As it worked for Zen theme it should have worked on sub theme also. I'll give it a try with phptemplate_link and let you know.
    – Lenin
    Commented Dec 17, 2012 at 13:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.