Reputation: 57
I noticed something odd when I switch themes. In garland, I can see the view & 'edit panel' tab buttons; but when I switch back to my custom theme, it disappears.
I already have the tabs line:
<?php if ($tabs): print '<ul class="tabs primary">'. $tabs .'</ul></div>'; endif; ?>
But it's just not appearing. Why is that?
Here is some of the code for page.tpl.php:
<div class="main-container">
<div class="mcontent">
<div id="content-header">
<?php if ($mission): print '<div id="mission">'. $mission .'</div>'; endif; ?>
<?php if ($tabs): print '<div id="tabs-wrapper" class="clear-block">'; endif; ?>
<?php if ($title): print '<h2'. ($tabs ? ' class="with-tabs"' : '') .'>'. $title .'</h2>'; endif; ?>
<?php if ($tabs): print '<ul class="tabs primary">'. $tabs .'</ul></div>'; endif; ?>
<?php if ($tabs2): print '<ul class="tabs secondary">'. $tabs2 .'</ul>'; endif; ?>
<?php if ($show_messages && $messages): print $messages; endif; ?>
<?php print $help; ?>
</div> <!-- /#content-header -->
<?php print $content; ?>
</div>
</div>
Upvotes: 0
Views: 2793
Reputation: 57
I hired someone to fix the issue, here is what is done:
<?php
/**
* Override of theme_menu_local_tasks().
* Add argument to allow primary/secondary local tasks to be printed
* separately. Use theme_links() markup to consolidate.
*/
function kidstoria_menu_local_tasks($type = '') {
if (module_exists('ctools')) {
if ($primary = ctools_menu_primary_local_tasks()) {
$primary = $primary;
}
if ($secondary = ctools_menu_secondary_local_tasks()) {
$secondary = $secondary;
}
}
else
{
if ($primary = menu_primary_local_tasks()) {
$primary = $primary;
}
if ($secondary = menu_secondary_local_tasks()) {
$secondary = $secondary;
}
}
switch ($type) {
case 'primary':
return $primary;
case 'secondary':
return $secondary;
default:
return $primary . $secondary;
}
}
Upvotes: 1
Reputation: 2810
I've used that code in quite a few custom themes without any issues so far.
It's hard to know without seeing the site/your code, but a couple of possibilities:
page.tpl.php
, not node.tpl.php
etc.Other things it could be (but maybe not if other themes are working):
Usually, either the code is in the wrong place, it's being hidden/obscured (by CSS/page formatting), or the person doesn't have the permissions to view it.
If none of the above work, you may want to rebuild permissions (in Drupal 6, Content Management > Post Settings > Rebuild Permissions), or play with enabling existing permissions to see if that's the culprit.
Upvotes: 1