quite new to drupal here so forgive me if things seems evident for you.
i'm building onto an already existing site in drupal 7. the site is a onepager frontpage and from the frontpage there are links to various content types.
now i created a new content type named article.

when i link to such an article from the frontpage i (arrive at an article and) cannot go back to the frontpage through the menu anymore, while it does work with the other content types. I have searched and searched and made sure every setting is the same as the other content types but the links just don't work (they do nothing).
I did see in the templates folder that there are template files for each content type except the one i made. I'm wondering if that is the problem? If so, i don't know what exactly to do to keep it working though. I duplicated a template file and renamed it after node-article.tpl.php, but i guess it doesn't suffice.

can anyone assist?


  • "i cannot go back to the frontpage through the menu anymore," - how so? menu item disappears? Or you click but nothing happens? Or what exactly?
    – Mołot
    Commented Oct 17, 2014 at 12:55
  • What is href in both situations? What's in browser's console?...
    – Mołot
    Commented Oct 17, 2014 at 13:37
  • the menu items are still there so there's nothing wrong with the menu in itself, it's just that when i click on a menu-item when i'm at content-type a, it takes me back to the frontpage. When i click on that same menu-item in content-type b (which i created), nothing happens. I checked everything and cannot see the difference between content-type a and b, except that there are template files for a and not for b. Sadly i don't know in which direction to look, i lack someunderstanding of how drupal works, but i'm learning it. Hope this track helps me find the answer quicker. thx Commented Oct 17, 2014 at 13:40
  • that's just it, the href stays exactly the same, in both conditions. When i click on the link in the element inspector, it works just fine, but it doesn't when i click on the actual link Commented Oct 17, 2014 at 13:41
  • 1
    i seem to be spotting the problem (thanks to the console i apparently missed): i have this module 'ShareThis' installed and apparently the console error has something to do with Facebook. I disabled it and the error messages above are gone but the menu still doesn't work. Now i get: Uncaught TypeError: Cannot read property 'top' of undefined Commented Oct 17, 2014 at 13:57

2 Answers 2

function THEME_preprocess_node(&$variables) {

put this code into you template.php this will give you the suggestions to make your tpl file.

And for your answer you just can print anything in you page.tpl.php file it prints then you just have to change in your page.tpl.php file

  • I don't think this answers the question in question's body. Sadly, question is bit ambiguous.
    – Mołot
    Commented Oct 17, 2014 at 12:57
  • i know, i have this problem with expressing what i mean when i don't exactly know what i'm talking about;) Commented Oct 17, 2014 at 13:35

just for the record, i found the problem. Apparently i needed to tell the main.js to check on the current page if it contained a certain string. If it didn't it could go back to the frontpage. I just needed to add that bit of code for that content type: if(window.location.href.indexOf("customercase") == -1 && window.location.href.indexOf("jobs") == -1 && window.location.href.indexOf("article") == -1)

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.