Version Notes
Release 1.0.3
- Fixed misspelling errors
- Added functionality to set template for sub menu
- Fixed problem with ordering items in menu
Download this release
Release Info
Developer | Eleven Soft |
Extension | ES_Custommenu |
Version | 1.0.3 |
Comparing to | |
See all releases |
Code changes from version 1.0.2 to 1.0.3
- app/code/community/ES/Custommenu/Block/Adminhtml/Custommenu/Items/Edit/Tab/Form.php +3 -3
- app/code/community/ES/Custommenu/Block/Adminhtml/Custommenu/Items/Grid.php +4 -4
- app/code/community/ES/Custommenu/Block/Custommenu.php +13 -1
- app/code/community/ES/Custommenu/Helper/Data.php +2 -2
- app/code/community/ES/Custommenu/etc/config.xml +1 -1
- app/code/community/ES/Custommenu/sql/custommenu_setup/mysql4-upgrade-1.0.2-1.0.3.php +11 -0
- app/design/frontend/base/default/layout/es_custommenu.xml +3 -3
- package.xml +10 -8
app/code/community/ES/Custommenu/Block/Adminhtml/Custommenu/Items/Edit/Tab/Form.php
CHANGED
@@ -35,10 +35,10 @@ class ES_Custommenu_Block_Adminhtml_Custommenu_Items_Edit_Tab_Form extends Mage_
|
|
35 |
'values' => Mage::getModel('custommenu/custommenu_items')->getInputSelectPages(),
|
36 |
'name' => 'cms_id',
|
37 |
));
|
38 |
-
$fieldset->addField('
|
39 |
-
'label' => Mage::helper('custommenu')->__('
|
40 |
'required' => true,
|
41 |
-
'name' => '
|
42 |
));
|
43 |
$fieldset->addField('target', 'select', array(
|
44 |
'label' => Mage::helper('custommenu')->__('Target'),
|
35 |
'values' => Mage::getModel('custommenu/custommenu_items')->getInputSelectPages(),
|
36 |
'name' => 'cms_id',
|
37 |
));
|
38 |
+
$fieldset->addField('position', 'text', array(
|
39 |
+
'label' => Mage::helper('custommenu')->__('Position'),
|
40 |
'required' => true,
|
41 |
+
'name' => 'position',
|
42 |
));
|
43 |
$fieldset->addField('target', 'select', array(
|
44 |
'label' => Mage::helper('custommenu')->__('Target'),
|
app/code/community/ES/Custommenu/Block/Adminhtml/Custommenu/Items/Grid.php
CHANGED
@@ -45,7 +45,7 @@ class ES_Custommenu_Block_Adminhtml_Custommenu_Items_Grid extends Mage_Adminhtml
|
|
45 |
'options' => Mage::getModel('custommenu/custommenu_items')->getGridInputSelectParentItem()
|
46 |
));
|
47 |
$this->addColumn('url', array(
|
48 |
-
'header' => Mage::helper('custommenu')->__('
|
49 |
'align' => 'left',
|
50 |
'index' => 'url',
|
51 |
));
|
@@ -56,10 +56,10 @@ class ES_Custommenu_Block_Adminhtml_Custommenu_Items_Grid extends Mage_Adminhtml
|
|
56 |
'type' => 'options',
|
57 |
'options' => Mage::getModel('custommenu/custommenu_items')->getGridInputSelectPages()
|
58 |
));
|
59 |
-
$this->addColumn('
|
60 |
-
'header' => Mage::helper('custommenu')->__('
|
61 |
'align' => 'left',
|
62 |
-
'index' => '
|
63 |
));
|
64 |
|
65 |
$this->addColumn('status', array(
|
45 |
'options' => Mage::getModel('custommenu/custommenu_items')->getGridInputSelectParentItem()
|
46 |
));
|
47 |
$this->addColumn('url', array(
|
48 |
+
'header' => Mage::helper('custommenu')->__('Url'),
|
49 |
'align' => 'left',
|
50 |
'index' => 'url',
|
51 |
));
|
56 |
'type' => 'options',
|
57 |
'options' => Mage::getModel('custommenu/custommenu_items')->getGridInputSelectPages()
|
58 |
));
|
59 |
+
$this->addColumn('position', array(
|
60 |
+
'header' => Mage::helper('custommenu')->__('Position'),
|
61 |
'align' => 'left',
|
62 |
+
'index' => 'position',
|
63 |
));
|
64 |
|
65 |
$this->addColumn('status', array(
|
app/code/community/ES/Custommenu/Block/Custommenu.php
CHANGED
@@ -28,7 +28,7 @@ class ES_Custommenu_Block_Custommenu extends Mage_Core_Block_Template {
|
|
28 |
* @param type ES_Custommenu_Block_Custommenu
|
29 |
*/
|
30 |
public function getSubMenuBlock($menuItem) {
|
31 |
-
$subMenuBlock = $this->getLayout()->createBlock('custommenu/custommenu')->setTemplate(
|
32 |
$subMenuBlock->setParentMenu($menuItem);
|
33 |
return $subMenuBlock;
|
34 |
}
|
@@ -43,4 +43,16 @@ class ES_Custommenu_Block_Custommenu extends Mage_Core_Block_Template {
|
|
43 |
return Mage::helper('custommenu')->getMenuSubItems($menuItem);
|
44 |
}
|
45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
}
|
28 |
* @param type ES_Custommenu_Block_Custommenu
|
29 |
*/
|
30 |
public function getSubMenuBlock($menuItem) {
|
31 |
+
$subMenuBlock = $this->getLayout()->createBlock('custommenu/custommenu')->setTemplate($this->_getSubmenuTemplate());
|
32 |
$subMenuBlock->setParentMenu($menuItem);
|
33 |
return $subMenuBlock;
|
34 |
}
|
43 |
return Mage::helper('custommenu')->getMenuSubItems($menuItem);
|
44 |
}
|
45 |
|
46 |
+
/**
|
47 |
+
* Get submenu template if is seted
|
48 |
+
*
|
49 |
+
* @return String Submenu Template
|
50 |
+
*/
|
51 |
+
protected function _getSubmenuTemplate(){
|
52 |
+
if($this->getSubmenuTemplate() == null){
|
53 |
+
return 'es_custommenu/submenu.phtml';
|
54 |
+
}
|
55 |
+
return $this->getSubmenuTemplate();
|
56 |
+
}
|
57 |
+
|
58 |
}
|
app/code/community/ES/Custommenu/Helper/Data.php
CHANGED
@@ -35,7 +35,7 @@ class ES_Custommenu_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
35 |
->addFieldToFilter('menu_id', $menu->getId())
|
36 |
->addFieldToFilter('parent_id', 0)
|
37 |
->addFieldToFilter('status', ES_Custommenu_Model_Status::STATUS_ENABLED)
|
38 |
-
->setOrder("
|
39 |
return $collection;
|
40 |
} else {
|
41 |
throw new Zend_Exception('Menu not exist.');
|
@@ -53,7 +53,7 @@ class ES_Custommenu_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
53 |
->addFieldToSelect('*')
|
54 |
->addFieldToFilter('parent_id', $menuItem->getId())
|
55 |
->addFieldToFilter('status', ES_Custommenu_Model_Status::STATUS_ENABLED)
|
56 |
-
->setOrder("
|
57 |
return $collection;
|
58 |
}
|
59 |
|
35 |
->addFieldToFilter('menu_id', $menu->getId())
|
36 |
->addFieldToFilter('parent_id', 0)
|
37 |
->addFieldToFilter('status', ES_Custommenu_Model_Status::STATUS_ENABLED)
|
38 |
+
->setOrder("position", 'asc');
|
39 |
return $collection;
|
40 |
} else {
|
41 |
throw new Zend_Exception('Menu not exist.');
|
53 |
->addFieldToSelect('*')
|
54 |
->addFieldToFilter('parent_id', $menuItem->getId())
|
55 |
->addFieldToFilter('status', ES_Custommenu_Model_Status::STATUS_ENABLED)
|
56 |
+
->setOrder("position", 'asc');
|
57 |
return $collection;
|
58 |
}
|
59 |
|
app/code/community/ES/Custommenu/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<ES_Custommenu>
|
5 |
-
<version>1.0.
|
6 |
</ES_Custommenu>
|
7 |
</modules>
|
8 |
<frontend>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<ES_Custommenu>
|
5 |
+
<version>1.0.3</version>
|
6 |
</ES_Custommenu>
|
7 |
</modules>
|
8 |
<frontend>
|
app/code/community/ES/Custommenu/sql/custommenu_setup/mysql4-upgrade-1.0.2-1.0.3.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$installer = $this;
|
4 |
+
|
5 |
+
$installer->startSetup();
|
6 |
+
|
7 |
+
$installer->run("
|
8 |
+
ALTER TABLE es_custommenu_item CHANGE COLUMN es_custommenu_item.order es_custommenu_item.position INT(4);
|
9 |
+
");
|
10 |
+
|
11 |
+
$installer->endSetup();
|
app/design/frontend/base/default/layout/es_custommenu.xml
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
-
|
3 |
<default translate="label">
|
4 |
<reference name="top.menu">
|
5 |
<block type="custommenu/custommenu" after="-" name="custommenu.top">
|
6 |
-
<action method="setMenuLabel"><value>
|
7 |
<action method="setHtmlId"><value>nav</value></action>
|
8 |
</block>
|
9 |
</reference>
|
10 |
</default>
|
11 |
-
</layout
|
1 |
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
<default translate="label">
|
4 |
<reference name="top.menu">
|
5 |
<block type="custommenu/custommenu" after="-" name="custommenu.top">
|
6 |
+
<action method="setMenuLabel"><value>header_menu</value></action>
|
7 |
<action method="setHtmlId"><value>nav</value></action>
|
8 |
</block>
|
9 |
</reference>
|
10 |
</default>
|
11 |
+
</layout>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>ES_Custommenu</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
@@ -12,12 +12,14 @@
|
|
12 |
It support unlimited sub menus. In admin you have two sections. First one is to create menu for example main menu, footer menu, right menu etc. In second section you can create menu items assign it to menus and also you can add parent of menu to make submenus.
|
13 |

|
14 |
For url of your link you can enter URL or choose CMS page.</description>
|
15 |
-
<notes>Release 1.0.
|
16 |
-
-
|
17 |
-
|
18 |
-
|
19 |
-
<
|
20 |
-
<
|
|
|
|
|
21 |
<compatible/>
|
22 |
-
<dependencies
|
23 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>ES_Custommenu</name>
|
4 |
+
<version>1.0.3</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
12 |
It support unlimited sub menus. In admin you have two sections. First one is to create menu for example main menu, footer menu, right menu etc. In second section you can create menu items assign it to menus and also you can add parent of menu to make submenus.
|
13 |

|
14 |
For url of your link you can enter URL or choose CMS page.</description>
|
15 |
+
<notes>Release 1.0.3
|
16 |
+
- Fixed misspelling errors
|
17 |
+
- Added functionality to set template for sub menu
|
18 |
+
- Fixed problem with ordering items in menu</notes>
|
19 |
+
<authors><author><name>Eleven Soft</name><user>elevensoft</user><email>support@eleven-soft.com</email></author></authors>
|
20 |
+
<date>2013-05-27</date>
|
21 |
+
<time>18:27:45</time>
|
22 |
+
<contents><target name="magecommunity"><dir name="ES"><dir name="Custommenu"><dir name="Block"><dir name="Adminhtml"><dir name="Custommenu"><dir name="Edit"><file name="Form.php" hash="1d0f8838598fd79eba08b5081d6dc465"/><dir name="Tab"><file name="Form.php" hash="850d547d96ca38134391db885db8de42"/></dir><file name="Tabs.php" hash="4ead7691e23b12b594b439641d4fa8b8"/></dir><file name="Edit.php" hash="4c0daf6ed28b7f6d56076f366c6fc816"/><file name="Grid.php" hash="dfc1c4721bb2d4c3db16ead1f1994812"/><dir name="Items"><dir name="Edit"><file name="Form.php" hash="70894a455bfc71d478658066f9a03ba9"/><dir name="Tab"><file name="Form.php" hash="28f1f32c5e128f82a35381bb550dc1f6"/></dir><file name="Tabs.php" hash="191f684960d2d98d701db2b325cc4243"/></dir><file name="Edit.php" hash="132fa9d73ed3507beb98fe4a8b725999"/><file name="Grid.php" hash="094fd923f9127a6d8a23f78d9554191c"/></dir><file name="Items.php" hash="59efdfc86ee12c908efdddf898e92d24"/></dir><file name="Custommenu.php" hash="5ce4f2e24533cfe777afca772d8bc318"/></dir><file name="Custommenu.php" hash="ff3210a70bca44270a2942aa3ab11be2"/></dir><dir name="Helper"><file name="Data.php" hash="b457f193c2066cd0eba51a3a7bfbafbc"/></dir><dir name="Model"><dir name="Custommenu"><file name="Items.php" hash="e1734fb3d12e63078201b11efb6997a1"/></dir><file name="Custommenu.php" hash="4d106b3703735057e768dc559dff7620"/><dir name="Mysql4"><dir name="Custommenu"><file name="Collection.php" hash="73e6ee0afe6048c19aca869cd358ab4c"/><dir name="Items"><file name="Collection.php" hash="41cf88e7be54767529c984cc39ef0e36"/></dir><file name="Items.php" hash="0fa8fe08213d4521f4361f6ecf51bae7"/></dir><file name="Custommenu.php" hash="6167ecf64ca967a229e76010f3ceebf6"/></dir><file name="Status.php" hash="349dfeea66da3faf8720db74ff6cc00d"/></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Custommenu"><file name="ItemsController.php" hash="05a88f5cf78e49f2cdff4da2f7a97122"/></dir><file name="CustommenuController.php" hash="9315ccfc69debbfac31eba700186ea36"/></dir></dir><dir name="etc"><file name="config.xml" hash="a04be93cfe6df5f1ef13aa145966c0c4"/></dir><dir name="sql"><dir name="custommenu_setup"><file name="mysql4-install-1.0.2.php" hash="1a7046fadd327ed006ff789a676f790b"/><file name="mysql4-upgrade-1.0.2-1.0.3.php" hash="7a4d599aeb074fa0f6145a29211efef3"/></dir><file name=".DS_Store" hash="953e5e5743a406322ec656668f92ee43"/></dir><file name=".DS_Store" hash="fb1c6a2fc82b2004adb0bc3ddcdc3e98"/></dir><file name=".DS_Store" hash="50692053e92472e65c480e35e2e57e6a"/></dir></target><target name="mageetc"><dir name="modules"><file name="ES_Custommenu.xml" hash="c946fff190f507f00aac2a23e500b365"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="es_custommenu"><file name="menu.phtml" hash="84f8c24f5fccd72dabf8b2eabb4f2f03"/><file name="submenu.phtml" hash="4671bb5cfaa26e9344299b5282c2a520"/></dir></dir><dir name="layout"><file name="es_custommenu.xml" hash="8e9c0f3dae5ea5d61bf8172bfd72670e"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="es_custommenu.xml" hash="45fe59e4f476e5237870162f498ae591"/></dir></dir></dir></dir></target></contents>
|
23 |
<compatible/>
|
24 |
+
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
25 |
</package>
|