2

I created a view which is viewable at http://mysite.com/branch-locator. The view is being displayed by my page.tpl.php. How do I override this and use a new template file called branchlocator.tpl.php to display my view?

1 Answer 1

2

How specific do you need to be with the name of your template file? You should be able to create a page--branch-locator.tpl.php that gets picked up by Drupal's auto-detection mechanism. At least, that would have worked in D6 (minus the extra hyphen after page).

2
  • oh cool, i was doing views--branch-locator.tpl.php
    – John
    Aug 5, 2011 at 14:39
  • this use of the page-- naming convention uses the path alias, so if your path to the view changes, you'll need to update the tpl file.
    – akalata
    Aug 5, 2011 at 14:55

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.