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
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?Magento Learner– Magento Learner2020年04月29日 19:53:08 +00:00Commented Apr 29, 2020 at 19:53
-
Yes b : Class Name TemplateDominic Pixie– Dominic Pixie2020年04月29日 20:34:41 +00:00Commented Apr 29, 2020 at 20:34
-
Plus doesn't mention anything about referencing your own template logic in your themeDominic Pixie– Dominic Pixie2020年04月29日 20:37:38 +00:00Commented Apr 29, 2020 at 20:37
-
1But 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 Pixie– Dominic Pixie2020年04月29日 20:37:52 +00:00Commented Apr 29, 2020 at 20:37