Magento Display static blocks with custom layout update

Share
Posted on April 9th, 2013 | Posted by admin

Magento Display static blocks with custom layout update

<reference name=”left”>

<block type=”cms/block” name=”Footer” before=”-”>

<action method=”setBlockId”><block_id>footer_links</block_id></action>

</block>

</reference>

“How to add series” #1: Adding new layout template for Magento

Share
Posted on July 28th, 2011 | Posted by admin

Hello everyone,
Today, Travis asked me to compete with him in sharing Magento knowledge in Magestore blog. Well, of course, I have no fear, and I want to start the competition with “How to add” series. And let’s start with How to add new layout template for Magento.
As we know, Magento provides some defined layouts: 1column, 2 columns (left and right), 3 columns. But I am sure that when working with Magento, sometimes you have to create a new layout for custom page, for example, 3 columns only for cms page.
You can make modification directly in app/code/core/Page/etc/config.xml but if you don’t want to touch core file, I recommend you to follow these steps:

Advanced layout updates for categories and products in Magento

Share
Posted on June 8th, 2011 | Posted by admin

Recently I had a task to modify sorting in only one category of Magento shop.
What I had to do is “only” to change which attribute will be used for default sorting and I needed to reverse ordering from ascending to descending.
Task seems simple, right?

All you need to do is add/edit your category and in admin panel set your new configuration:

Default Product Listing Sort By:

Layout of your custom controller in Magento?

Share
Posted on May 12th, 2011 | Posted by admin

When you work with custom (your own) controllers in Magento, either frontend or backend, you will probably also use existing blocks and models or if needed write your own classes.
But what happens if you want to or have exigency to move/remove common blocks?
Can you really “design” your own page view without touching Cascading Style Sheets?

Acctually, yes you can, as a matter of fact on a pretty easy way.
All you need to know the handles of your controllers.
You know what handles are, right ?

Magento: Display Static Block via Custom Layout Update

Share
Posted on April 21st, 2011 | Posted by admin

Magento: Display Static Block via Custom Layout Update

We were needing to display a static block in the left column (of the 2-columns-left template). We only needed to display it for a few specific products though. There are a couple ways you can do it via Custom Layout Updates. In our case, the products were all in a specific category, and we wanted the static block to show up on the list view AND the product view. So, we put this code in on the product level and the category level:

<reference name="left">
    <block type="cms/block" name="static_block_identifier" before="-">
        <action method="setBlockId"><block_id>static_block_identifier</block_id></action>
    </block>
</reference>
Page 1 of 212»