I created a subtheme of Zen and even though the .info file shows regions[page_top] = Page top as an option and uncommented, I cannot use this region.

In the blocks page, this page_top region is not an option within the drop-down menus.

-I have refreshed the theme registry
-I even enabled Zen as my default theme to check if the issue was with my custom theme, even with Zen enabled I do not have that region as an option.
-As a sanity check I tried commenting out other regions in the .info file to see if they disappeared from the blocks admin page, and they do.

Is page_top really a region?

On the html.tpl.php file included with Zen, $page_top is listed as a variable, is this just a variable with the same name use for a different purpose or is it the actual region?

On the Zen page.tpl.php, page_top isn't even listed?????

* Regions:
 * - $page['help']: Dynamic help text, mostly for admin pages.
 * - $page['highlight']: Items for the highlighted content region.
 * - $page['content']: The main content of the current page.
 * - $page['sidebar_first']: Items for the first sidebar.
 * - $page['sidebar_second']: Items for the second sidebar.
 * - $page['header']: Items for the header region.
 * - $page['footer']: Items for the footer region.
 * - $page['bottom']: Items to appear at the bottom of the page below the footer.

Why put "page_top " as a region in the info file but not in page.tpl.php?

Is the "page_top" region the $page_top variable in html.tpl.php?

I was looking for this region in order to change the background image dynamically on multiple sections of a site through block visibility. The other regions are constrained to the main div's width, ~960px, so you can't stretch something across the whole page....

Comments

tropicfruit’s picture

i solved it temporarily by naming another region (eg. page_footer) in my subtheme .info-file and adding that region in the page.tpl.php of the same theme. now the regio is showing up on the blocks page as usual ...

chrispomeroy’s picture

Think I should file this as a Zen issue?

It seemed way too simple for it to be a bug so I figured I would try here first and rule out stupidity.

athanor’s picture

In case anyone wonders about that one: this a new thing in D7 - $closure is gone, with $page_top and $page_bottom added as hidden blocks. See http://drupal.org/node/519782

happysnowmantech’s picture

From http://drupal.org/node/519782 : "Drupal 7 now comes with two hidden default regions internally named page_bottom and page_top. They are hidden in that they will not show up in the blocks administration interface, but they can receive programmatic data."

I basically ended up using the same workaround that tropicfruit mentioned.

tigron’s picture

@tropicfruit & happysnowmantech, would either of you mind helping me with the workaround you both did ? I created another region like you mentioned and that showed up but I still am not getting page_top to show up, or page_bottom for that matter. Thanks in advance.

Steel sharpens Steel !

eyn’s picture

Add this to your .info file in the theme

...
regions[top]       = Page top
regions[header]         = Header
regions[navigation]     = Navigation bar
regions[highlighted]    = Highlighted
...
geraldito’s picture

To make it work in D8, I changed the name of the region in .info file from page_top to top:

regions:
  top: 'Page top'

And than used it in page.html.twig like:

{{ page.top }}