0

I have a Drupal 6 site where I've added a submenu for a new set of products:

products
-old products set 1
-old products set 2
-new products set
--new product 1
--new product 2
--new product 3

that goes to a page where that link then becomes a main menu item:

new products set
-new product 1
-new product 2
-new product 3

I found the code:

$variables['layout'] = 'none';
if (!empty($variables['left'])) {
  $variables['layout'] = 'left';
}

in the template_preprocess_page function in the theme.inc file.

On the main menu page, the left sidebar appears with the menu block in it ($variables['left'] is turned on) but on the submenu page, it is not appearing ($variables['left'] is turned off). The menu block has both pages listed on the 'page specific visibility settings'. I'm trying to figure out why the difference but the problem is I cannot find where $variables['left'] ever gets set prior to that in the code. Any idea ??

  • Hi, @ronnienorwood. I would first make sure that your menu is rendering on the page where the sidebar is "disappearing". If there are no menu items there will be no content, and no sidebar. (To clarify: $left is populated by block content. In template_preprocess_page() try printing out the value of $variables['left']. If it is empty, there is no block content.) – othermachines Aug 23 '15 at 21:33
  • Thank you, @othermachines. The menu items under the primary links are rendering on the page. I ended up changing the menu block settings from having the 'fixed parent item' at the top level with 'starting level' set to 2nd to having the 'fixed parent item' at 'new products set' with 'starting level' to 1st. Now they both work fine. – ronnienorwood Aug 24 '15 at 18:44
0

I ended up changing the menu block settings from having the 'fixed parent item' at the top level with 'starting level' set to 2nd to having the 'fixed parent item' at 'new products set' with 'starting level' to 1st. Now they both work fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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