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

catalog/navigation/left.phtml doesn’t change
 
lotusseedsD
Mentor
 
Avatar
Total Posts:  1144
Joined:  2007-08-31
 

I took out some div classes in the left.phtml and replaced them with other elements, but I am still seeing the same default markups

Here is my code.
<div class="layered-nav">
<h3><?=$this->__('Browse By')?></h3>

<div class="narrow-by">
<h4><?=$this->__('Category')?></h4>
<ol>
<?foreach ($_categories as $_category):?>
<?if($_category->getIsActive()):?>
<li><a href="<?=$this->getCategoryUrl($_category)?>"<?if ($this->isCategoryActive($_category)):?> class="active"<?endif?>><?=$_category->getName()?></a> (<?=$_category->getProductCount()?>)</li>
<?endif;?>
<?endforeach?>
</ol>

<script type="text/javascript\">decorateDataList(’narrow-by-list’)</script>
</div><!-- end narrow-by -->
</div><!-- layered-nav -->
<?endif;?>
<!-- [ends] .browse-by // -->

Can you please take a look
Many thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
lotusseedsD
Mentor
 
Avatar
Total Posts:  1144
Joined:  2007-08-31
 
ohminu - 28 October 2007 09:47 AM

chinesedream,

If you see the wrong markup reflected, perhaps it’s a configuration problem in the admin? Could you list how you have the design configuration set up?

Hi Moshe, screenshot attached

Image Attachments
designconfig.png
 
Magento Community Magento Community
Magento Community
Magento Community
 
lotusseedsD
Mentor
 
Avatar
Total Posts:  1144
Joined:  2007-08-31
 

Hi ohminu, can you pleaseeee look into this issue again?

Three and a half months later, I still can’t get my code shows up in the 0.8.16100.  Last time when I posted my message, I didn’t check the Cache Management, I can’t remember if the feature was available with .6x version. I tried disable/enable, enable/disable and refresh all caches in the Cache Management, and restarted the local server, still the changes doesn’t show up.

I also tried replacing the “ <?=$this->getChildHtml('left')?> to “ <?=$this->getChildHtml('leftnav')?>, then created a new ‘leftnav.phtml’ and placed in the same folder. With this modification, the layered navigation doesn’t output even after I gone throught the Cache Management cycle.

Image Attachments
1.png
 
Magento Community Magento Community
Magento Community
Magento Community
 
lotusseedsD
Mentor
 
Avatar
Total Posts:  1144
Joined:  2007-08-31
 

Hi ohminu or anyone from Magento, I think I have discovered what might be causing the probelm but am not 100% sure, and don’t know how to fix it. Please take a look on this issue and see if two files are mixed up.

I thought the phtml file for the layered nav is ‘catalog > navigation > left.phtml‘ because the markup contains Ordered List as descendent in the DL element.

<dt><?=$this->__('Category')?></dt>
                <
dd>
                    <
ol>
                    
<?foreach ($_categories as $_category):?>
                        <?if
($_category->getIsActive()):?>
                        
<li>
                            <
a href="<?=$this->getCategoryUrl($_category)?>"<?if ($this->isCategoryActive($_category)):?> class="active"<?endif?>><?=$_category->getName()?></a> (<?=$_category->getProductCount()?>)
                        </
li>
                        
<?endif;?>
                    <?endforeach?>
                    
</ol>
                </
dd>
                                </
dl><script type="text/javascript">decorateDataList('narrow-by-list')</script>
                            
</div>

This matches the Layered Navigation on my Category page.

Just now I found another file: ‘catalog > layern > view.phtml‘, the h3 ( <h3><?=$this->__('Shop by')?></h3>) and h4 ( <h4><?=$this->__('Shopping Options')?></h4>) in the Layered Navigation match my category page, whereas the left.phtml shows only :
<div class="head">
<h3><?=$this->__('Browse By')?></h3>
</div>

view.phtml also contain a DL element but without OL as descendent

<dl id="narrow-by-list">
                
<?$_filters $this->getFilters()?>
                <?foreach 
($_filters as $_filter):?>
                <?if
($_filter->getItemsCount()):?>
                
<dt><?=$_filter->getName()?></dt>
                <
dd>
                
<?=$_filter->getHtml()?>
                
</dd>
                
<?endif;?>
                <?endforeach
;?>
            
</dl>

It looks to me that the Layered Navigation should output the filters from view.phtml, instead, it outputs from the ‘left.phtml’. I think this is the reason I can’t see the changes reflect on the browsers even all caches were refreshed, disabled.

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