Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
Garland theme
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Jan 2010 at 19:25 UTC
Updated:
3 Sep 2010 at 14:23 UTC
In D7
function garland_menu_local_tasks() is not rendering, If I replace
function garland_menu_local_tasks() {
return menu_primary_local_tasks();
}
with
function garland_menu_local_tasks() {
$output = '';
if ($primary = menu_primary_local_tasks()) {
$output .= '<ul class="tabs primary clearfix">' . render($primary) . '</ul>';
}
if ($secondary = menu_secondary_local_tasks()) {
$output .= '<ul class="tabs secondary clearfix">' . render($secondary) . '</ul>';
}
return $output;
}
Borrowed fron Zen
My secondary menus work ;-)
Comments
Comment #1
asimmonds commentedIn Garland the secondary local_tasks are defined in:
then output from $tabs2 in page.tpl.php
Just tried a small module to test this, and the secondary tasks appear to display fine.
Try the stark theme, do they appear there?
How are the menus defined?
Comment #2
hutch commentedThe imagepicker module (which I maintain) uses an Iframe and that has
in function theme_imagepicker() in imagepicker.theme.inc
In most themes the menu is displayed but in Garland it comes out as 'Array', same goes for 'Stark'
imagepicker uses a template imagepicker-page.tpl.php which has
If I change this to
or
It works in Stark, gives me regular tabs but it only gives a list in Garland. When I look at the source in Garland I see that
<li>Is not wrapped in
<ul>so the css does not get applied.Zen renders beforehand so running $tabs through render() in imagepicker-page.tpl.php results in no menu at all.
I have found a similar issue with forms in D7, in my efforts to upgrade imagepicker module from D6 to D7 I have found that drupal_get_form() no longer automatically renders them, I have to do so explicitly in my theming.
I can see that this is a 'good thing' in as much as it gives a themer a chance to manipulate the array before rendering a menu or a form but I'm not sure what the 'correct' way of doing things is ;-(
Comment #3
Jeff Burnz commentedIs this still an issue hutch or did you work around this - how are things working in Seven?
Comment #4
hutch commentedIt all seems to have settled down, works with theme Seven, Garland and Corolla. I had forgotten about this thread so I'll set it to fixed