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

Full list of available xml handles? 
 
Grayson
Member
 
Avatar
Total Posts:  58
Joined:  2007-11-20
Netherlands
 

I’ve searched the site for the past hour or so but haven’t found an answer to this question:

Is there a complete list somewhere in the documentation of all the handles available for use in the xml files? (And any other set-in-stone-do-not-modify names?) I’ve gone through all the xml files in layout/ and compiled a list, but I’m not sure it’s complete.

Here’s the list I made of available handle names (along with some notes to myself on where they’re used):

======  Available layout xml handles (==available pages to configure):  ======

default
catalog_category_default    (* also used in directory.xml)
catalog_category_layered    (* also used in directory.xml)
catalog_product_compare_index
catalog_product_gallery
catalog_product_send
catalog_product_view   
(* also used in customeralert.xmltag.xml)
catalog_seo_searchterm_popular
catalog_seo_sitemap_category
catalog_seo_sitemap_product

catalogsearch_advanced_form
catalogsearch_advanced_result
catalogsearch_result_index
catalogsearch_term_popular

checkout_cart_index      
(* also used in googlecheckout.xmlpaypal.xml)
checkout_multishipping
checkout_multishipping_address_editaddress
checkout_multishipping_address_editbilling
checkout_multishipping_address_editshipping
checkout_multishipping_address_newbilling
checkout_multishipping_address_newshipping
checkout_multishipping_address_select
checkout_multishipping_address_selectbilling
checkout_multishipping_addresses
checkout_multishipping_billing
checkout_multishipping_customer_address
checkout_multishipping_login
checkout_multishipping_overview
checkout_multishipping_register
checkout_multishipping_shipping
checkout_multishipping_success
checkout_onepage_additional
checkout_onepage_index
checkout_onepage_progress
checkout_onepage_review
checkout_onepage_shippingmethod
checkout_onepage_success

cms_index_defaultindex
cms_index_defaultnoroute


customer_account            
(* also used in newsletter.xmlreview.xmlsales.xmlwishlist.xml)
customer_account_create
customer_account_edit
customer_account_forgotpassword
customer_account_index      
(* also used in catalog.xmlnewsletter.xmlpoll.xmlreview.xmlsales.xmltag.xmlwishlist.xml)
customer_account_login
customer_address_form
customer_address_index
customer_logged_in
customer_logged_out
customer_account_logoutsuccess

giftmessage_index_edit
giftmessage_index_save
giftmessage_index_remove

newsletter_manage_index

paypal_express_review
paypal_express_review_details

print

review_customer_index
review_customer_view
review_product_list
review_product_view
reviews

sales_order_details
sales_order_history
sales_order_print
sales_order_view

shipping_tracking_ajax

tag_customer_index
tag_customer_edit
tag_customer_view
tag_list_index

wishlist_index_index
 
Magento Community Magento Community
Magento Community
Magento Community
 
Grayson
Member
 
Avatar
Total Posts:  58
Joined:  2007-11-20
Netherlands
 

Thanks, Minu! This kind of thing would be great to have somewhere in the documentation, especially your explanation about the handle naming convention (teach a man to fish . . .  smile ).

 
Magento Community Magento Community
Magento Community
Magento Community
 
jjroelofs
Jr. Member
 
Total Posts:  22
Joined:  2008-01-11
 

thnx for posting your tags! hartelijk bedankt wink

 
Magento Community Magento Community
Magento Community
Magento Community
 
rzazueta
Member
 
Total Posts:  34
Joined:  2008-07-21
 

There are a couple of custom navigational items I want to display on the homepage. I went into catalog.cml and added the following lines:

<cms_index_defaultindex>
        <
reference name="right">
            <!-- 
block type="core/template" before="cart_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/ -->
            <
block type="core/template" name="right.homepage.sale_callout" template="homepage/sale_callout.phtml"/>
        </
reference>
        <
reference name="centerListing">
            <
block type="catalog/navigation" name="catalog.center" template="catalog/navigation/center_listings.phtml" />
        </
reference>
    </
cms_index_defaultindex>

I’ve placed the .phtml files in their appropriate places in the file hierarchy. When I put the references under <default> they shouw up fine. When I put them under <cms_index_defaultindex> they disappear from the homepage. I don;t want these items appearing anywhere else but on the homepage. How do I accomplish this?

Rob Z.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Scott
Guru
 
Avatar
Total Posts:  333
Joined:  2007-08-31
Northwest Ohio
 

Just add the references to the layout update section of the home page from the CMS section of the admin panel cool smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
Netismine
Sr. Member
 
Avatar
Total Posts:  174
Joined:  2008-10-28
 

which one of these reffers to frontpage? Ive tried with cms_index_defaultindex but failed

 
Magento Community Magento Community
Magento Community
Magento Community
 
Netismine
Sr. Member
 
Avatar
Total Posts:  174
Joined:  2008-10-28
 

<cms_index_index> references only the homepage

 
Magento Community Magento Community
Magento Community
Magento Community
 
Bojan Hrnkas
Member
 
Total Posts:  51
Joined:  2008-04-15
 

<cms_index_defaultindex> is used only if there is no cms-page with identifier ‘home’. In order to trigger this layout update, you have to disable or delete cms-page with identifier ‘home’

Similar situation is with <cms_index_defaultnoroute>. It gets triggered only if the is no cms-page with identifier ‘no-route’.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Netismine
Sr. Member
 
Avatar
Total Posts:  174
Joined:  2008-10-28
 

this was long time ago

If anyone needs this, you can easily add content from Custom Design tab in Page menu, where you do something like

