Version Notes
fefd
Download this release
Release Info
| Developer | Magento Core Team |
| Extension | Kgn_Explodemenu |
| Version | 0.1.5 |
| Comparing to | |
| See all releases | |
Code changes from version 0.1.1 to 0.1.5
app/code/local/Kgn/Explodemenu/etc/config.xml
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<config>
|
| 3 |
+
<modules>
|
| 4 |
+
<Kgn_Explodemenu>
|
| 5 |
+
<version>0.1.5</version>
|
| 6 |
+
</Kgn_Explodemenu>
|
| 7 |
+
</modules>
|
| 8 |
+
<frontend>
|
| 9 |
+
<routers>
|
| 10 |
+
<explodemenu>
|
| 11 |
+
<use>standard</use>
|
| 12 |
+
<args>
|
| 13 |
+
<module>Kgn_Explodemenu</module>
|
| 14 |
+
<frontName>explodemenu</frontName>
|
| 15 |
+
</args>
|
| 16 |
+
</explodemenu>
|
| 17 |
+
</routers>
|
| 18 |
+
<layout>
|
| 19 |
+
<updates>
|
| 20 |
+
<explodemenu>
|
| 21 |
+
<file>explodemenu.xml</file>
|
| 22 |
+
</explodemenu>
|
| 23 |
+
</updates>
|
| 24 |
+
</layout>
|
| 25 |
+
</frontend>
|
| 26 |
+
<!-- <admin>
|
| 27 |
+
<routers>
|
| 28 |
+
<explodemenu>
|
| 29 |
+
<use>admin</use>
|
| 30 |
+
<args>
|
| 31 |
+
<module>Kgn_Explodemenu</module>
|
| 32 |
+
<frontName>explodemenu</frontName>
|
| 33 |
+
</args>
|
| 34 |
+
</explodemenu>
|
| 35 |
+
</routers>
|
| 36 |
+
</admin>
|
| 37 |
+
<adminhtml>
|
| 38 |
+
<menu>
|
| 39 |
+
<explodemenu module="explodemenu">
|
| 40 |
+
<title>Explodemenu</title>
|
| 41 |
+
<sort_order>71</sort_order>
|
| 42 |
+
<children>
|
| 43 |
+
<items module="explodemenu">
|
| 44 |
+
<title>Manage Items</title>
|
| 45 |
+
<sort_order>0</sort_order>
|
| 46 |
+
<action>explodemenu/adminhtml_explodemenu</action>
|
| 47 |
+
</items>
|
| 48 |
+
</children>
|
| 49 |
+
</explodemenu>
|
| 50 |
+
</menu>
|
| 51 |
+
<acl>
|
| 52 |
+
<resources>
|
| 53 |
+
<all>
|
| 54 |
+
<title>Allow Everything</title>
|
| 55 |
+
</all>
|
| 56 |
+
<admin>
|
| 57 |
+
<children>
|
| 58 |
+
<Kgn_Explodemenu>
|
| 59 |
+
<title>Explodemenu Module</title>
|
| 60 |
+
<sort_order>10</sort_order>
|
| 61 |
+
</Kgn_Explodemenu>
|
| 62 |
+
</children>
|
| 63 |
+
</admin>
|
| 64 |
+
</resources>
|
| 65 |
+
</acl>
|
| 66 |
+
<layout>
|
| 67 |
+
<updates>
|
| 68 |
+
<explodemenu>
|
| 69 |
+
<file>explodemenu.xml</file>
|
| 70 |
+
</explodemenu>
|
| 71 |
+
</updates>
|
| 72 |
+
</layout>
|
| 73 |
+
</adminhtml>
|
| 74 |
+
<global>
|
| 75 |
+
<models>
|
| 76 |
+
<explodemenu>
|
| 77 |
+
<class>Kgn_Explodemenu_Model</class>
|
| 78 |
+
<resourceModel>explodemenu_mysql4</resourceModel>
|
| 79 |
+
</explodemenu>
|
| 80 |
+
<explodemenu_mysql4>
|
| 81 |
+
<class>Kgn_Explodemenu_Model_Mysql4</class>
|
| 82 |
+
<entities>
|
| 83 |
+
<explodemenu>
|
| 84 |
+
<table>explodemenu</table>
|
| 85 |
+
</explodemenu>
|
| 86 |
+
</entities>
|
| 87 |
+
</explodemenu_mysql4>
|
| 88 |
+
</models>
|
| 89 |
+
<resources>
|
| 90 |
+
<explodemenu_setup>
|
| 91 |
+
<setup>
|
| 92 |
+
<module>Kgn_Explodemenu</module>
|
| 93 |
+
</setup>
|
| 94 |
+
<connection>
|
| 95 |
+
<use>core_setup</use>
|
| 96 |
+
</connection>
|
| 97 |
+
</explodemenu_setup>
|
| 98 |
+
<explodemenu_write>
|
| 99 |
+
<connection>
|
| 100 |
+
<use>core_write</use>
|
| 101 |
+
</connection>
|
| 102 |
+
</explodemenu_write>
|
| 103 |
+
<explodemenu_read>
|
| 104 |
+
<connection>
|
| 105 |
+
<use>core_read</use>
|
| 106 |
+
</connection>
|
| 107 |
+
</explodemenu_read>
|
| 108 |
+
</resources>
|
| 109 |
+
<blocks>
|
| 110 |
+
<explodemenu>
|
| 111 |
+
<class>Kgn_Explodemenu_Block</class>
|
| 112 |
+
</explodemenu>
|
| 113 |
+
</blocks>
|
| 114 |
+
<helpers>
|
| 115 |
+
<explodemenu>
|
| 116 |
+
<class>Kgn_Explodemenu_Helper</class>
|
| 117 |
+
</explodemenu>
|
| 118 |
+
</helpers>
|
| 119 |
+
</global>-->
|
| 120 |
+
</config>
|
app/design/frontend/default/default/layout/explodemenu.xml
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<layout version="0.1.0">
|
| 3 |
+
<default>
|
| 4 |
+
<reference name="top.menu">
|
| 5 |
+
<action method="unsetChild"><name>catalog.topnav</name></action>
|
| 6 |
+
<block type="catalog/navigation" name="catalog.topnavv" template="explodemenu/explodemenu.phtml"/>
|
| 7 |
+
</reference>
|
| 8 |
+
</default>
|
| 9 |
+
<explodemenu_index_index>
|
| 10 |
+
<reference name="content">
|
| 11 |
+
<block type="explodemenu/explodemenu" name="explodemenu" template="explodemenu/explodemenu.phtml" />
|
| 12 |
+
</reference>
|
| 13 |
+
</explodemenu_index_index>
|
| 14 |
+
</layout>
|
app/design/frontend/default/default/template/{catalog/navigation/top.phtml → explodemenu/explodemenu.phtml}
RENAMED
|
@@ -1,211 +1,211 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Magento Commercial Edition
|
| 4 |
-
*
|
| 5 |
-
* NOTICE OF LICENSE
|
| 6 |
-
*
|
| 7 |
-
* This source file is subject to the Magento Commercial Edition License
|
| 8 |
-
* that is available at: http://www.magentocommerce.com/license/commercial-edition
|
| 9 |
-
* If you did not receive a copy of the license and are unable to
|
| 10 |
-
* obtain it through the world-wide-web, please send an email
|
| 11 |
-
* to license@magentocommerce.com so we can send you a copy immediately.
|
| 12 |
-
*
|
| 13 |
-
* DISCLAIMER
|
| 14 |
-
*
|
| 15 |
-
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
| 16 |
-
* versions in the future. If you wish to customize Magento for your
|
| 17 |
-
* needs please refer to http://www.magentocommerce.com for more information.
|
| 18 |
-
*
|
| 19 |
-
* @category design
|
| 20 |
-
* @package base_default
|
| 21 |
-
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
| 22 |
-
* @license http://www.magentocommerce.com/license/commercial-edition
|
| 23 |
-
*/
|
| 24 |
-
?>
|
| 25 |
-
<?php
|
| 26 |
-
/**
|
| 27 |
-
* Top menu for store
|
| 28 |
-
*
|
| 29 |
-
* @see Mage_Catalog_Block_Navigation
|
| 30 |
-
*/
|
| 31 |
-
?>
|
| 32 |
-
<?php
|
| 33 |
-
/**
|
| 34 |
-
* $this->renderCategoriesMenuHtml() supports optional arguments:
|
| 35 |
-
* int Level number for list item class to start from
|
| 36 |
-
* string Extra class of outermost list items
|
| 37 |
-
* string If specified wraps children list in div with this class
|
| 38 |
-
*/
|
| 39 |
-
?>
|
| 40 |
-
|
| 41 |
-
<?php //DebugBreak(); ?>
|
| 42 |
-
|
| 43 |
-
<link rel="stylesheet" href="<?php echo $this->getSkinUrl('css/explodemenu.css'); ?>" type="text/css" media="screen" />
|
| 44 |
-
|
| 45 |
-
<?php $_menu = $this->renderCategoriesMenuHtml(0,'level-top') ?>
|
| 46 |
-
<?php if($_menu): ?>
|
| 47 |
-
<div class="nav-container">
|
| 48 |
-
<ul id="nav">
|
| 49 |
-
<?php
|
| 50 |
-
global $sm_cat_depth;
|
| 51 |
-
$sm_cat_depth = 0;
|
| 52 |
-
$i_count = 1;
|
| 53 |
-
$k=1;
|
| 54 |
-
$icount = 0;
|
| 55 |
-
|
| 56 |
-
$nav_class = new Mage_Catalog_Block_Navigation;
|
| 57 |
-
|
| 58 |
-
$current_cat = $this->getCurrentCategory();
|
| 59 |
-
|
| 60 |
-
foreach ($this->getStoreCategories() as $_category)
|
| 61 |
-
{
|
| 62 |
-
if ($_category->getIsActive())
|
| 63 |
-
{
|
| 64 |
-
$li_class = str_replace(' ', '_', $this->htmlEscape($_category->getName()));
|
| 65 |
-
$a_class = '';
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
if(method_exists($_category, 'getChildrenCategories')) $childrens = $_category->getChildrenCategories();
|
| 70 |
-
else $childrens = $_category->getChildren();
|
| 71 |
-
|
| 72 |
-
$icount = $childrens->count();
|
| 73 |
-
|
| 74 |
-
if($nav_class->isCategoryActive($_category))
|
| 75 |
-
{
|
| 76 |
-
$li_class = 'active';
|
| 77 |
-
if($_category->getName() == $current_cat->getName())
|
| 78 |
-
{
|
| 79 |
-
$sm_cat_depth = 1;
|
| 80 |
-
}
|
| 81 |
-
|
| 82 |
-
}
|
| 83 |
-
$over ='over';
|
| 84 |
-
|
| 85 |
-
if($icount==1){
|
| 86 |
-
$count_width = ($icount*240);
|
| 87 |
-
|
| 88 |
-
}elseif($icount<=3){
|
| 89 |
-
$count_width = ($icount*220);
|
| 90 |
-
}else{
|
| 91 |
-
$count_width = (3*220);
|
| 92 |
-
}
|
| 93 |
-
if($count_width>=660)
|
| 94 |
-
$count_width = (3*220);
|
| 95 |
-
|
| 96 |
-
$lengthcss = '';
|
| 97 |
-
if(strlen($_category->getName())<15)
|
| 98 |
-
{
|
| 99 |
-
$lengthcss = 'oneline ';
|
| 100 |
-
}
|
| 101 |
-
|
| 102 |
-
echo '<li id="dmenu" ic="'.$k.'" class="'.$lengthcss.' level0 level-top nav-'.$k.' nav-'.$count_width.' '.$li_class.' nav-'.$k.''.$li_class.'"><a href="'.$nav_class->getCategoryUrl($_category).'" class="'.$lengthcss.' level-top mark' . $i_count . '">'.$this->htmlEscape($_category->getName()).'</a>';
|
| 103 |
-
|
| 104 |
-
if($childrens)
|
| 105 |
-
{
|
| 106 |
-
$children_second = '';
|
| 107 |
-
$l = 1;
|
| 108 |
-
$o = 1;
|
| 109 |
-
foreach ($childrens as $children)
|
| 110 |
-
{
|
| 111 |
-
$li_class = '';
|
| 112 |
-
if($nav_class->isCategoryActive($children))
|
| 113 |
-
{
|
| 114 |
-
$li_class = $li_class.' active';
|
| 115 |
-
|
| 116 |
-
if($children->getName() == $current_cat->getName())
|
| 117 |
-
{
|
| 118 |
-
$sm_cat_depth = 2;
|
| 119 |
-
}
|
| 120 |
-
}
|
| 121 |
-
if ($children->getIsActive())
|
| 122 |
-
{
|
| 123 |
-
if($l==1) $lcss = 'first'; else $lcss = '';
|
| 124 |
-
if(empty($lcss)) { if($l == $childrens->count()) $lcss = 'last'; else $lcss = ''; }
|
| 125 |
-
|
| 126 |
-
$children_second .= '<li class="level1 nav-1-'.$l.' '.$lcss.' '. str_replace(' ', '_', $this->htmlEscape($children->getName())) .' '.$li_class.' "><a href="'.$nav_class->getCategoryUrl($children).'">'.$this->htmlEscape($children->getName()).'</a>';
|
| 127 |
-
$l++;
|
| 128 |
-
if(method_exists($children, 'getChildrenCategories')) $sub_childrens = $children->getChildrenCategories();
|
| 129 |
-
else $sub_childrens = $children->getChildren();
|
| 130 |
-
if($sub_childrens)
|
| 131 |
-
{
|
| 132 |
-
$children_third= '';
|
| 133 |
-
foreach ($sub_childrens as $sub_children)
|
| 134 |
-
{
|
| 135 |
-
$li_class = '';
|
| 136 |
-
if($nav_class->isCategoryActive($sub_children))
|
| 137 |
-
{
|
| 138 |
-
$li_class = 'active';
|
| 139 |
-
|
| 140 |
-
if($sub_children->getName() == $current_cat->getName())
|
| 141 |
-
{
|
| 142 |
-
$sm_cat_depth = 3;
|
| 143 |
-
}
|
| 144 |
-
}
|
| 145 |
-
if ($sub_children->getIsActive())
|
| 146 |
-
{
|
| 147 |
-
|
| 148 |
-
if($o==1) $ocss = 'first'; else $ocss = '';
|
| 149 |
-
if(empty($ocss)) { if($o == $sub_childrens->count()) $ocss = 'last'; else $ocss = ''; }
|
| 150 |
-
|
| 151 |
-
$children_third .= '<li class="level2 nav-2-2-'.$o.' '.$ocss.' '.$li_class.'"><a href="'.$nav_class->getCategoryUrl($sub_children).'">'.$this->htmlEscape($sub_children->getName()).'</a></li>'."\n";
|
| 152 |
-
$o++;
|
| 153 |
-
}
|
| 154 |
-
}
|
| 155 |
-
if(!empty($children_third))
|
| 156 |
-
{
|
| 157 |
-
//$children_second .= '<div class="drop"><div class="t"><div class="bg-tl"></div><div class="bg-tr"></div></div>';
|
| 158 |
-
$children_second .= '<div class="window-inner">';
|
| 159 |
-
$children_second .= '<ul class="level1">' . $children_third . '</ul>';
|
| 160 |
-
$children_second .= '</div>';
|
| 161 |
-
}
|
| 162 |
-
}
|
| 163 |
-
|
| 164 |
-
$children_second .= '</li>'."\n";
|
| 165 |
-
}
|
| 166 |
-
}
|
| 167 |
-
if(!empty($children_second))
|
| 168 |
-
{
|
| 169 |
-
//echo '<div class="drop"><div class="t"><div class="bg-tl"></div><div class="bg-tr"></div></div>';
|
| 170 |
-
|
| 171 |
-
//echo '<div class="submenu" style="width:'.$count_width.'px;"><div class="submenu-inner">';
|
| 172 |
-
echo '<div class="submenu men'.$count_width.'" style="width:'.$count_width.'px;"><div class="submenu-inner">';
|
| 173 |
-
echo '<ul class="level0">' . $children_second . '</ul>';
|
| 174 |
-
echo '</div></div>';
|
| 175 |
-
//echo '</div></div>';
|
| 176 |
-
}
|
| 177 |
-
}
|
| 178 |
-
echo '</li>'."\n";
|
| 179 |
-
$k++;
|
| 180 |
-
$i_count++;
|
| 181 |
-
}
|
| 182 |
-
}
|
| 183 |
-
?>
|
| 184 |
-
|
| 185 |
-
</ul>
|
| 186 |
-
</div>
|
| 187 |
-
<?php endif ?>
|
| 188 |
-
<script type="text/javascript">
|
| 189 |
-
function showHeight(h) {
|
| 190 |
-
|
| 191 |
-
}
|
| 192 |
-
jQuery(document).ready(function() {
|
| 193 |
-
|
| 194 |
-
jQuery(".submenu-side").each(function () {
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
});
|
| 200 |
-
});
|
| 201 |
-
|
| 202 |
-
jQuery('li#dmenu').mouseover(function() {
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
});
|
| 206 |
-
jQuery('li#dmenu').mouseout(function() {
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
});
|
| 210 |
-
|
| 211 |
-
</script>
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Magento Commercial Edition
|
| 4 |
+
*
|
| 5 |
+
* NOTICE OF LICENSE
|
| 6 |
+
*
|
| 7 |
+
* This source file is subject to the Magento Commercial Edition License
|
| 8 |
+
* that is available at: http://www.magentocommerce.com/license/commercial-edition
|
| 9 |
+
* If you did not receive a copy of the license and are unable to
|
| 10 |
+
* obtain it through the world-wide-web, please send an email
|
| 11 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
| 12 |
+
*
|
| 13 |
+
* DISCLAIMER
|
| 14 |
+
*
|
| 15 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
| 16 |
+
* versions in the future. If you wish to customize Magento for your
|
| 17 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
| 18 |
+
*
|
| 19 |
+
* @category design
|
| 20 |
+
* @package base_default
|
| 21 |
+
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
| 22 |
+
* @license http://www.magentocommerce.com/license/commercial-edition
|
| 23 |
+
*/
|
| 24 |
+
?>
|
| 25 |
+
<?php
|
| 26 |
+
/**
|
| 27 |
+
* Top menu for store
|
| 28 |
+
*
|
| 29 |
+
* @see Mage_Catalog_Block_Navigation
|
| 30 |
+
*/
|
| 31 |
+
?>
|
| 32 |
+
<?php
|
| 33 |
+
/**
|
| 34 |
+
* $this->renderCategoriesMenuHtml() supports optional arguments:
|
| 35 |
+
* int Level number for list item class to start from
|
| 36 |
+
* string Extra class of outermost list items
|
| 37 |
+
* string If specified wraps children list in div with this class
|
| 38 |
+
*/
|
| 39 |
+
?>
|
| 40 |
+
|
| 41 |
+
<?php //DebugBreak(); ?>
|
| 42 |
+
|
| 43 |
+
<link rel="stylesheet" href="<?php echo $this->getSkinUrl('css/explodemenu.css'); ?>" type="text/css" media="screen" />
|
| 44 |
+
|
| 45 |
+
<?php $_menu = $this->renderCategoriesMenuHtml(0,'level-top') ?>
|
| 46 |
+
<?php if($_menu): ?>
|
| 47 |
+
<div class="nav-container">
|
| 48 |
+
<ul id="nav">
|
| 49 |
+
<?php
|
| 50 |
+
global $sm_cat_depth;
|
| 51 |
+
$sm_cat_depth = 0;
|
| 52 |
+
$i_count = 1;
|
| 53 |
+
$k=1;
|
| 54 |
+
$icount = 0;
|
| 55 |
+
|
| 56 |
+
$nav_class = new Mage_Catalog_Block_Navigation;
|
| 57 |
+
|
| 58 |
+
$current_cat = $this->getCurrentCategory();
|
| 59 |
+
|
| 60 |
+
foreach ($this->getStoreCategories() as $_category)
|
| 61 |
+
{
|
| 62 |
+
if ($_category->getIsActive())
|
| 63 |
+
{
|
| 64 |
+
$li_class = str_replace(' ', '_', $this->htmlEscape($_category->getName()));
|
| 65 |
+
$a_class = '';
|
| 66 |
+
|
| 67 |
+
|
| 68 |
+
|
| 69 |
+
if(method_exists($_category, 'getChildrenCategories')) $childrens = $_category->getChildrenCategories();
|
| 70 |
+
else $childrens = $_category->getChildren();
|
| 71 |
+
|
| 72 |
+
$icount = $childrens->count();
|
| 73 |
+
|
| 74 |
+
if($nav_class->isCategoryActive($_category))
|
| 75 |
+
{
|
| 76 |
+
$li_class = 'active';
|
| 77 |
+
if($_category->getName() == $current_cat->getName())
|
| 78 |
+
{
|
| 79 |
+
$sm_cat_depth = 1;
|
| 80 |
+
}
|
| 81 |
+
|
| 82 |
+
}
|
| 83 |
+
$over ='over';
|
| 84 |
+
|
| 85 |
+
if($icount==1){
|
| 86 |
+
$count_width = ($icount*240);
|
| 87 |
+
|
| 88 |
+
}elseif($icount<=3){
|
| 89 |
+
$count_width = ($icount*220);
|
| 90 |
+
}else{
|
| 91 |
+
$count_width = (3*220);
|
| 92 |
+
}
|
| 93 |
+
if($count_width>=660)
|
| 94 |
+
$count_width = (3*220);
|
| 95 |
+
|
| 96 |
+
$lengthcss = '';
|
| 97 |
+
if(strlen($_category->getName())<15)
|
| 98 |
+
{
|
| 99 |
+
$lengthcss = 'oneline ';
|
| 100 |
+
}
|
| 101 |
+
|
| 102 |
+
echo '<li id="dmenu" ic="'.$k.'" class="'.$lengthcss.' level0 level-top nav-'.$k.' nav-'.$count_width.' '.$li_class.' nav-'.$k.''.$li_class.'"><a href="'.$nav_class->getCategoryUrl($_category).'" class="'.$lengthcss.' level-top mark' . $i_count . '">'.$this->htmlEscape($_category->getName()).'</a>';
|
| 103 |
+
|
| 104 |
+
if($childrens)
|
| 105 |
+
{
|
| 106 |
+
$children_second = '';
|
| 107 |
+
$l = 1;
|
| 108 |
+
$o = 1;
|
| 109 |
+
foreach ($childrens as $children)
|
| 110 |
+
{
|
| 111 |
+
$li_class = '';
|
| 112 |
+
if($nav_class->isCategoryActive($children))
|
| 113 |
+
{
|
| 114 |
+
$li_class = $li_class.' active';
|
| 115 |
+
|
| 116 |
+
if($children->getName() == $current_cat->getName())
|
| 117 |
+
{
|
| 118 |
+
$sm_cat_depth = 2;
|
| 119 |
+
}
|
| 120 |
+
}
|
| 121 |
+
if ($children->getIsActive())
|
| 122 |
+
{
|
| 123 |
+
if($l==1) $lcss = 'first'; else $lcss = '';
|
| 124 |
+
if(empty($lcss)) { if($l == $childrens->count()) $lcss = 'last'; else $lcss = ''; }
|
| 125 |
+
|
| 126 |
+
$children_second .= '<li class="level1 nav-1-'.$l.' '.$lcss.' '. str_replace(' ', '_', $this->htmlEscape($children->getName())) .' '.$li_class.' "><a href="'.$nav_class->getCategoryUrl($children).'">'.$this->htmlEscape($children->getName()).'</a>';
|
| 127 |
+
$l++;
|
| 128 |
+
if(method_exists($children, 'getChildrenCategories')) $sub_childrens = $children->getChildrenCategories();
|
| 129 |
+
else $sub_childrens = $children->getChildren();
|
| 130 |
+
if($sub_childrens)
|
| 131 |
+
{
|
| 132 |
+
$children_third= '';
|
| 133 |
+
foreach ($sub_childrens as $sub_children)
|
| 134 |
+
{
|
| 135 |
+
$li_class = '';
|
| 136 |
+
if($nav_class->isCategoryActive($sub_children))
|
| 137 |
+
{
|
| 138 |
+
$li_class = 'active';
|
| 139 |
+
|
| 140 |
+
if($sub_children->getName() == $current_cat->getName())
|
| 141 |
+
{
|
| 142 |
+
$sm_cat_depth = 3;
|
| 143 |
+
}
|
| 144 |
+
}
|
| 145 |
+
if ($sub_children->getIsActive())
|
| 146 |
+
{
|
| 147 |
+
|
| 148 |
+
if($o==1) $ocss = 'first'; else $ocss = '';
|
| 149 |
+
if(empty($ocss)) { if($o == $sub_childrens->count()) $ocss = 'last'; else $ocss = ''; }
|
| 150 |
+
|
| 151 |
+
$children_third .= '<li class="level2 nav-2-2-'.$o.' '.$ocss.' '.$li_class.'"><a href="'.$nav_class->getCategoryUrl($sub_children).'">'.$this->htmlEscape($sub_children->getName()).'</a></li>'."\n";
|
| 152 |
+
$o++;
|
| 153 |
+
}
|
| 154 |
+
}
|
| 155 |
+
if(!empty($children_third))
|
| 156 |
+
{
|
| 157 |
+
//$children_second .= '<div class="drop"><div class="t"><div class="bg-tl"></div><div class="bg-tr"></div></div>';
|
| 158 |
+
$children_second .= '<div class="window-inner">';
|
| 159 |
+
$children_second .= '<ul class="level1">' . $children_third . '</ul>';
|
| 160 |
+
$children_second .= '</div>';
|
| 161 |
+
}
|
| 162 |
+
}
|
| 163 |
+
|
| 164 |
+
$children_second .= '</li>'."\n";
|
| 165 |
+
}
|
| 166 |
+
}
|
| 167 |
+
if(!empty($children_second))
|
| 168 |
+
{
|
| 169 |
+
//echo '<div class="drop"><div class="t"><div class="bg-tl"></div><div class="bg-tr"></div></div>';
|
| 170 |
+
|
| 171 |
+
//echo '<div class="submenu" style="width:'.$count_width.'px;"><div class="submenu-inner">';
|
| 172 |
+
echo '<div class="submenu men'.$count_width.'" style="width:'.$count_width.'px;"><div class="submenu-inner">';
|
| 173 |
+
echo '<ul class="level0">' . $children_second . '</ul>';
|
| 174 |
+
echo '</div></div>';
|
| 175 |
+
//echo '</div></div>';
|
| 176 |
+
}
|
| 177 |
+
}
|
| 178 |
+
echo '</li>'."\n";
|
| 179 |
+
$k++;
|
| 180 |
+
$i_count++;
|
| 181 |
+
}
|
| 182 |
+
}
|
| 183 |
+
?>
|
| 184 |
+
|
| 185 |
+
</ul>
|
| 186 |
+
</div>
|
| 187 |
+
<?php endif ?>
|
| 188 |
+
<script type="text/javascript">
|
| 189 |
+
function showHeight(h) {
|
| 190 |
+
jQuery(".submenu-side").height(h);
|
| 191 |
+
}
|
| 192 |
+
jQuery(document).ready(function() {
|
| 193 |
+
|
| 194 |
+
jQuery(".submenu-side").each(function () {
|
| 195 |
+
if (jQuery(this).cssClass == 'submenu-r sidebar')
|
| 196 |
+
jQuery(this).height(eval(jQuery(this).parent().height()) - eval(70));
|
| 197 |
+
else
|
| 198 |
+
jQuery(this).height(eval(jQuery(this).parent().height()) - eval(30));
|
| 199 |
+
});
|
| 200 |
+
});
|
| 201 |
+
|
| 202 |
+
jQuery('li#dmenu').mouseover(function() {
|
| 203 |
+
$count_val = jQuery(this).attr('ic');
|
| 204 |
+
jQuery(this).addClass('hover'+$count_val);
|
| 205 |
+
});
|
| 206 |
+
jQuery('li#dmenu').mouseout(function() {
|
| 207 |
+
$count_val = jQuery(this).attr('ic');
|
| 208 |
+
jQuery(this).removeClass('hover'+$count_val);
|
| 209 |
+
});
|
| 210 |
+
|
| 211 |
+
</script>
|
app/etc/modules/Kgn_Explodemenu.xml
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<config>
|
| 3 |
+
<modules>
|
| 4 |
+
<Kgn_Explodemenu>
|
| 5 |
+
<active>true</active>
|
| 6 |
+
<codePool>local</codePool>
|
| 7 |
+
</Kgn_Explodemenu>
|
| 8 |
+
</modules>
|
| 9 |
+
</config>
|
package.xml
CHANGED
|
@@ -1,18 +1,18 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Kgn_Explodemenu</name>
|
| 4 |
-
<version>0.1.
|
| 5 |
<stability>stable</stability>
|
| 6 |
-
<license
|
| 7 |
<channel>community</channel>
|
| 8 |
<extends/>
|
| 9 |
-
<summary>
|
| 10 |
-
<description>
|
| 11 |
-
<notes>
|
| 12 |
-
<authors><author><name>
|
| 13 |
-
<date>2011-
|
| 14 |
-
<time>
|
| 15 |
-
<contents><target name="
|
| 16 |
<compatible/>
|
| 17 |
<dependencies/>
|
| 18 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Kgn_Explodemenu</name>
|
| 4 |
+
<version>0.1.5</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
+
<license>OSL v3.0</license>
|
| 7 |
<channel>community</channel>
|
| 8 |
<extends/>
|
| 9 |
+
<summary>test</summary>
|
| 10 |
+
<description>test</description>
|
| 11 |
+
<notes>fefd</notes>
|
| 12 |
+
<authors><author><name>kgntechnologies</name><user>auto-converted</user><email>tejas@kgntechnologies.com</email></author></authors>
|
| 13 |
+
<date>2011-10-21</date>
|
| 14 |
+
<time>11:37:47</time>
|
| 15 |
+
<contents><target name="magelocal"><dir name="Kgn"><dir name="Explodemenu"><dir name="etc"><file name="config.xml" hash="f6ed1b5ccedd95aade721862b30b1733"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Kgn_Explodemenu.xml" hash="432a0d9e672b21cb9e97ca8a430dd990"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="css"><file name="explodemenu.css" hash="a4f068c90418ce97f61daad040390489"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="explodemenu.xml" hash="c382d71fb29355bc09ec435c5ce43ea5"/></dir><dir name="template"><dir name="explodemenu"><file name="explodemenu.phtml" hash="d10624f060cff0eed8739b9c46ea1dc6"/></dir></dir></dir></dir></dir></target></contents>
|
| 16 |
<compatible/>
|
| 17 |
<dependencies/>
|
| 18 |
</package>
|
