I'm using Drupal 7 and trying to set my custom theme up.

I usually replace the index.html to page.tpl.php, then I change what I want it to be dynamic on my site. But now I have more than one HTML file which is about.html, blog.html and contact.html

Can anybody explain to me how to write that?

  • Please edit your question to provide more details about that "more than one HTML file", such as how these files relate to each other (or maybe there are like 5 pages, for 5 different pages of the website). Sep 11, 2017 at 13:11

2 Answers 2


Actually you may have to create a page--front.tpl.php for index page of your website and a page.tpl.php to have all other pages.

you could also use theme debug mode too. it can be enabled by including the following in settings.php,

$conf['theme_debug'] = TRUE;

The ablove will include theme suggestions as html comments, that helps you theming your pages.

  • If I create a page--front.tpl.php for index.html how can I crate page.tpl.php for contact.html, and blog.html . how can I writer all of them in page.tpl.php
    – Rami Salim
    Sep 11, 2017 at 15:15
  • I think you need to understand basics of Dupal theming from drupal.org, [Theming] (drupal.org/docs/8/theming). Please go through Regions, Blocks, Templates etc.,
    – Kana
    Sep 11, 2017 at 15:36
  • Thanks for your reply, can you guide me to a useful tutorial or some books for theming?
    – Rami Salim
    Sep 12, 2017 at 11:04
  • Drupal 8 Theming theoretically explained at, sqndr.github.io/d8-theming-guide/index.html For video tutorial I recommend the following, youtube.com/watch?v=a9u0B1F650U
    – Kana
    Sep 12, 2017 at 11:24

Simply create a file with the name "page.tpl.php". Below is the structure of how a theme folder should look like:

Custom theme structure

For further details read here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.