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 categories? 
 
dimid
Jr. Member
 
Total Posts:  11
Joined:  2008-08-08
 

I’ve read a bunch of posts on getting a left side category navigation or vertical navigation box, this is the code i followed and got it working

http://www.magentocommerce.com/boards/viewthread/4722/P0/
however in a lot of other threads I read about the left.phtml and that it’s built in to the default template already. And reading another post and following the code I couldn’t get it to work. Can someone explain how to do it i’ve edited catalog.xml, page.xml, and 3columns.phtml and still haven’t got it to work. I’ve used cs-cart before and love their menu options i wish magento was a bit more flexible on how to display the categories. Any help is really appreciated there is no way for me to use a top nav for my site there are to many categories that i want displayed without drop downs.

Thanks in advance

 
Magento Community Magento Community
Magento Community
Magento Community
 
chiaraweb
Guru
 
Avatar
Total Posts:  721
Joined:  2008-03-21
Aviano ~ Italy
 

Hi

I use cs-cart too wink

I used this solution, and I think that this is the fasted way for me.

1-. Create a file named “left_menu1.phtml” in “magento\app\design\frontend\default\default\template\catalog\navigation\”

left_menu1.phtml

<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">
           
         <
dd>
         <
ol>        
        
<?php foreach ($this->getStoreCategories() as $_category): ?>
            
<dt>
             <
a href="<?php echo $this->getCategoryUrl($_category) ?>"<?php if ($this->isCategoryActive($_category)): ?> class="active"<?php endif ?>><?php echo $this->htmlEscape($_category->getName()) ?></a>
            </
dt>
        
<?php endforeach ?>
        
       
</ol>
      </
dd>
      </
dl><script type="text/javascript">decorateDataList('narrow-by-list')</script>
    
</div>
   </
div>
</
div>

2-. Go to: CMS->Manage Pages, and click in Homepage, select in the left “Custom Design” and write this code in “Layout Update XML”:

<reference name="left">
    <
block type="catalog/navigation" name="catalog.leftnavig" before="-" template="catalog/navigation/left_menu1.phtml"/>
</
reference>
 
Magento Community Magento Community
Magento Community
Magento Community
 
chiaraweb
Guru
 
Avatar
Total Posts:  721
Joined:  2008-03-21
Aviano ~ Italy
 

or you can put this code

<block type="catalog/navigation" name="catalog.leftnavig" before="-" template="catalog/navigation/left_menu1.phtml"/>

into page.xml

like here

<block type="core/text_list" name="left" as="left">
<
block type="catalog/navigation" name="catalog.leftnavig" before="-" template="catalog/navigation/left_menu1.phtml"/>
</
block>
 
Magento Community Magento Community
Magento Community
Magento Community
 
vijay158
Jr. Member
 
Total Posts:  2
Joined:  2008-08-25
 

I tried the same process, but i am not able to display cat at left side,

Plz help me..

 
Magento Community Magento Community
Magento Community
Magento Community
 
EAGLE
Jr. Member
 
Total Posts:  3
Joined:  2008-08-28
 

But where is the “page.xml”?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Dave Walker
Jr. Member
 
Avatar
Total Posts:  20
Joined:  2008-07-21
 

Many thanks chiaraweb. 

This worked for me in 1.3.2.3.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Rachel
Member
 
Total Posts:  59
Joined:  2010-04-19
 

Hi!  I followed chiarawebs instructions which were so easy compared to everything else out there, and I got a left vertical category menu.

Now the question is, how do I get it to show in each page of the website.

the last question is, how do I get rid of the horizontal navigation menu.

Thanx in advance!

Rachel

 
Magento Community Magento Community
Magento Community
Magento Community
 
time2php
Jr. Member
 
Total Posts:  9
Joined:  2011-09-02
 

HI all
chiaraweb gives a good solution i also tried to and wrote some tricks regarding left navigation on http://www.time2php.com/tag/magento-left-side-category-navigation

Short explanation is as follows
Step1:
Magento\app\design\frontend\base\default\template\catalog\navigation\categorymenu.phtml

<?php
/**
 * Left Category menu for store
 * We are showing  jsut the top level categorioes
 * @see Mage_Catalog_Block_Navigation
 */
?>
<div class="block block-category">
    <
div class="inside-box">
        <
div class="block-title block-category-title"><h2><?php echo $this->__('Categories'?></h2></div>
        <
div class="block-category-navigation">
            <
ul id="category-nav">
                
<?php foreach ($this->getStoreCategories() as $_category): ?>
                <?php 
if($_category->name!=""):  ?>
                    
<li><?php echo $this->drawItem($_category?></li>
                
<?php endif?>
                <?php 
endforeach ?>
            
</ul>
        </
div>
    </
div>
</
div>

Step2 a: how to show left navigation on Home Page
Change the page.xml to include category navigation menu.
open root magento folder location (asuming the default template is active)

app\design\frontend\base\default\layout\page.xml. Line no. 83 looks like :

<block type="core/text_list" name="left" as="left" translate="label">
         <
label>Left Column</label>
     </
block>

This section tells us the left hand side section inherit from its parent Catalog So we have to modify the catalog.xml file located in the same folder hence open

app\design\frontend\base\default\layout\catalog.xml.

here on top you find a few comments at each section
<!--
Default layout, loads most of the pages
-->

1

<reference name="left">

 <
block type="catalog/navigation" name="catalog.categorymenu" after="top.search" template="catalog/navigation/categorymenu.phtml"/>

            <
block type="core/template" name="left.permanent.callout" template="callouts/left_col.phtml">

               <
action method="setImgSrc"><src>images/media/col_left_callout.jpg</src></action>

                <
action method="setImgAlt" translate="alt" module="catalog"><alt>Our customer service is available 24/7. Call us at (555555-0123.</alt></action>

                <
action method="setLinkUrl"><url>checkout/cart</url></action>

            </
block>

        </
reference>

like the above code you can add the following line in various sections where you need this. you just need to add the following block

<block type="catalog/navigation" name="catalog.categorymenu" after="top.search" template="catalog/navigation/categorymenu.phtml"/>
 
Magento Community Magento Community
Magento Community
Magento Community
 
dastoke
Jr. Member
 
Total Posts:  21
Joined:  2012-03-14
 

Hi, I am really struggling to acheive what I need for the left side bar on the Hompage.
I have managed to insert the shop by category in the left navigation but wanted as follows;

1) To list only categories from level 3 (root>Cat1>Cat2>CAT3
I have managed to get all categories showing but really do not need Cat 1 & 2 to show here

2) To use the category thumbnail only in the sidebar for these CAT3’s

Any help would be appreciated!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Amasty
Mentor
 
Avatar
Total Posts:  3988
Joined:  2009-11-10
 

Hi!
You can easily do it with Improved Navigation extension.
It has Advanced categories functionality, which will help you.
For more details, user guide and live demo please follow the link http://amasty.com/improved-navigation-advanced-categories-menu.html

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