2

I want to have a specific layout for some of my category pages but instead of always using the XML Layout Update

<reference name="right">
<remove name="left.reports.product.viewed"/>
<remove name="newsletter"/>
</reference>

and so on....

Like this I would prefer to have my normal 3 page column layout and have this for specific categories as a Page Layout. So that instead of copying and pasting the code I could just pick LAYOUT A from the dropdown and this removing of the blocks would be done for me.

I thought I could create a somehting like this but then my page wouldn´t load any css and it would also not remove the blocks as I thought.

1

For all my pages I did it this way

Catalog.xml (so its on the product pages)

<catalog_product_view translate="label">
        <label>Catalog Product View (Any)</label>
             <reference name="content">
<block type="cms/block" name="sale_banner" as="sale_banner" before="product.info"><action method="setBlockId"><block_id>sale_banner</block_id></action></block>...

In the page.xml

    <default translate="label" module="page">
        <label>All Pages</label>
<block type="cms/block" name="sale_banner" as="sale_banner" before="feature_titles"><action method="setBlockId"><block_id>sale_banner</block_id></action></block>

Where "feature_titles" is a block on every page at the top. And then in the according .phtml file

<div class="col-main">
            <?php echo $this->getChildHtml('sale_banner') ?>

In the main div i call the childhtml and then I create a static block in the Magento backend using the "sale_banner" as Identifier

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.