-
AuthorPosts
-
September 14, 2006 at 7:28 pm #117197
Anyone know why I get this in the middle of my suckerfish menu having substituted 2 for 1 in line 30 (and masses of similar messages if I substitute 3 for 1)??
Notice: Undefined offset: 1 in /home/jdowie/web/joomla/templates/ja_polaris/ja_cssmenu/ja-cssmenu.php on line 30
Khanh Le ModeratorKhanh Le
- Join date:
- November 2013
- Posts:
- 1884
- Downloads:
- 41
- Uploads:
- 31
- Thanks:
- 44
- Thanked:
- 203 times in 131 posts
September 19, 2006 at 2:52 am #210543Dear jackdow,
Please try to apply new code in file ja-cssmenu.php as following instruction:
Find and remove code from line 23 to 42 (the switch ($row->type) block):
[PHP]
switch ($row->type) {
case ‘separator’:
case ‘component_item_link’:
break;
case ‘content_item_link’:
$temp = split(“&task=view&id=”, $row->link);
$row->link .= ‘&Itemid=’. $mainframe->getItemid($temp[1]);
break;
case ‘url’:
if ( eregi( ‘index.php?’, $row->link ) ) {
if ( !eregi( ‘Itemid=’, $row->link ) ) {
$row->link .= ‘&Itemid=’. $row->id;
}
}
break;
case ‘content_typed’:
default:
$row->link .= ‘&Itemid=’. $row->id;
break;
}
[/PHP]Insert new code to that position:
[PHP]
switch ($row->type) {
case ‘separator’:
case ‘component_item_link’:
break;case ‘url’:
if ( eregi( ‘index.php?’, $row->link ) ) {
if ( !eregi( ‘Itemid=’, $row->link ) ) {
$row->link .= ‘&Itemid=’. $row->id;
}
}
break;case ‘content_item_link’:
case ‘content_typed’:
// load menu params
$menuparams = new mosParameters( $row->params, $mainframe->getPath( ‘menu_xml’, $row->type ), ‘menu’ );$unique_itemid = $menuparams->get( ‘unique_itemid’, 1 );
if ( $unique_itemid ) {
$row->link .= ‘&Itemid=’. $row->id;
} else {
$temp = split(‘&task=view&id=’, $row->link);
if (count($temp) > 1){
if ( $row->type == ‘content_typed’ ) {
$row->link .= ‘&Itemid=’. $mainframe->getItemid($temp[1], 1, 0);
} else {
$row->link .= ‘&Itemid=’. $mainframe->getItemid($temp[1], 0, 1);
}
}
}
break;default:
$row->link .= ‘&Itemid=’. $row->id;
break;
}
[/PHP]Please let me know if this could fix your problem.
-
AuthorPosts
This topic contains 3 replies, has 2 voices, and was last updated by jackdow 18 years, 3 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum