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?


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? – Magento Learner Apr 29 '20 at 19:53
  • Yes b : Class Name Template – Dominic Xigen Apr 29 '20 at 20:34
  • Plus doesn't mention anything about referencing your own template logic in your theme – Dominic Xigen Apr 29 '20 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. – Dominic Xigen Apr 29 '20 at 20:37

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.