I'm doing some Magento 2 certification test questions. There's one question I do not understand.

The question is as the screenshot. My answer is D, but the correct answer from the test is B

enter image description here

I've been working a lot with layout xml, and I'm quite convinced D is the correct way to declare a custom layout. But if B is the correct answer, can anyone explain why?

1 Answer 1


The node attributes are ordered alphabetically

This is the clean way to write XML

  • so B (second answer Marked with Green color from screenshot) is the correct answer? Apr 29, 2020 at 19:53
  • Yes b : Class Name Template Apr 29, 2020 at 20:34
  • Plus doesn't mention anything about referencing your own template logic in your theme Apr 29, 2020 at 20:37
  • 1
    But it's a awful question as D could be correct if you are writing something for your own extension. A and C or not correct because of syntax. Apr 29, 2020 at 20:37

Your Answer

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

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