I added this module to my website deleted all my old menu links and created a new one to test it out.
I am using this module so i can target="_blank" to open some links in new windows.
When I create a new menu link it appears in admin/structure/menu/manage/menu-top-categories and even works from there.
When i go to my website the new link appears but when clicked in opens in the existing window not in a new window. Where is this functionality lost? How can I make my News Pro theme compatible?
page.tpl.php code
print newspro_tree_cat()
template.php code
/* Top Categories */
function newspro_tree_cat($menu_name = 'menu-top-categories', $type = 'nav') {
static $menu_output = array();
if (!isset($menu_output[$menu_name])) {
$tree = menu_tree_page_data($menu_name);
$menu_output[$menu_name] = newspro_tree_output_cat($tree,$type);
}
return $menu_output[$menu_name];
}
function newspro_tree_output_cat($tree,$type) {
$output = '';
$items = array();
foreach ($tree as $data) {
if (!$data['link']['hidden']) {
$items[] = $data;
}
}
$num_items = count($items);
$s = '';
foreach ($items as $i => $data) {
if ($data['link']['in_active_trail']) $a = ' class="active"'; else $a = '';
if ($data['below']) {
$output .= '
";
}
else {
$output .= '
";
}
}
return $output ? '
- '. $output .'
'.$s : '';
}
function newspro_tree_output2_cat($tree) {
$output = '';
$items = array();
foreach ($tree as $data) {
if (!$data['link']['hidden']) {
$items[] = $data;
}
}
$num_items = count($items);
foreach ($items as $i => $data) {
if ($data['link']['in_active_trail']) $a = ' class="current"'; else $a = '';
if ($data['below']) {
$output .= '
";
}
else {
$output .= '
";
}
}
return $output ? '
- '. $output .'
' : '';
}
***************************************************************************
Please Help
Comments
Comment #1
amateescu CreditAttribution: amateescu commentedCan you print the template.php code wrapped in
<code>
tags?Comment #2
laroccadahouse CreditAttribution: laroccadahouse commentedI'm using 7x -1.0-rc1 and having a similar issue. I can open the links fine from the admin overlay, but in the main template they don't work. I am using Nice Menus to create drop downs menus so I'm thinking this might be the issue. if this is issue hijacking, i can make a new issue...
Comment #3
amateescu CreditAttribution: amateescu commentedThis is a problem with Nice Menus: #906130: Incompatible with Menu Attributes module. There's a patch for it in that issue.
Comment #4
laroccadahouse CreditAttribution: laroccadahouse commentedawesome. thanks
Comment #5
amateescu CreditAttribution: amateescu commentedNo response in a month so I'm closing this issue for now. Feel free to reopen if you can provide more info.
Comment #6
emsklar CreditAttribution: emsklar commentedHello,
I realize this issue was closed, however I am now having the same issue as amateescu originally stated. i don't do PHP, just use the main drupal interface and some css. like laroccadahouse said, I can open the links fine from the admin overlay, but in the main template they don't work.
please let me know if there are any solutions. thanks!
Comment #7
laroccadahouse CreditAttribution: laroccadahouse commentedcheck with the Nice Menus projectpage. they may have committed the patch to the latest version. Not really sure though. If you have someone that handles your backend support, have them apply the patch to your module.
Comment #8
stiggypop CreditAttribution: stiggypop commentedI am having the same issue with the News Pro theme. I am not using any menu modules. News Pro uses the following modules by default:
Drupal Modules Used
Drupal 7.x Compatible Only
Views
CCK
jQuery_update
Admin_menu
Imagefield
Imagecache
ImageAPI
Filefield
Date
Custom Breadcrumbs
Tagadelic
Related content
Twitter - Not in Drupal 7 Version
Help please?
Comment #9
stiggypop CreditAttribution: stiggypop commentedI am having the same issue with the News Pro theme. I am not using any menu modules. News Pro uses the following modules by default:
Drupal Modules Used
Drupal 7.x Compatible Only
Views
CCK
jQuery_update
Admin_menu
Imagefield
Imagecache
ImageAPI
Filefield
Date
Custom Breadcrumbs
Tagadelic
Related content
Twitter - Not in Drupal 7 Version
Help please?
Comment #10
tuyre CreditAttribution: tuyre commentedSorry. i have edited this, and removed my comments, as I've posted my issue to more suitable place, i.e. TB Megamenu issues page. unable to delete this post, only edit... sorry.
Comment #11
tuyre CreditAttribution: tuyre commented