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

Move Layered nav between title and list? 
 
rosaltof
Jr. Member
 
Total Posts:  17
Joined:  2008-07-16
 

Hello everyone,

As this is my first post, i will drop in the traditional compliment to Magento.  I have to say it is absolutely awesome!  Many thanks to the core team and contributors grin

I have a quick how do i question…

I’ve moved the layered nav to above the product list but it shows above the category title aswell. See link. How do I move it to between the title and list?

Thanks in advance

 
Magento Community Magento Community
Magento Community
Magento Community
 
brendanb
Mentor
 
Total Posts:  1093
Joined:  2008-07-16
London, United Kingdom
 

hey there,

if you look in this file. Note i refer to the modern theme…
app\design\frontend\default\modern\template\catalog\category\view.phtml

look around line 36 of this file. this gets the category name. Im my file below i moved the cms block (line 35) to above the categpry name. So try this!

<div class="category-head">
        
<?php if($this->IsRssCatalogEnable() && $this->IsTopCategory()): ?>
        
<a href="<?php echo $this->getRssLink() ?>" class="link-feed right"><?php echo $this->__('Subscribe to RSS Feed'?></a>
          
<?php endif; ?>
    <?php 
echo $this->getCmsBlockHtml() /* !!! Look here !!! */?> 
    
<h2><?php echo $this->htmlEscape($this->getCurrentCategory()->getName()) ?></h2>
    </
div>
 
Magento Community Magento Community
Magento Community
Magento Community
 
rosaltof
Jr. Member
 
Total Posts:  17
Joined:  2008-07-16
 

Thanks brendanb, you put me in the right place and i have managed to work it out grin

I am not using the cms blocks for most of my category lists.  My work around was ...

Edit catalog.xml, moving layered nav reference into the category_view.

<catalog_category_layered>
        <
reference name="left">
           
        </
reference>
        <
reference name="content">
            <
block type="catalog/layer_view" name="catalog.leftnav" template="catalog/layer/view.phtml" />
            <
block type="catalog/category_view" name="category.products" template="catalog/category/view.phtml">
                ....
            </
block>
        </
reference>
        ....

to

<catalog_category_layered>
        <
reference name="left">
           
        </
reference>
        <
reference name="content">
            
            <
block type="catalog/category_view" name="category.products" template="catalog/category/view.phtml">
                <
block type="catalog/layer_view" name="catalog.leftnav" template="catalog/layer/view.phtml" as="LayerNav" />
                ....
            </
block>
        </
reference>
        ....

I then edited the app/design/frontend/default/default/template/catalog/category/view.phtml to call the LayerNav tag at around line 65.

<h1><?php echo $this->htmlEscape($this->getCurrentCategory()->getName()) ?></h1>
    </
div>
    <!-- 
Start Edit -->
    
<?php echo $this->getChildHtml('LayerNav'); ?>
    
<!-- End Edit -->
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top