Magento: Vertical Category Navigation (RicoNeitzel_VertNav)

Fix VertNav Category selection

diff -Naur /root/magento/app/code/community/RicoNeitzel/VertNav/Block/Navigation.php /var/www/app/code/community/RicoNeitzel/VertNav/Block/Navigation.php
--- /root/magento/app/code/community/RicoNeitzel/VertNav/Block/Navigation.php	2012-08-24 17:44:08.000000000 +0200
+++ /var/www/app/code/community/RicoNeitzel/VertNav/Block/Navigation.php	2012-08-24 17:50:06.000000000 +0200
@@ -30,6 +30,7 @@
 class RicoNeitzel_VertNav_Block_Navigation extends Mage_Catalog_Block_Navigation
 {
 	protected $_storeCategories;
+	protected $_currentCategory;
 
 	/**
 	 * Add the customer group to the cache key so this module is compatible with more extensions.
@@ -105,6 +106,48 @@
     }
 
     /**
+     * Get current category from layer or selected product 
+     *
+     * @return Mage_Catalog_Model_Category
+     */
+    public function getCurrentCategory()
+    {
+        if (isset($this->_currentCategory))
+        {
+            return $this->_currentCategory;
+        }
+
+        $id = $this->getRequest()->getParam('id');
+
+        // default
+        if (Mage::getSingleton('catalog/layer'))
+        {
+            $category = Mage::getSingleton('catalog/layer')->getCurrentCategory();
+            $storeCategoriesParentId = $this->getStoreCategories()->getFirstItem()->getParentId();
+
+            if($category->getId() != $storeCategoriesParentId || $id == $storeCategoriesParentId)
+            {
+                $this->_currentCategory = $category;
+                return $category;
+            }
+        }
+
+        // get category from product
+        $product = Mage::getModel('catalog/product')->load($id);
+        $categoryIds = $product->getCategoryIds();
+
+        if(count($categoryIds) > 0)
+        {
+            $categoryId = reset($categoryIds);
+
+            $this->_currentCategory = Mage::getModel('catalog/category')->load($categoryId);
+            return Mage::getModel('catalog/category')->load($categoryId);
+        }
+
+        return false;
+    }
+
+    /**
      * Add project specific formatting
      *
      * @param Mage_Model_Catalog_Category $category
1

remove duplicate base files
rm -r /var/www/app/design/frontend/base/default/template/vertnav/

Links
http://www.magentocommerce.com/magento-connect/vertical-navigation-with-css-classes.html - Download on Magento Connect
http://www.magentocommerce.com/boards/viewthread/244440/#t359105 - Bug report "Blocks HTML output cache error"