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.

Altering the page from the theme layer

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:02
    Altering the Page from the Theme Layer
  • 0:06
    with Joe Shindelar
  • 0:07
    In this chapter we're going
  • 0:09
    to continue talking about implementing
  • 0:11
    hooks inside of our theme.
  • 0:13
    This time around we're going to take a look at hook_page_alter.
  • 0:17
    We can take a look at the documentation
  • 0:18
    for the hook_page_alter function an first.
  • 0:23
    Hook_page_alter comes into play when we start talking about renderables.
  • 0:28
    If you remember earlier in this series,

Altering the Page from the Theme Layer


This chapter explains hook_page_alter(), which is another alter hook new to Drupal 7 and to the theme layer. Each page rendered by Drupal is contained within an array where the theme is able to go in and rearrange, delete or duplicate specific page elements.

Additional resources: