Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesAnelay committed Jan 9, 2016
2 parents ddfa724 + 0edfa03 commit 69eb9a3
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ private function _defineSettingsFieldDependancies(Mage_Adminhtml_Block_Widget_Fo
->addFieldMap("group_{$groupId}menu_dropdown_width", 'menu_dropdown_width')
->addFieldMap("group_{$groupId}menu_link_type","menu_link_type")
->addFieldMap("group_{$groupId}menu_link","menu_link")
->addFieldDependence('menu_dropdown_width', 'menu_dropdown_type', array("2","3","4","5"))
->addFieldDependence('menu_dropdown_width', 'menu_dropdown_type', array("2","3","4","5","6"))
->addFieldDependence('menu_link','menu_link_type', array("1","2"));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,18 @@ public function prefetchData(&$directiveValues){
->addFieldToFilter('block_id', array('in' => $directiveValues['static_block_ids']))
->load();

$this->_filterBlockCollectionContent($blockCollection);

Mage::register('megamenu_cms_blocks', $blockCollection);
}
}

private function _filterBlockCollectionContent($blockCollection)
{
foreach ($blockCollection as $block) {
$helper = Mage::helper('cms');
$processor = $helper->getBlockTemplateProcessor();
$block->setContent($processor->filter($block->getContent()));
}
}
}
2 changes: 1 addition & 1 deletion app/code/community/TheExtensionLab/MegaMenu/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<config>
<modules>
<TheExtensionLab_MegaMenu>
<version>1.3.0</version>
<version>1.4.0</version>
</TheExtensionLab_MegaMenu>
</modules>

Expand Down
7 changes: 7 additions & 0 deletions app/code/community/TheExtensionLab/MegaMenu/etc/widget.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@
<name>MegaMenu - Category List Section</name>
<description>Select your categories for this menu block</description>
<parameters>
<title translate="label">
<visible>1</visible>
<label>Title</label>
<type>text</type>
<description>Optional</description>
</title>

<category_json>
<visible>1</visible>
<required>1</required>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,21 @@
<?php $childNodes = $this->getLoadedMenuNodes(); ?>
<?php $categoryTree = $this->getCategoryTree(); ?>

<?php if($this->hasTitle()):?>
<li class="section-title manual-section-title">
<span>
<?php echo $this->getTitle();?>
</span>
</li>
<?php endif;?>

<?php foreach($categoryTree as $category):?>

<?php $categoryNode = $this->_getCategoryNodeById($childNodes, $category->id);?>

<?php if($categoryNode):?>
<li <?php if(!empty($category->children)): echo 'class="section-title"';endif;?>>

<li <?php if(!empty($category->children) && !$this->hasTitle()): echo 'class="section-title"';endif;?>>
<span>
<a href="<?php echo $categoryNode->getUrl(); ?>">
<?php echo $this->_getCustomCategoryMenuName($categoryNode,$category);?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,20 @@

<div class="list-block categories-list-block megamenu-list-block <?php echo $this->getDisplayClass();?>">
<ul>
<?php if($this->hasTitle()):?>
<li class="section-title manual-section-title">
<span>
<?php echo $this->getTitle();?>
</span>
</li>
<?php endif;?>

<?php foreach($categoryTree as $category):?>

<?php $categoryNode = $this->_getCategoryNodeById($childNodes, $category->id);?>

<?php if($categoryNode):?>
<li <?php if(!empty($category->children)): echo 'class="section-title"';endif;?>>
<li <?php if(!empty($category->children) && !$this->hasTitle()): echo 'class="section-title"';endif;?>>
<span>
<a href="<?php echo $categoryNode->getUrl(); ?>">
<?php echo $this->_getCustomCategoryMenuName($categoryNode,$category);?>
Expand Down
3 changes: 2 additions & 1 deletion app/locale/en_US/TheExtensionLab_MegaMenu.csv
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,5 @@
"The Serial Key is invalid or not present and therefore the functionality of this extension has been limited. You can enter a serial key at System > Configuration > Catalog > Catalog Navigation (ServerName : %s)","The Serial Key is invalid or not present and therefore the functionality of this extension has been limited. You can enter a serial key at System > Configuration > Catalog > Catalog Navigation (ServerName : %s)"
"View More","View More"
"View All %s","View All %s"
"Shop By %s","Shop By %s"
"Shop By %s","Shop By %s"
"Optional","Optional"

0 comments on commit 69eb9a3

Please sign in to comment.