defined('_JEXEC') or die;
$id = '';
if (($tagId = $params->get('tag_id', '')))
{
$id = ' id="' . $tagId . '"';
}
// The menu class is deprecated. Use nav instead
?>
<ul <?php echo $class_sfx; ?>"<?php echo $id; ?>>
<?php foreach ($list as $i => &$item)
{
$class = 'item-' . $item->id;
if ($item->id == $default_id)
{
$class .= ' default';
}
if (($item->id == $active_id) || ($item->type == 'alias' && $item->params->get('aliasoptions') == $active_id))
{
$class .= ' current';
}
if (in_array($item->id, $path))
{
$class .= ' active';
}
elseif ($item->type == 'alias')
{
$aliasToId = $item->params->get('aliasoptions');
if (count($path) > 0 && $aliasToId == $path[count($path) - 1])
{
$class .= ' active';
}
elseif (in_array($aliasToId, $path))
{
$class .= ' alias-parent-active';
}
}
if ($item->type == 'separator')
{
$class .= ' divider';
}
if ($item->deeper)
{
$class .= ' deeper';
}
if ($item->parent)
{
$class .= ' parent';
}
echo '<li class="main" id="ex5">';
switch ($item->type) :
case 'separator':
case 'component':
case 'heading':
case 'url':
require JModuleHelper::getLayoutPath('mod_menu', 'default_' . $item->type);
break;
default:
require JModuleHelper::getLayoutPath('mod_menu', 'default_url');
break;
endswitch;
// The next item is deeper.
if ($item->deeper)
{
if ($item->level == 1) {
echo '<ul class="sub">';
}
elseif ($item->level == 2) {
echo '<ul class="sub2">';
}
}
// The next item is shallower.
elseif ($item->shallower)
{
echo '</li>';
echo str_repeat('</ul></li>', $item->level_diff);
}
// The next item is on the same level.
else
{
echo '</li>';
}
}
?></ul>
не получается создать тег li с уникальным классом для ul sub (подменю) ,а выводит li одинаковый который прописан для всех, может кто то помочь? как это сделать?
Основные этапы разработки сайта для стоматологической клиники
Продвижение своими сайтами как стратегия роста и независимости