Skip to content
This repository was archived by the owner on Mar 9, 2023. It is now read-only.
This repository was archived by the owner on Mar 9, 2023. It is now read-only.

Root category homepage possible solution #20

@versedi

Description

@versedi

Hello,

Is it possible to trigger filterurls also on homepage that displays all products from root category?
It isn't working with home set as CMS Page with layout update XML because it cant reference current category then.


<reference name="root">
    <action method="setTemplate"><template>page/2columns-left.phtml</template></action>
</reference>
<reference name="content">     
        <action method="setCategoryId"><category_id>2</category_id></action>         
        <block type="catalog/product_list"  name="product_list" template="catalog/product/list.phtml">        
            <block type="catalog/layer_view" name="catalog.layered"  template="catalog/layer/view_horizontal.phtml" before="product_list_toolbar">
            </block> 
            <block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml" before="catalog.layered">
                <block type="page/html_pager" name="product_list_toolbar_pager"/>         
            </block>         
            <action method="setCategoryId"><category_id>2</category_id></action>         
            <action method="setToolbarBlockName"><name>product_list_toolbar</name></action>     
        </block> 
</reference> 

How would you solve it? Maybe there's a more proper way for all products home page with which filter urls would also work?
Have a nice day.

P.S. Working solution that I've found is to setup a new non-root category and apply it to all products - then use that category for homepage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions