Решил сделать выбор подкатегорий на главной через jQuery.
Исходники брал здесь
http://efimov.ws/main/develop/javascript/jquery-mootols-css-plagini-part-6.htmlФайл dcverticalmegamenu.css закинул в папочку CSS своего шаблона
Файл jquery.dcverticalmegamenu.1.3.js и jquery.hoverIntent.minified.js закинул в папочку js своего шаблона
В файле index.php своего шаблона, между <head></head> прописал так
<link href="templates/[b]шаблон[/b]/css/dcverticalmegamenu.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type='text/javascript' src='templates/[b]шаблон[/b]/js/jquery.hoverIntent.minified.js'></script>
<script type='text/javascript' src='templates/[b]шаблон[/b]/js/jquery.dcverticalmegamenu.1.3.js'></script>
<script type="text/javascript">
$(document).ready(function($){
$('#mega-1').dcVerticalMegaMenu({
rowItems: '2',
speed: 'slow',
effect: 'fade',
direction: 'right'
});
});
</script>
В файле /components/com_adsmanager/views/front/view.html.php
Функцию function recurseCategories переписал так
function recurseCategories( $id, $level, &$children) {
if (@$children[$id]) {
$i=0;$first=true;
foreach ($children[$id] as $row) {
$link = TRoute::_("index.php?option=com_adsmanager&view=list&catid=".$row->id);
if ($level == 0)
{
?>
<li>
<?php
if (file_exists(JPATH_BASE."/images/com_adsmanager/categories/".$row->id."cat.jpg"))
echo '<a href="'.$link.'" title="'.$row->name.'"><img class="imgcat" src="'.$this->get('baseurl').'/images/com_adsmanager/categories/'.$row->id.'cat.jpg" alt="'.$row->name.'" />'.$row->name.' ('.$row->num_ads.')</a>';
else
echo '<a href="'.$link.'" title="'.$row->name.'"><img class="imgcat" src="'.$this->get('baseurl').'/components/com_adsmanager/images/default.gif" alt="'.$row->name.'" />'.$row->name.' ('.$row->num_ads.')</a>';
?>
<ul>
<?php
}
else
{
if ($first == false)
echo '<li><a href="'.$link.'" title="'.htmlspecialchars($row->name).'">'.htmlspecialchars($row->name).'</a></li>';
$first = false;
}
if ($level == 0)
{
$this->recurseCategories( $row->id, $level+1, $children);
}
if ($level == 0)
{
?>
</ul></li>
<?php
}
}
}
}
И в файле /components/com_adsmanager/views/front/tmpl/default.php, должно быть так
<div class="demo-container clear"><div class="test"><ul id="mega-1" class="mega-menu">
<?php
$this->recurseCategories( 0, 0, $this->cats);
?>
</ul></div></div>
Результат на
new.ad.kh.uaПоявилась проблема не загружаются подкатегории в IE9.
Помогите кто может! [вложение удалено Администратором]