PageTypeAttribute Class

Members  Example 

Used to decorate classes that inherit from CmsPage in order to declare pagetypes. This attribute is required in order for the system to find which pagetypes that is available.

Syntax

'Declaration
 
<AttributeUsageAttribute(ValidOn=AttributeTargets.Class, 
   AllowMultiple=False, 
   Inherited=True)>
Public NotInheritable Class PageTypeAttribute 
   Inherits System.Attribute
[AttributeUsage(ValidOn=AttributeTargets.Class, 
   AllowMultiple=false, 
   Inherited=true)]
public sealed class PageTypeAttribute : System.Attribute 

Remarks

Please note that once a page type is created the name parameter of the PageType attribute should never be changed. This name is used internally to identify the page type.

Example

An example on how to define a page type by using this attribute.
namespace DemoSite.Templates.Pagetypes {
    using KalikoCMS.Attributes;
    using KalikoCMS.Core;

    [PageType("ArticlePage", "Article page", "~/Templates/Pages/ArticlePage.aspx", PageTypeDescription = "Used for articles")]
    public class ArticlePageType : CmsPage {
        // Property definitions would then go here...
    }
}

Inheritance Hierarchy

System.Object
   System.Attribute
      KalikoCMS.Attributes.PageTypeAttribute

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

This documentation was created using Document! X from Innovasys