I created my own theme in Drupal 7. It is not sub-theme. Simple I created a folder at sites/all/themes/my_foundation, a template.info as usual, then an empty page.tpl.php.

I expected that a blank white page is obtained after enabling the new theme and visiting the home page. However, I have got a page with some contents as screenshot: enter image description here

I need to know how it was occurred and how could I get the expected behavior?


This is the expected behavior if page.tpl is missing:

Since your theme does not print anything in page, the Core system module (the one that defines page.tpl.php etc) takes over and drupal uses system's page.tpl.

I suppose that if page.tpl is empty the default page array is rendered with any region that exists in your theme's.info and has content.If regions exist, Drupal will try to render them even without template.

| improve this answer | |
  • Yes it is, it was an empty file, it was just file system file in the theme folder named page.tpl.php with <?php ?> as content only. doing some printing solves the issue with copying html.tpl.php to the theme too. I think there is a bug in clear cache of my testing Drupal version that I have. – SaidbakR Jun 28 '14 at 21:08
  • same with a blank html.tpl.php – Rommel Castro A Jun 28 '14 at 22:10

Use empty_front_page module.

By Install and active this module front pagecin drupal is clear.

| improve this answer | |

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.