I'm aware that $front_page is a variable used in page.tpl, but is there a way to use it (or something similar other than a direct link) to print the index url in a node.tpl?

1 Answer 1



function MYTHEME_preprocess_node(&$vars) {
  $vars['front_page'] = url();
  • Brilliant, works perfectly. Thank you very much! Do you have any tip on where I can read up on how this works in general?
    – Lenny
    Commented Dec 11, 2015 at 9:43

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.