2

What is the Handler? Can someone explain the below code?

<update handle="customer_account"/>

or same code like above for example :

<update handle="default"/>

and how it worked !?

7

Each page on a Magento website has a handle. That handle equates to a layout XML file. For example, <update handle="customer_account"/> indicates to Magento’s layout system that it should take into account any directives contained within the customer_account.xml file. This particular file is used commonly amongst the various pages within the customer’s account in the secure, logged in area.

default.xml provides layout updates common to all pages on the site.

So, to tie it all together, the customer’s account pages use at minimum the default.xml and customer_account.xml file to determine the layout of those pages.

The handle translates to a layout XML file.

| improve this answer | |
  • hi @Shawn, still not cleared, I am loading custom sidebar menu in account dashboard, there also i used update handle, but not finding the reason behind it. – jafar pinjar Dec 19 '18 at 7:33
  • @jafarpinjar this sounds like something to be addressed in a new post – Shawn Abramson Dec 19 '18 at 8:06
  • That's fine, I wanted to know the main objective of using <update handle ? – jafar pinjar Dec 24 '18 at 11:46
5

Update is used to include a certain layout xml file.

The handle declared in the tag is included.

Shared in Link

You can check about layout handles here

| improve this answer | |

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.