<reference name="content">
<block type="poll/poll" ........ />
</reference>

 
Magento Community Magento Community
Magento Community
Magento Community
 
Massimiliano B.
Jr. Member
 
Avatar
Total Posts:  16
Joined:  2009-09-24
 

I have a proposal: many of the “technical” post like this can be closed and replaced with the “state of the art” solution updated to the last version.

I think many people approaching Magento remain confused from all this thread with discordant information.......

Templating and Importing / Exporting Data are the first problem I think

 
Magento Community Magento Community
Magento Community
Magento Community
 
Jason J
Sr. Member
 
Total Posts:  79
Joined:  2008-05-29
 

I have also searched for this list of handles, and reached the conclusion that it does not exist, simply because it will change from one install to another - simply depending on what themes and modules are available.

To try and get my head around the themes (and that is *really* hard to do) I am putting together a script to provide theme reports for me. It is possible through admin settings to see what templates are being rendered, but it is not so easy to see - or predict - what is invoking those templates in the first place.

The first draft of my script is running here on a stock Magento 1.4 installation:

http://magento.consil.co.uk/themes.php

It will simply allow you to chose an interface and a theme, and then list all the layout files that make up the theme. For each layout file it will list all the handles that it contains.

By clicking on the “handle” link, you can flip that relationship up-side-down and view all the layout files that contain a specific handle. Clicking on the handle will then list the XML from those layout files.

I intend to keep expanding the script as I learn more about how the themes work. Being able to drill down into the detail of the handles, listing all the widgets, menus, templates etc. involved would be the next step. Putting some documentation against the handles would also be a good idea.

Eventually I would like to be able to see at a glance where the rendering for any particular item on the screen is coming from, and from there be able to see at a glance where else in the shop that item will appear. I would like to see where things are being added to menus (in the layout files at least - I’m sure there is just as much going on in the code to manipulate menus, but hopefully not too much).

It has taken writing this script to understand exactly why Magento themes are so hard to do: it is simply that in any page render, the layout can be affected by *any* module, *any* layout file, and *any* widget could get inserted. You can’t just look at one file to determine how a page is built, because *all* the files in a theme are involved in *every* page.

Here is an example:

http://magento.consil.co.uk/themes.php?interface=default&theme;=modern&group;=handle&handle;=catalog_category_default

This is looking at the handle “catalog_category_default”. It shows that four layout files contribute to this handle, and lists the actions that each performs. What isn’t clear yet is just how this handle gets “invoked” - is it always from some single point in the application code, or could it be from widgets or other handles too? If it is, then that explains why the Magento themes can get even hairier (scarier).

Beyond the handles, the references also need to be extracted. When you see something like “customer_account_dashboard” as a reference - what on Earth does it mean? What does it represent and where do I find it? That bit I don’t understand fully yet. I realise the three parts to it customer/account/dashboard should help to find that - in this case it points us towards app/code/core/Mage/Customer/controllers/AccountController, where I can see a block called “customer/account_dashboard” is created, which (I think) leads to a template at app/design/frontend/base/default/template/customer/account/dashboard.phtml. But writing a script that can interpret that code and extract that information to help a theme developer - maybe that is asking too much?

I always tell my colleagues that writing a Magento theme is a one-way process: you can write a theme from scratch, but trying to reverse-engineer an existing theme is nearly impossible.

-- Jason

 
Magento Community Magento Community
Magento Community
Magento Community
 
lsujoe
Member
 
Total Posts:  31
Joined:  2008-04-21
 

Jason, thanks for the detailed insight.  It is very helpful.  Yes, I agree reverse engineering a theme can be quite a pain.

 
Magento Community Magento Community
Magento Community
Magento Community
 
nadshez
Member
 
Avatar
Total Posts:  48
Joined:  2008-04-16
 

Excellent script Jason. Probably the only debugging tool I’ve found yet for Magento.

for those who can make sense or want to lose more hair, following gives you a deep insight into Magento

http://magentozone.wordpress.com/category/magento-basic/

 
Magento Community Magento Community
Magento Community
Magento Community
 
mark2501
Jr. Member
 
Total Posts:  2
Joined:  2012-07-31
 

Nice And Informative Post thanks For Sharing .

Need more detailed refer You visit There
magneto

Image Attachments
ecommerce-by-Website-Expert.jpg
 
Magento Community Magento Community
Magento Community
Magento Community
 
mark2501
Jr. Member
 
Total Posts:  2
Joined:  2012-07-31
 

Hey ,
If Any One Need To A Best magneto Developer And Visit There and visit our Portfolio..

Image Attachments
WILL01-2T.jpg
 
Magento Community Magento Community
Magento Community
Magento Community
 
itzik770
Jr. Member
 
Total Posts:  1
Joined:  2009-11-09
 

My Code to retrieve all package handles:

$this->getLayout()->getUpdate()->fetchFileLayoutUpdates();
                
//layout with handles
                
$packageLayout$this->getLayout()->getUpdate()->getPackageLayout();
                echo 
\\\"children count: \\\".$packageLayout->count().\\\"\\\\n\\\";
                
$handles=array();
                foreach(
$packageLayout->children() as $e{
                    
if (!in_array($e->getName(),$handles)) {
                        $handles[]
=$e->getName();
                    
}
                }
                
echo \\\"<h4>All Package Handles:</h4>\\\";
                
var_export($handles);

For the code to work one small method added to

class Mage_Core_Model_Layout_Update

 
public function getPackageLayout() {
         
return $this->_packageLayout;
    
}
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top