mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 12:11:10 +00:00
Adds comments.
This commit is contained in:
1 parent
4ef8570854
commit
fd64cbd6ba
13 files changed
+17
No files matched your search
@@ -8,6 +8,7 @@
|
||||
@inject ThemeLayoutRenderer _themeLayoutRenderer
|
||||
|
||||
@{
|
||||
// capture the page body and its scripts, so the themed shell can wrap them instead of rendering them directly
|
||||
string bodyHtml;
|
||||
using (StringWriter bodyWriter = new())
|
||||
{
|
||||
@@ -19,6 +20,7 @@
|
||||
string scriptsHtml;
|
||||
using (StringWriter scriptsWriter = new())
|
||||
{
|
||||
// RenderSectionAsync writes to ViewContext.Writer, so swap it to capture the section content
|
||||
TextWriter originalWriter = ViewContext.Writer;
|
||||
ViewContext.Writer = scriptsWriter;
|
||||
await RenderSectionAsync("Scripts", required: false);
|
||||
|
||||
Reference in new issue
Block a user