2017 © Pedro Peláez
 

magento-module extra-layout-handles

Add extra layout handles to routes

image

bennoislost/extra-layout-handles

Add extra layout handles to routes

  • Saturday, October 31, 2015
  • by bennoislost
  • Repository
  • 1 Watchers
  • 0 Stars
  • 83 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Extra Layout Handles

This is a utility module that should make building Magento websites a bit easier., (*1)

Forked from https://github.com/ho-nl/Ho_Handles. Top work chaps!, (*2)

Getting started with handles.

The following snippit will remove the product listings from direct children of category id 15, also adds a simple text block to the top of content., (*3)

<CATEGORY_15_child>
    <reference name="content">
        <action method="unsetChild">
            <alias>category.products</alias>
        </action>
        <block type="core/text_list" name="test" before="-">
            <block type="core/text" name="benno" output="toHtml">
                <action method="setText">
                    <text>hello</text>
                </action>
            </block>
        </block>
    </reference>
</CATEGORY_15_child>

Add the above snippet to your themes local.xml, (*4)

Add handles to category page

If you are viewing a category: /products/dvds.html (category id: 5), (*5)

You'll get a handle by default: CATEGORY_5, (*6)

We add the following:, (*7)

Handle: CATEGORY_2_child_child

Category 2 is the root category for this store, so allows for store specific configuration. If the category path is longer it will show something like CATEGORY_2_child_child_child, (*8)

Handle: CATEGORY_2_child_dvds

This one is kinda cool, this one allows you have one layout for multiple childcategories. Imagine the following categories: - /playgroup/books.html - /kindergarten/books.html - /elementary/books.html, (*9)

All these categories will have the CATEGORY_2_child_books handle, so you can all style them the same!, (*10)

Handle: CATEGORY_3_child

Child of a certain category. If the category path is longer it will show something like CATEGORY_3_child_child., (*11)

Handle: CATEGORY_3_dvds

This one probably is kinda useless, but is the current category written in a different notation and the way the module works this one is currenlty automatically added., (*12)

Add category handle to product page.

The same as for the category applies, except everything is prefixed with PRODUCT_CATEGORY_., (*13)

Add attribute set handle to product page

PRODUCT_ATTRIBUTE_SET_default

For styling based on the attribute set handle., (*14)

Add handles to CMS page

If you have the page: customerservice/faq/question_one, you'll get the following handles:, (*15)

CMS_PAGE_customerservice_child_child
CMS_PAGE_customerservice_faq_child
CMS_PAGE_customerservice_faq_question_one

Thanks

https://github.com/ho-nl/Ho_Handles, (*16)

The Versions

31/10 2015

dev-master

9999999-dev

Add extra layout handles to routes

  Sources   Download

MIT

The Requires

 

by Ben McManus

31/10 2015

dev-epic/2.0

dev-epic/2.0

Add extra layout handles to routes

  Sources   Download

MIT

The Requires

 

by Ben McManus

31/10 2015

0.0.1

0.0.1.0

Add extra layout handles to routes

  Sources   Download

MIT

The Requires

 

by Ben McManus