I am using Panels Bootstrap Layouts. I insert bootstrap_twocol_stacked into the $content region.

I'd like to be able to access regions of that Bootstrap layout (Top, Left, Right, Bottom) in my page.tpl.php template to restructure the HTML code, but I only seem to have an access to the content. $page['content']['system_main']['content']['#markup'] variable when run e.g.

function theme_preprocess_page(&$variables) {

only contains rendered HTML code and does not give me option to access Bootstrap data as array, like $page['content']['***']['top'].

I tried to look for a preprocess hook (probably one of the panels module function), but could not figure out which one.

Any hints?

enter image description here

What I am trying to do is to move the bootstrap region to the same hierarchy level in the page.tpl.php as other page regions, see the image below. enter image description here

1 Answer 1


Here the solution, if somebody is interested:

create new section in your theme, call it e.g. bottom-section and use this preprocess hook to move the content of the bottom pane to bottom-section section

function theme_preprocess_panels_pane(&$variables) {
  if ($variables['pane']->panel == 'bottom') {
    // Move to a region
    drupal_add_region_content('bottom-section', $variables['content']['#markup']);
    // Delete the pane from the panel
    $variables = array();

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.