1

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.

4
  • Is this a multiple choice question from the certification? What kind of answer do you expect for it? Commented May 24, 2017 at 7:51
  • Yes, I was not able to answer this question and I was not sure about my answer, but may I say the answer is 1)
    – PЯINCƎ
    Commented May 24, 2017 at 7:59
  • Without checking code i'd choose 6)
    – sv3n
    Commented May 24, 2017 at 20:23
  • 1
    it's indeed the 1)
    – PЯINCƎ
    Commented May 28, 2017 at 6:07

1 Answer 1

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.