0

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?

asked Apr 29, 2020 at 18:51

1 Answer 1

1

The node attributes are ordered alphabetically

This is the clean way to write XML

answered Apr 29, 2020 at 19:37
4
  • so B (second answer Marked with Green color from screenshot) is the correct answer? Commented Apr 29, 2020 at 19:53
  • Yes b : Class Name Template Commented Apr 29, 2020 at 20:34
  • Plus doesn't mention anything about referencing your own template logic in your theme Commented 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. Commented Apr 29, 2020 at 20:37

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.