Question

Question: If a layout handle exists in the "base/default" package, your custom design package, and the custom package's "local.xml", wich handles can be merged ?

1) All of the handles can be merged.

2) Only the handles in "base/default" can be merged.

3) Only the handles in your design package can be merged.

4) Only the handles in "local.xml" can be merged.

5) Only the handles in "base/default" and "local.xml" can be merged.

6) Only the handles in your design package and "local.xml" can be merged.

Was it helpful?

Solution

Since 4 days that nobody was able to answer this question, so I did my research and I confirm that it is indeed the answer "1)"

1) All of the handles can be merged.

Explication:

How the Magento layout merge works ?

1. When loading a theme, Magento reads the configuration of all the available modules, and checks which layout files should be loaded.

2. For each file, Magento tries to load it from your theme.
If it exists in your theme, it loads it and goes directly to step 4.

3. If the file doesn't exist in your theme, it tries to load it from the base/default theme.

4. Magento parses the XML files and merges them into one.

5. Magento looks for a local.xml file in your theme, and appends whatever is there, to the previously merged layout handles.

Hoping that everyone knows now.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top