-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
Needs: DesignThis issue requires design work before implementating.This issue requires design work before implementating.area-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor Components
Milestone
Description
What I'm trying to achieve is a component like this:
@inherits LayoutComponentBase
<div>
Here some html from the layout's header...
@ExtraHeader
Here will be the child body:
@Body
Now some footer...
@ExtraFooter
Some more footer...
</div>
Suppose I want to dedicate that @extraheader and @ExtraFooter to be implemented by all the children who use this layout that need to. Is this possible in Blazor right now somehow?
I know we have @Body, but that only supports nesting, not putting content in other places like MVC Sections.
You could do that too in webforms with something like this inside a MasterPage:
<asp:ContentPlaceHolder id="Header" runat="server"></asp:ContentPlaceHolder>
<asp:ContentPlaceHolder id="Body" runat="server"></asp:ContentPlaceHolder>
<asp:ContentPlaceHolder id="Footer" runat="server"></asp:ContentPlaceHolder>
Thanks!
RemiBou, RichiCoder1 and OmidID
Metadata
Metadata
Assignees
Labels
Needs: DesignThis issue requires design work before implementating.This issue requires design work before implementating.area-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor Components