Skip to content

Commit 1d2dd67

Browse files
committed
Adding article as an additional supported layout tag
1 parent a25c107 commit 1d2dd67

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

lib/internal/Magento/Framework/View/Layout/Generator/Container.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ class Container implements Layout\GeneratorInterface
3939
'table',
4040
'tfoot',
4141
'ul',
42+
'article',
4243
];
4344

4445
/**

lib/internal/Magento/Framework/View/Test/Unit/Layout/Generator/ContainerTest.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,26 @@ public function processDataProvider()
138138
['first_container', Container::CONTAINER_OPT_HTML_ID, 'dd_id'],
139139
],
140140
'setAttributeCalls' => 3,
141+
],
142+
'Article as allowed container tag' => [
143+
'structureElements' => [
144+
'first_container' => [
145+
'container',
146+
[
147+
'attributes' => [
148+
Container::CONTAINER_OPT_HTML_TAG => 'article',
149+
Container::CONTAINER_OPT_HTML_CLASS => 'article_class',
150+
Container::CONTAINER_OPT_HTML_ID => 'article_id',
151+
]
152+
],
153+
],
154+
],
155+
'setAttributeData' => [
156+
['first_container', Container::CONTAINER_OPT_HTML_TAG, 'article'],
157+
['first_container', Container::CONTAINER_OPT_HTML_CLASS, 'article_class'],
158+
['first_container', Container::CONTAINER_OPT_HTML_ID, 'article_id'],
159+
],
160+
'setAttributeCalls' => 3,
141161
]
142162
];
143163
}

0 commit comments

Comments
 (0)