How to Create a Page Template

  1. Select Add new item in the solution explorer context menu.
  2. Select the EPiServer node.
  3. Select the Page Template item and enter a name for the new template.
  4. Click OK.
  5. A confirmation box will prompt you whether to create a new EPiServer CMS Page Type for the new page template or not
  6. Add a ASP.Net content control that is associated with the ContentPlacementHolder included in the master page. The content in this control will replace content defined in the master page.

Please Note - If you choose to add a corresponding page type, you will be prompted with a new dialog asking for some more information about the page type.  After completing this, the files will be created and a new entry will be added to the page type table contained in the database. If you select not to add a page type, the page template files will simply be created.

Checklist:

  • The files will be created (for example: foo.aspx, foo.aspx.cs, foo.aspx.designer.cs). The generated files should have the correct filename*      
  • The type defined in the code behind file should have a name based on the provided filename and be placed in the default namespace for the  current project location.
  • The type declared in the code behind file should derive from EPiServer.TemplatePage.

 

FeedBackbutton image
EPiTrace logger