Amir
Amir

Reputation: 11

how can i override Drupal 7 page.tpl.php but not sub pages?

OK so im using the profile2 module, and i want to override the page.tpl.php for the URL http://website.com/profile-main

I have created page--profile_main.tpl.php and this works perfect, however i dont want the changes to also affect pages which follow that page, for example http://website.com/profile-main/2456 or /profile-main/another/page

is this possible? Thank you

Upvotes: 0

Views: 281

Answers (1)

Bhavin Joshi
Bhavin Joshi

Reputation: 522

The first questions is, how do you want to do it? Do you want to do it a page/path or a node? If you want to override it for all the nodes of certain types or want to override for a path, I would suggest you to use panels pages instead. Its very flexible and you can achieve what you want!

Upvotes: 1

Related Questions