Interfaces

Project

Pages Html

NuGet packageOwin.Framework.Pages.Html
GitHub sourceOwinFramework.Pages.Html

Home |  Readme

[ZoneComponent] attribute | The OWIN Framework Pages

The [ZoneComponent] Attribute

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.

ZoneName

This is the name of the zone within a layout where the component should be rendered.

ComponentName

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.