File: /htdocs/templates/miotemplate/html/mod_menu/default.php
Di seguito il file, che ne pensate? <?php[/font][/font][/color]/**[/font][/size][/font][/color] * @package Joomla.Site[/font][/color] * @subpackage mod_menu[/color] * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.[/color] * @license GNU General Public License version 2 or later; see LICENSE.txt[/color] */[/color] [/color]// No direct access. [/color] (http://www.php.net/defined)defined[/url]('_JEXEC') or (http://www.php.net/die)die[/url];[/b] [/font][/color]// Note. It is important to remove spaces between elements.[/color]?>[/color] [/color]<ul class="menu<?php echo $class_sfx;?>"<?php[/color]$tag = '';[/color]if($params->get('tag_id')!=NULL){[/color]$tag = $params->get('tag_id').'';[/color] (http://www.php.net/echo)echo[/url]' id="'.$tag.'"';[/font] [/color]}[/color]?>>[/color]<?php[/color]foreach($listas$i => &$item) :[/color]$class = 'item-'.$item->id;[/color]if($item->id == $active_id){[/color]$class .= ' current';[/color]}[/color] [/color]if( (http://www.php.net/in_array)in_array[/url]($item->id, $path)){[/font] [/color]$class .= ' active';[/color]}[/color]elseif($item->type == 'alias'){[/color]$aliasToId = $item->params->get('aliasoptions');[/color]if( (http://www.php.net/count)count[/url]($path) > 0 && $aliasToId == $path[ (http://www.php.net/count)count[/url]($path)-1]){[/font][/color]$class .= ' active';[/color]}[/color]elseif( (http://www.php.net/in_array)in_array[/url]($aliasToId, $path)){[/font][/color]$class .= ' alias-parent-active';[/color]} [/color]}[/color] [/color]if($item->deeper){[/color]$class .= ' deeper';[/color]}[/color] [/color]if($item->parent){[/color]$class .= ' parent';[/color]}[/color] [/color]if(! (http://www.php.net/empty)empty[/url]($class)){[/b]$class = ' class="'. (http://www.php.net/trim)trim[/url]($class) .'"';[/font][/color]}[/color] [/color] (http://www.php.net/echo)echo[/url]'<li'.$class.'>';[/font][/color] [/color]// Render the menu item.[/color]switch($item->type) :[/color]case'separator':[/color]case'url': [/color]case'component':[/color]require JModuleHelper::getLayoutPath('mod_menu', 'default_'.$item->type);[/color]break;[/color] [/color] default:[/color]require JModuleHelper::getLayoutPath('mod_menu', 'default_url');[/color]break;[/color]endswitch;[/color] [/color]// The next item is deeper. [/color]if($item->deeper){[/color] (http://www.php.net/echo)echo[/url]'<ul>';[/font][/color]}[/color]// The next item is shallower.[/color]elseif($item->shallower){[/color] (http://www.php.net/echo)echo[/url]'</li>';[/font][/color] (http://www.php.net/echo)echo[/url] (http://www.php.net/str_repeat)str_repeat[/url]('</ul></li>', $item->level_diff);[/font][/color]}[/color]// The next item is on the same level.[/color]else{ [/color] (http://www.php.net/echo)echo[/url]'</li>';[/b]}[/font][/color]endforeach;[/color]?></ul> |
|