Open devenliu opened 1 year ago
<style at="Head"> block defined in Shape is not rendered
<style at="Head">
Steps to reproduce the behavior:
MyShape.cshtml
<div class="myshape">MyShape Html</div> <style at="Head"> .myshape { color: red; font-size: 18px; } </style>
Layout.cshtml
<!DOCTYPE html> <html lang="@Orchard.CultureName()"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>@RenderTitleSegments(Site.SiteName, "before")</title> <link type="image/x-icon" rel="shortcut icon" href="~/TheTheme/favicon.ico"> <script asp-name="bootstrap" version="5" at="Foot"></script> <style asp-name="thetheme-bootstrap-oc" version="1"></style> <style asp-name="font-awesome" version="6"></style> <resources type="Meta" /> <resources type="HeadLink" /> <resources type="Stylesheet" /> <resources type="HeadScript" /> @await RenderSectionAsync("HeadMeta", required: false) </head> <body dir="@Orchard.CultureDir()"> <nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top"> <div class="container"> <shape type="Branding" /> <button type="button" class="navbar-toggler" data-bs-toggle="collapse" data-bs-target="#navbar" aria-expanded="false" aria-controls="navbar" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div class="collapse navbar-collapse" id="navbar"> <menu alias="alias:main-menu" cache-id="main-menu" cache-fixed-duration="00:05:00" cache-tag="alias:main-menu" /> <shape type="LoginMenu" /> </div> </div> </nav> @await RenderSectionAsync("Header", required: false) <main class="container"> @await RenderSectionAsync("Messages", required: false) @await RenderBodyAsync() </main> @if (IsSectionDefined("Footer")) { <footer> <div class="container"> @await RenderSectionAsync("Footer", required: false) </div> </footer> } <!-- This --> <shape Type="MyShape" /> <resources type="FootScript" /> </body> </html>
The
Describe the bug
<style at="Head">
block defined in Shape is not renderedTo Reproduce
Steps to reproduce the behavior:
MyShape.cshtml
<style at="Head">
MyShape.cshtml
Layout.cshtml
Expected behavior
The