Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 26th, 2012  |  syntax: None  |  size: 1.30 KB  |  hits: 10  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.  
  2.  
  3. INSERT INTO `eav_attribute` VALUES(132, 3, 'include_in_left_menu', NULL, NULL, 'int', NULL, NULL, 'select', 'Include in Left Navigation Menu', NULL, 'eav/entity_attribute_source_boolean', 0, 0, '1', 0, NULL);
  4.  
  5.  
  6. <?php $parentCategoryId = 2;?>
  7. <?php $_categories =  Mage::getModel('catalog/category')->load($parentCategoryId)->getChildrenCategories() ?>
  8. <?php $_count = is_array($_categories)?count($_categories):$_categories->count(); ?>
  9. <?php if($_count): ?>
  10. <div class="block block-layered-nav">
  11.     <div class="block-content">
  12.         <dl id="narrow-by-list2">
  13.         <?php $parentCategoryId = 2;?>
  14.             <dt><?php echo $this->__('Our Kitchen Range') ?></dt>
  15.             <dd>
  16.                 <ol>
  17.                 <?php foreach (Mage::getModel('catalog/category')->load($parentCategoryId)->getChildrenCategories() as $_category): ?>
  18.                     <?php if( $_category->getIsActive() && $_category->getIncludeInLeftMenu()): ?>
  19.                     <li>
  20.                         <a href="<?php echo $this->getCategoryUrl($_category) ?>"<?php if ($this->isCategoryActive($_category)): ?> class="current"<?php endif; ?>><?php echo $this->htmlEscape($_category->getName()) ?></a>
  21.                     </li>
  22.                     <?php endif; ?>
  23.                 <?php endforeach ?>
  24.                 </ol>
  25.             </dd>