Cross posted from the ubercart forum, where I am not getting a response
So I'm currently building a drupal store framework along with a simple theme to enable me to create future ubercart stores with greater ease. I'm working (and have largely completed) building a generic theme that shouldn't require much further work to complete. However I've run into a hiccup. I've read of it in a few places online, and the solution is generally "I just said screw it , and it reinstalled, so all was good"
Anyways, I can get the "seconday edit tabs" to render in Garland. They are (confirmed via firebug) being rendered in the SECONDARY tabs when I am in the stock Garland theme.
So I go to my theme, and I have the following code for delivering the second set of tabs:
<?php
if($tabs2): print '<ul class="tabs secondary">'. $tabs2 .'</ul>'; endif;
?> Pretty darn simple right? It should be since it's copied from Garland! It doesn't render however! I've even tried this to no avail:
<?php print '<ul class="tabs secondary">'. $tabs2 .'</ul>'?>
That of course rendering and ATTEMPTING to print the secondary tabs no matter what, even if it's NULL. It removes the if...
So, in my own theme, when I go into the edit mode, $tabs2 is null. It isn't in garland. What the heck could be doing this in my theme? Isn't $tabs passed to me from Drupal core, and unless I redeclare it or something blatantly direct, what could be affecting it? Where is it different from my theme and everywhere else?
Given that $tabs2 is attempting to render in page.tpl.php, which ocurs before node.tpl.php, any code I have in node.tpl.php is therefore insigifnicant to this situation, correct?
Here is page.tpl.php for your review.
<?php
// $Id: page.tpl.php,v 1.18.2.1 2009/04/30 00:13:31 goba Exp $
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language->language ?>" lang="<?php print $language->language ?>" dir="<?php print $language->dir ?>">
<head>
<?php print $head ?>
<title><?php print $head_title ?></title>
<?php print $styles ?>
<?php print $scripts ?>
</head>
<?php global $node;?>
<body id="uberStore" class="node-<?php print $node-type?>">
<div id="overallContainer">
<div id="mainContent">
<div id="content">
<?php if ($tabs): print '<ul class="tabs primary">'. $tabs .'</ul>'; endif; ?>
<?php if ($tabs2): print '<ul class="tabs secondary">'. $tabs2 .'</ul>'; endif; ?>
<?php if ($show_messages && $messages): print $messages; endif; ?>
<?php print $help; ?>
<?php print $content ?>
</div>
<div id="sidebar">
<?php print $left ?>
</div>
<div class="clearBox"><!-- --></div>
</div>
<div id="navigation">
<a href="/"><h3>Uber Cart Generic Store</h3></a>
<div id="menuCart">
<?php print $cart?>
</div>
<ul id="menu">
<li><a href="/">Home</a></li>
<li class="categories"><a href="">Categories</a>
<ul></ul></li>
<li class="brands"><a href="">Brands</a>
<ul></ul></li>
<li><a href="">About Us</a></li>
<li><a href="">Blog</a></li>
<li><a href="">Contact Us</a></li>
</ul>
</div>
</div>
<?php print $closure ?>
</body>
</html>
Comments
template file
The variables available in your page.tpl.php (and all such templates) are defined first in template.php, as well as similar functions in modules. But since you've got the same modules for either theme, presumably $tabs2 is coming from Garland's template.php file and not core (like $tabs). If you find it in there, you might be able to just copy that code into the template.php file for your theme.
I actually started with
I actually started with garland, but of course stripped it down to near naked.
Anyways --> I copied all of the template file directly over. Flushed the cache. Nothing, nada, zip. Isn't tabs2 part of drupal 6 core? Anyways, whatever the reason, I still can't see the darn secondary tabs :(
Jesse Nicola -- Shredical six different ways to Sunday! -- My Portfolio
There it is
I took a look in Garland's template.php. There it is on line 56:
$vars['tabs2'] = menu_secondary_local_tasks();as a part of function phptemplate_preprocess_page.
This is the winner on what
This is the winner on what happened. I feel silly for missing it :)
Pardon the delay by the way, work happened, etc etc etc.
Jesse Nicola -- Shredical six different ways to Sunday! -- My Portfolio
Disabled secondary menu?
This sounds like secondary menu display isn't enabled in your theme at all. What does your theme settings page show?