I know this is an issue with other themes as well but the theme just isn't working for me because the theme isn't rendering the main menu or user menu at all it is just the header with a logo, sitename, and slogan. The main menu option isn't even available under settings. Is there any way to fix this?

Comments

Deepika.chavan’s picture

Hi,
I tried the same thing on my local site.
1. Added following code in 'pixture_reloaded.info' file:

  features[] = main_menu

2. Added following code in template.php file under function pixture_reloaded_process_page(&$vars) function:

   if (isset($vars['main_menu'])) {
    $vars['primary_nav'] = theme('links__system_main_menu', array(
        'links' => $vars['main_menu'],
	'attributes' => array(
	                   'class' => array('links', 'inline', 'main-menu'),
                        ),
        ));
  }
  else {
    $vars['primary_nav'] = FALSE;
  }

3. Added following code in 'page.tpl.php' file after <?php print render($page['header']); ?> <!-- /header region --> line.

    <?php if ($primary_nav): ?>
        <div id="main-menu" class="primary-menu-bar">
          <h3 class="hidden" style="display: none;">Main Menu</h3>
          <?php print render($primary_nav);?>
        </div>
   <?php endif; ?>

4. Created custom css file 'local.css' and added following line in 'pixture_reloaded.info' file:

  stylesheets[all][] = local.css

5. Added following css code in local.css file.

#main-menu {
  clear: left;
  background: url("images/main-menu-bg.png") repeat-x 0 0;
  clear: left;
  height: 32px;
  line-height: 32px;
  padding: 0 15px;
}

#main-menu ul.links li {
  margin:0;
  padding:0 15px 0 0;
}

Note: Place your main menu background image in /images dir. and replace 'main-menu-bg.png' with your image name.
Please clear cached data.

HTH!!
Rgrds,

Deepika Chavan.

zackhawkins0103’s picture

Thank you very much! I was figuring I would have to tweak with the php and files with the theme, but I wasn't sure.

edit: this didn't work, it is giving me an error about the

Notice: Undefined variable: primary_nav in include() (line 23 of /home/a4636137/public_html/sites/all/themes/pixture_reloaded/templates/page.tpl.php).

Apparently $primary_nav doesn't exist.

smiletrl’s picture

Perhaps you need clear your cache before you want to see the difference.

zackhawkins0103’s picture

I cleared the cache of my site, and I also cleared my browsers cache, but the error was still there. I have decided to user superfish instead, as it is easier.

Jeff Burnz’s picture

Priority: Critical » Normal
Status: Active » Closed (works as designed)

This theme doesn't use those variables, it uses the Main menu and Secondary menu blocks, there are extra regions just for those blocks (e.g Menu Bar region) - if you stick any menu block in that region it will be automatically styled - this allows you to use something like Superfish or Menu Block module etc, i.e. its much more flexible approach.