If I were linking to a node via a template file I would write something like this...

<a href="<?php echo url('node/22'); ?>">Back to blog</a>

I get that node ID by hovering over the node under 'Admin > Content' and looking at the node number that pops up when I hover over the 'edit' link in the bottom left (in Chrome). In the screenshot attached I've hovered over the 'edit' link alongside the node 'Head of Development' which shows node/5 in the bottom left.

enter image description here

The issue I've got is that I want to link back to a page view which doesn't show alongside all the other content. Thanks in advance.

2 Answers 2


Assuming the View is set up as a page, you are required to define the path under Page Settings:

enter image description here

So, given this example you would create a link with:

<?php print l(t('Link to Monkey!'), 'monkey'); ?>

You can find more information on the l() function here


I would recommend you to use l function to build links in Drupal.

  <?php print l(t('Back to blog'), 'node/22'); ?>

I see Content administration page on you screenshot. If you want to build link to this page you may use next piece of code

  <?php print l(t('Content'), 'admin/content'); ?>

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.