How do I create a page template?

a.m. picture a.m. · Mar 17, 2011 · Viewed 8k times · Source

So, I must be missing something. I want to create a specific template for a Basic Page with Drupal 7. I've read about doing something like creating a file called page—mypagename.tpl.php, and putting it in the theme folder but this has not worked for me. Can anyone provide a quick walk through for this?

Drupal makes my head hurt. :\

Thank you.

Answer

Shannon picture Shannon · Mar 17, 2011

Make sure to clear your cache in Drupal after major theme changes which include adding files to the theme as above, otherwise your theme may not pick up the new files.

Last I checked, the Devel module was still buggy for D7, but if it has come along then I highly recommend using this along with the devel_themer module, it has a tool that will tell you what exactly to name your theme files for different elements (pages, nodes, fields, etc).