@* Omitted code.. *@ @RenderBody() @RenderSection("Sidebar", required: false)
Is there a way to find out in the Omitted code part if there is a RenderSection Sidebar ?
Omitted code
Sidebar
@if (IsSectionDefined("Sidebar")) { @RenderSection("Sidebar") } else { <div>Some default content</div> }
may be:
@RenderSection("Sidebar", required: false)