NuGet package | Owin.Framework.Pages.Html |
GitHub source | OwinFramework.Pages.Html |
Attach the [ZoneComponent] attribute to elements that contain multiple content areas (zones) to place a component within the specified zone.
The [ZoneComponent] attribute can be used on a layout to define the default content of a zone within the layout. It can also be used on a region or page that contains a layout to overide the layout and change the content of the zone for this instance of the layout.
Example usage:
[IsLayout("interfaceLandingPage_Header", "title,detail")] [ZoneTemplate("detail", "/data/interfacedefinition")] internal class LandingPageHeaderLayout : DocumentHeadLayout { } [IsLayout("areaLandingPage_Header", "title,detail")] [ZoneTemplate("detail", "/data/area")] internal class LandingPageHeaderLayout : DocumentHeadLayout { } [ZoneRegion("title", "documentHead_Title")] [ZoneRegion("detail", "documentHead_Detail")] [ZoneComponent("title", "text:verticalText")] [Container("div", "{ns}_document_head_layout")] internal class DocumentHeadLayout : ContentElement { }
The [ZoneComponent()] attribute has the following properties you can set.
This is the name of the zone within a layout where the component should be rendered.
This is the name of the component to render into this zone of the layout. If the component is in a different package then the component name must be qualified with the package namespace as a prefix separated by a colon.