Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

left side caterogy list
 
sherrie
Moderator
 
Avatar
Total Posts:  1655
Joined:  2007-12-14
Waterloo, ON
 

Your problem is that you still have the name declared as “catalog.vertnav” ... I’m thinking that should actually be “catalog.leftnav” but when I declare it as that it actually just duplicates the layered navigation on category pages and causes an error on the home page ... I’ll let you know when I figure it out.

 
Magento Community Magento Community
Magento Community
Magento Community
 
SparxDesign
Jr. Member
 
Total Posts:  18
Joined:  2008-06-18
 

Yes because there is already a left hand category menu, when you click on “View all Products”

http://www.medshop.co.nz/index.php/pro

Click on this link, I only want to have the top left vertical menu on every page, I tried to implement a menu code on this thread here,

http://www.magentocommerce.com/boards/viewthread/720/P30/

but now I have two of the menus.

It must be just a simple code to keep this menu on the left.

Cheers
Sheldon

 
Magento Community Magento Community
Magento Community
Magento Community
 
pdxwebhead
Jr. Member
 
Total Posts:  27
Joined:  2008-07-16
Portland Oregon
 

Wow, love this thread. Thanks Dan!  I am having problems with the CSS styling. I have applied this code to the Modern 1.1.1 Theme, and it will not display the subcategories. Dan makes reference to this in his notes for the CSS,

Note: The css is essentially the same for the horizontal nav, except for two spots. nav_vert and nav_vert li. Notice, we put a width on these two items, which will restrict the category menu to the width of the column, thus creating a vertical, rather than horizontal menu, which doesn’t have a defined width for the line items. You’ll also notice that we created a new container and box for the vertical menu called vertical-nav-container and vertical-nav. these allow for additional markup and styling that can be added to the main boxes.css file. Here, I will leave them blank.


Looking for an assist - I don’t know which CSS code and or file to edit....

Thanks!

Image Attachments
danfix_modern.png
 
Magento Community Magento Community
Magento Community
Magento Community
 
Michal_s
Sr. Member
 
Total Posts:  111
Joined:  2008-05-15
The Netherlands
 

i cant seem to get this working on my homepage, i already added the blok in the system>cms>homepage but it doesnt display. Categorie page works perfectly only the index doesnt work.

Added this blok, as you can see i want the nav right.
<reference name="right">
<block type="catalog/navigation" name="catalog.vertnav" template="catalog/navigation/right.phtml" />
</reference>

Doe i have to add something in page.xml?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Michal_s
Sr. Member
 
Total Posts:  111
Joined:  2008-05-15
The Netherlands
 

Fixed; delete from catalog/navigation/right.phtml OR in left menu catalog/navigation/vert_nav.phtml

<?php if (!Mage::registry('current_category')) return ?>
On the very first line.

 
Magento Community Magento Community
Magento Community
Magento Community
 
schmelzgeist
Sr. Member
 
Total Posts:  92
Joined:  2008-05-27
Marzipane World Capital (Lübeck, Germany)
 

i have updated to 1.1.2 all of a sudden my categories are not shown on CMS pages?  das anybody knew why?

i used

<?php $collection Mage::getModel('catalog/category')->getTreeModelInstance()->getCollection(); ?>

for it , it works on any page not a CMS Page and it worked with 1.0

any help, please? smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
schmelzgeist
Sr. Member
 
Total Posts:  92
Joined:  2008-05-27
Marzipane World Capital (Lübeck, Germany)
 

here the complete code:

[/code]
<?php $collection 
Mage::getModel('catalog/category')->getTreeModelInstance()->getCollection(); ?>

<div id="menulist" ><ul >
                
                
<?php   
                
                
//var_dump($collection); works on any page
                
                
foreach($collection as $category):   
                            
$_catid=$category->getId();
                        
$i=0;
        


//echo $_catid."&nbsp;"; it works on any page  displaying all categories
        
if($_catid==48):
        
$_childids=$category->getChildren();
        
        
//var_dump($_childids);  Here it is an empty string on Product view and CMS Pages but why??
        
        
$cid=explode(','$_childids);

        while(
$i count($cid)):
                foreach(
$collection as $childcat): 
    if ((
$childcat->getId())==$cid[$i]):
    
?>
  
<li class="menulist-items" id="<?php echo $cid[$i] ?>" onmouseout="toggleMenuList(1);toggleBackground(1,<?php echo $cid[$i] ?>)" onmouseover="toggleMenuList(0);toggleBackground(0,<?php echo $cid[$i] ?>)" ><a href="<?php echo $childcat->getCategoryIdUrl();  ?>"><?php echo $childcat->getName();  ?></a></li>
  
