1

This should be really simple, maybe I'm just having a moment. Why is my page--front.tpl.php not rendering my home page? I'm using a tao subtheme.

Here's my tpl.php file.

enter image description here

(There's no other page--front.tpl.php in the tao folder.)

Here's my front page settings:

enter image description here

And here's theme developer telling me that the front page is using page.tpl.php to load:

enter image description here

I've cleared my cache with drush a couple times and restarted my local server. What else am I missing?

  • are the user/group ids and permissions the same as the rest of the files in the directory? eg, can your webserver read it. – Jimajamma Aug 3 '13 at 15:42
  • don't add .php at the last of file name, just only add the page--front.tpl – Bala Aug 5 '13 at 0:53
3

I think I see a Windows specific issue here.

Notice how block.tpl only has the extension tpl and your new file page--front.tpl.php has php as extension in the filename?

Maybe Windows hides the php extension when you list files (and instead shows it under Type)?

Try removing .php from page--front.tpl.php and see if it still under the Type column shows up as php. If so clear cache and carry on :)

  • Spot on :D Thank you so much for that, it actually solved another problem where I'd done the same thing as well. (Also thank you to Bala for spotting the same thing) – Dominic Woodman Aug 5 '13 at 18:24
1

Following steps resolved the issue to create custom front page for Drupal 7.

  1. Create a file - page--front.tpl.php. Notice two hyphens instead of one.
  2. Clear the cache - Configuration >> Development >> Performance>> Clear all caches

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.