Create pages

A standard Sitefinity CMS page consists of PageNode and PageData. PageNode defines where the page is located in the navigation (the sitemap). The PageData is the content of the page. You can have a PageNode without PageData. For example, a group page or a redirecting page. You cannot create PageData without a PageNodePageData is subject to content lifecycle and workflow.

When you use the native API, you manage pages with the PageManager. You define the type of the page you are creating in the CreatePage method of the PageManager class. Its NodeType property is an enumeration that lists the types of pages nodes:

  • Standard
    A normal page displaying content
  • Group
    A page without content. Redirects to the first child page or a child page with the same name
  • External
    An external page from the file system
  • InnerRedirect
    A redirect to a page inside Sitefinity
  • OuterRedirect
    A redirect to a page from the web
  • Rewriting
    A rewriting to a page inside Sitefinity

When you create a page, you can put the code in any .cs file.

EXAMPLE: Open your project in Visual Studio and in the context menu of SitefinityWebApp, click Add » New Item..., you can use the code in one of the following:

  • Web Form
    Creates an .aspx, an .aspx.cs, and an .aspx.designer.cs. Put the code in the .aspx.cs file.
  • Web Form User Control
    Creates an .aspx, an .aspx.cs, and an .aspx.designer.cs. Put the code in the .aspx.cs file.
  • Class
    Cretas a .cs file where you can put the code.

Was this article helpful?

Next article

Query pages