<?php 
       
endif;
      endforeach;
     
$i++;
    endwhile;
   endif;
endforeach; 
?>
                
</ul></div>
 
Magento Community Magento Community
Magento Community
Magento Community
 
sleepy
Jr. Member
 
Total Posts:  1
Joined:  2008-08-11
 

Sorry, I’ve managed to get this working, however I just want it to show the subcategories of the page your currently in, is there a quick update of this code to enable me to do this?

IE .. I have a category called GIFT SETS, with several sub categories under that, I’d like to simply show all those sub categories in a nav on the right of the page when your currenty in the Gift Sets pages,

 
Magento Community Magento Community
Magento Community
Magento Community
 
hallowed
Jr. Member
 
Total Posts:  21
Joined:  2008-08-19
 

I am also interested in having a side menu under the sub categories for each main category on the Left hand side.

IE Say the Header Categories has ‘Baked Goods’ which when clicked brings you to the ‘Baked Goods’ sub-category, I would like that particular category to have just items from the ‘Baked Goods’ section to be shown on the left only.

How would I go about this?

Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
hallowed
Jr. Member
 
Total Posts:  21
Joined:  2008-08-19
 

Any one have an answer yet?

 
Magento Community Magento Community
Magento Community
Magento Community
 
pdxwebhead
Jr. Member
 
Total Posts:  27
Joined:  2008-07-16
Portland Oregon
 

I have been waiting weeks for this answer....

 
Magento Community Magento Community
Magento Community
Magento Community
 
dinosaur
Jr. Member
 
Total Posts:  10
Joined:  2008-08-22
 
bloggleme - 12 May 2008 08:20 AM

Also,

I only want to display the first level of categories in my side nav - don’t want any sub categories when I hover over. How do I disable them?

Very interested on this too. Anyone as an answer?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sander
Sr. Member
 
Avatar
Total Posts:  232
Joined:  2008-01-08
Netherlands
 
dinosaur - 23 August 2008 03:08 AM

bloggleme - 12 May 2008 08:20 AM
Also,

I only want to display the first level of categories in my side nav - don’t want any sub categories when I hover over. How do I disable them?

Very interested on this too. Anyone as an answer?

Overwrite this bit of code: catalog/block/navigation.php, with a local navigation block.

Overload the drawitem() function. Remove this bit:

if ($hasChildren){

$j = 0;
$htmlChildren = ‘’;
foreach ($children as $child) {
if ($child->getIsActive()) {
$htmlChildren.= $this->drawItem($child, $level+1, ++$j >= $cnt);
}
}

if (!empty($htmlChildren)) {
$html.= ‘<ul class="level’ . $level . ‘“>’."\n"
.$htmlChildren
.’</ul>’;
}

}

You could also make a function like ‘drawLeftItem()’ and call that in your template instead of drawItem ;]

Sorry I can’t be more elaborate (no time), overloading etc are explained elsewhere on this forum if you need more info.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sander
Sr. Member
 
Avatar
Total Posts:  232
Joined:  2008-01-08
Netherlands
 

In reply to only showing subcategories in the left column category list :

In the left navigation template:

<?php $_categories=$this->getCurrentChildCategories() ?>
<?php if($_categories->count()): ?>
<div class="box layered-nav">
<div class="head">
<h3><?php echo $this->__('Browse By') ?></h3>
</div>
<div class="border-creator">
<div class="narrow-by">
<dl id="narrow-by-list">
<dt><?php echo $this->__('Category') ?></dt>
<dd>
<ol>
<?php foreach ($_categories as $_category): ?>
<?php if($_category->getIsActive()): ?>
<li>
<a href="<?php echo $this->getCategoryUrl($_category) ?>"<?php if ($this->isCategoryActive($_category)): ?> class="active"<?php endif ?>><?php echo $this->htmlEscape($_category->getName()) ?></a> (<?php echo $_category->getProductCount() ?>)
</li>
<?php endif; ?>
<?php endforeach ?>
</ol>
</dd>
</dl><script type="text/javascript\">decorateDataList(’narrow-by-list’)</script>
</div>
</div>
</div>
<?php endif; ?>

The main difference is using getCurrentChildCategories(), instead of asking Magento for all main categories.

 
Magento Community Magento Community
Magento Community
Magento Community
 
dinosaur
Jr. Member
 
Total Posts:  10
Joined:  2008-08-22
 

Thanks a lot sander.
If you have some time can you please help me with these questions: http://www.magentocommerce.com/boards/viewthread/15790/
Sorry for bothering you....

Best Regards,
Daniel Martins

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top