I have created a new page template page--membership.tpl.php and placed it in the /templates folder inside of my theme (the same folder as my regular page.tpl.php file). I flushed the cache, but my page sitename.com/membership is not picking up the changes. (I even tried deleting all of the content of the tpl file to see if it would mess up the page, but nothing.) Any ideas?
1 Answer
Reason of page--membership.tpl.php
not working for sitename.com/membership
may be:
Drupal used templates as page--[front|internal/path].tpl.php
based on the internal path of the current page. Do not confuse the internal path to path aliases (Pathauto module uses path aliases) which are not accounted for.
To create the template for page--membership.tpl.php
one may try one of the following methods:
Create template as
page--node--[NODE_ID].tpl.php
, here replace the[NODE_ID]
with the node id ofmembership
page.To get recognize the aliased paths, you have to add the aliased path as part of the theme suggestions: https://groups.drupal.org/node/130944#comment-425189
-
yeah, you're right. I used the internal path page--node--[NODE_ID].tpl.php and it worked. Oct 4, 2013 at 17:01