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

showing the subcategories in an separate place after klicking the main category
 
deelite
Jr. Member
 
Total Posts:  29
Joined:  2008-04-15
Dresden
 

Hi,

today i completely renew this post because i’m afraid, nobody does understand my question.

What do i want:

I want to place the subcategories in a row under my list of maincategories. After clicking the maincategory. And showing the list all the time the user is anywhere within the maincategory.

At the moment i have the subcategories at the left hand side after clicking the maincategory. When i click into a product, the list of subcategories are not showing.

My questions:

1. How do i get the list of subcategories from the left hand side to the wanted place (the row with the red subcats i have in the header.phtml). I only need the way to move, not the styling or listing.
2. How can i get it showing on every time the user is doing anything in the active maincategory (showing list of products of the main- and subcategory, showing products and product-details...)

After 1 week of searching now i am a bit confused and i really need your help! Please let the sun go up for me!

Image Attachments
subcat.png
 
Magento Community Magento Community
Magento Community
Magento Community
 
deelite
Jr. Member
 
Total Posts:  29
Joined:  2008-04-15
Dresden
 

Nobody can help me?

 
Magento Community Magento Community
Magento Community
Magento Community
 
deelite
Jr. Member
 
Total Posts:  29
Joined:  2008-04-15
Dresden
 

Heeeeeelp!

I only need a way to get a static output of subcategories. I don’t need it in the dynamic menu. I ONLY need this “little bit”. Please, think and write for me.

Thank you very, very much!

 
Magento Community Magento Community
Magento Community
Magento Community
 
dan_w
Sr. Member
 
Total Posts:  290
Joined:  2008-01-04
 

Create a new template called subcats.phtml. Place the template under app->design->frontend->[YOUR_PACKAGE_NAME]->[YOUR_THEME]->template->catalog->navigation. In subcats.phtml place the following code:

<?$_categories=$this->getCurrentChildCategories()?>
<?if
($_categories->count()):?>
           <?foreach 
($_categories as $_category):?>
                      
<div>
                        
<?if($_category->getIsActive()):?>
<div><a href="<?php echo $this->getCategoryUrl($_category)?>"<?if ($this->isCategoryActive($_category)):?> class="active"<?endif?>><?php echo $_category->getName()?></a></div>
                        
<?endif;?>
                      
</div>
                    
<?endforeach?>
    <?endif
;?>

That will give you all of the subcats for the current category. I’m not sure where or how you want to implement this, but you can call this from a cms using:
{{block type="catalog/navigation" name="catalog.subnav" template="catalog/navigation/subcats.phtml" }}
Or, you can add:
<block type="catalog/navigation" name="catalog.subnav" template="catalog/navigation/subcats.phtml" />
to the appropriate xml file for layout. You can certainly add whatever css and html markup to the above template file to match the look consistent with your site. Right now, it doen’t include any styling, but will output the list.

Dan

 
Magento Community Magento Community
Magento Community
Magento Community
 
deelite
Jr. Member
 
Total Posts:  29
Joined:  2008-04-15
Dresden
 

Yes! Yes! Yes!

IT WORKS!

Now my family will get me back!

Thank you so much!

 
Magento Community Magento Community
Magento Community
Magento Community
 
deelite
Jr. Member
 
Total Posts:  29
Joined:  2008-04-15
Dresden
 

Small problem: when i click into one of the subcats, then the menu with the subcats is not shown. I think, the logic of your code is to show alls subcats of an active category. OK. But i only have 2 levels of categories: maincategories an 1 level of subcategories. In case of showing the content of a subcategory i want to have all the other subcategories shown.

Is it possible to get an update of the code so i can show all subcategories while being within one of them.

Thanks a lot at the moment.,

 
Magento Community Magento Community
Magento Community
Magento Community
 
deelite
Jr. Member
 
Total Posts:  29
Joined:  2008-04-15
Dresden
 

nobody has any idea? i am a little bit confused.

 
Magento Community Magento Community
Magento Community
Magento Community
 
floreadm
Jr. Member
 
Avatar
Total Posts:  8
Joined:  2008-07-06
Bucharest, Romania
 

<?$_categories=$this->getCurrentChildCategories()?>
<?if($_categories->count()):?>
<?foreach ($_categories as $_category):?>
<div>
<?if($_category->getIsActive()):?>
<div><a href="<?php echo $this->getCategoryUrl($_category)?>"<?if ($this->isCategoryActive($_category)):?> class="active"<?endif?>><?php echo $_category->getName()?></a></div>
<?endif;?>
</div>
<?endforeach?>
<?endif;?>

 
Magento Community Magento Community
Magento Community
Magento Community
 
deelite
Jr. Member
 
Total Posts:  29
Joined:  2008-04-15
Dresden
 

Sorry, but this is no aswer to my question, because it’s the same code as the code from dan_w.

Does nobody have any idea

 
Magento Community Magento Community
Magento Community
Magento Community
 
deelite
Jr. Member
 
Total Posts:  29
Joined:  2008-04-15
Dresden
 

Sorry, but this is no aswer to my question, because it’s the same code as the code from dan_w.

Does nobody have an idea to solve my problem?

 
Magento Community Magento Community
Magento Community
Magento Community
 
deelite
Jr. Member
 
Total Posts:  29
Joined:  2008-04-15
Dresden
 

pushing this topic ...

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