-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Description
Description
I have an XML file that creates a new container. It is using a <p> element, one of the valid element types for htmlTag. Using the move directive, I relocate top.search into this new element.
XML source
The XML:
<?xml version="1.0"?>
<page>
<body>
<referenceContainer name="main.content">
<container name="new.container" htmlTag="p" htmlClass="new-container" />
</referenceContainer>
<move element="top.search" destination="new.container" />
</body>
</page>
HTML output
Expected markup output:
<p class="new-container">
<!-- top.search -->
</p>
Actual markup output:
<p class="new-container"></p>
<!-- top.search -->
<p></p>
Notes
- This is on merchant_beta 8 on both our custom theme and Luma.
- This bug does not occur with some of the other allowed elements I've tested, including
divandul. The block is nested in the new container as expected. - The docs specify
Any valid HTML 5 tagcan be used forhtmlTag, though this is not the case currently. This mismatch is partly covered in issue Cant set HtmlTag to "nav" #2549. M2 provides the error:Html tag "aside" is forbidden for usage in containers. Consider to use one of the allowed: dd, div, dl, fieldset, main, header, footer, ol, p, section, table, tfoot, ul.
Metadata
Metadata
Assignees
Labels
No labels