Check your version

This video covers a topic in Drupal 7 which may or may not be the version you're using. We're keeping this tutorial online as a courtesy to users of Drupal 7, but we consider it archived.

Establish Page Layout Structure with page.tpl.php

Video loading...

Join Drupalize.Me to watch this video

Join today and gain instant access to our entire video library.

Log in Sign up
  • 0:01
    Establish the Page Layout Structure with page.tpl.php
  • 0:03
  • 0:04
    Emma Jane Westby
  • 0:08
    Drupal uses a series of nested template files
  • 0:11
    to compile the page that we end up seeing
  • 0:13
    rendered and viewed in our browser.
  • 0:16
    These template files hold lots of different tiny chunks
  • 0:19
    that we'll actually see this being fragments of HTML
  • 0:22
    when they're rendered.
  • 0:23
    The fragment or the template file that
Loading ...

Establish Page Layout Structure with page.tpl.php


Drupal uses a series of nested template files to build out the rendered HTML pages we see in our browser. The template file page.tpl.php holds markup between <body> and </body> tags. We talked about the nested nature of template files in Lesson 3: Theming by Component.

In this lesson we will:

  • create the file page.tpl.php
  • add the relevant markup, and CSS classes for our grid framework
  • insert relevant PHP variables so that Drupal can render each of its page components.

By the end of this lesson you will be able to create, or adapt, a page.tpl.php file to suit the conventions you identified in your style guide.

Log in or sign up to download companion files.

Additional resources:
There are no resources for this video. If you believe there should be, please contact us.