5

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) {
    print_r($variables);
    die;
}

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 Oct 2 '12 at 14:38
  • Both yes. I am using the subtheme as primary and enabled. – Lenin Oct 10 '12 at 14:06
  • Is it in the subtheme's template file or Zen's? – beth Dec 15 '12 at 14:43
  • Its in subtheme's template. – Lenin Dec 15 '12 at 14:53
  • Does your MYTHEME.info have the tag base theme="" set? Cache cleared? :) – Pontus Nilsson Dec 17 '12 at 7:39
0

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) {
    print_r($variables);
    die;
}
  • I have checked the same with zen theme as main and it worked but not when I call the same with subtheme. – Lenin Dec 17 '12 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 Dec 17 '12 at 13:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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