This topic is intended for administrators and developers with administration access rights in Episerver.
Content in Episerver can be page and block types, folders, or media files such as images and documents. Content also can be products in a product catalog in Episerver Commerce.
Content types and properties
Page and block types contain the properties where editors enter information, such as a link to an image on a web page.
For a content type, you define a set of properties that can hold information such as a link to an image or to a web page, or an editorial text. A typical website has a set of content types that match the identified functions needed on that website.
The content type is the base or blueprint from which you create one or many page or block instances. To display content to visitors, the page or block type and its properties need to be mapped to corresponding rendering.
The content concept in Episerver is based on inheritance from a “generic” content type, which is then used to create specific content types, such as a page type or a media folder. Using this feature, developers can create custom content types easily when setting up new websites.
You can define page types either in code or from the admin view. On the other hand, you can define clock types only in code. For page types defined in code and for all block types, you can define “non-breaking changes” of properties in admin view.
You are notified if you cannot change the settings defined in code in admin view. If you make changes to a page type defined in code, you can reset the changes to the original values defined in code.
Be careful when you alter page type settings because changes may cause the website to stop working. Although you can create page types in admin view, you should create them from code.
To edit settings for an existing page type, open the page type on the Page Type tab, click Settings, change the settings, and click Save.
Because you can identify page types and their properties either in code or from the admin view, you can change some settings from admin view. If a page type is created from code, this is shown on the page type information page under General.
You cannot delete certain page types defined in code. These are typically page types upon which other page types are based, such as the standard or default page and the start page.
Create a page type from the admin view as follows:
- On the Page Type tab, select Create New Page Type.
- Under the Information tab, enter the following information:
- Web Form template path. Enter a path to the aspx page template file to be used to display the content of the page.
- Web form template. Select a specific Web Forms template that the page type is associated with. If your developer created several templates using type classes, these appear in the list.
- MVC template. Select a specific MVC template with which the page type is associated. If your developer created several templates using type classes, they appear in the list.
- Click the Create check box to clear the access level setting for Everyone.
- Click Add users/Groups and select the relevant users or groups. Click OK when done.
- Make sure that the Create check box is selected for the desired users and groups and click Save.
- Click Save, or Revert to Default if you want to restore your settings.
- Go to the Default Values tab. You can set default values for some of the built-in properties in Episerver CMS from admin view. You also can specify default values for the properties from code, but these are not visible in the admin view.
- Change the following properties default values then click Save, (or Revert to Default if you want to restore your settings.)
- Go to the Available Page Types tab. When creating new pages, you should limit the available page types in the page type list, to make it easier for editors to chose the correct page type. For example, for a News List parent page, you can specify that the only available page type is News Item.
- Define the desired page type by selecting any of the following options:
- Click Save, or Revert to Default if you want to restore your settings.
|Name||Enter the name of the page type here.|
|Enter the name that will be displayed in the list of available page types.|
|The text describing the page type, will be displayed in the list of available page types.|
|Determines the sorting (ascending sort order) in the list of available page types in edit view; default is 100.|
Available in edit view
|This option makes the page type available for selection when creating new pages in the editorial interface. You should hide page types that are rarely used by editors, for instance the start page type. You can make these available when needed, and then hide them again.|
Select one of the following templates to be used for the page type:
Select to use registered page templates for displaying content. The registered page templates are available for selection in the drop-down list. A page type then can be associated with predefined page templates to display the same content using different channels.
Displays information about the GUID, class name and assembly name for the page type.
Determines the users and user groups for which the page type is available when creating new pages. The default setting is Everyone, meaning that it will be available to all users and groups. Do the following to limit access rights for a page type:
|Start Publish Date||Select the Use adjusted default settings... and the value in time when the system should publish the page after it has been created. Mostly used for news pages that are available on the website for a short time.|
|Stop Publish Date||Select the Use adjusted default settings... and the value in time when the system should stop the page from being published. Mostly used for news pages that are available on the website for a short time.|
|Display in navigation||
Select this option if the page type, for example, a news item page that should never be displayed in menus for navigation. This is done by clearing the Display in navigation property, which is then the default value for this page type.
Select how you want the pages to be sorted, according to creation date or other.
|Archive to||Browse the path to where you want the pages archived. Then, you can run a scheduled job to clean up archived pages as described in Scheduled jobs.|
|Target frame||Select if the page should be opened in a new window or in the same window.|
|Use Default Settings||Select to revert to default settings as defined in code for this page type.|
|All||You can create pages based on all page types available in edit view.|
|None||You cannot create child pages for this page type.|
|Selected||Manually select the page types that should be available.|
When you copy a page type, all of its properties are also copied. You can then edit the information for the page type and its properties.
Copy a page type as follows:
- Select Copy Page Type in the Page Type tab in admin view.
- Select the page type that you want to copy from the drop-down list and click Copy. A window appears containing the exact same properties.
- Edit the page type information to suit your requirements and click Save.
Block types are similar to page types, and you can modify some settings from admin view.
Edit the settings for an existing block type as follows:
- Select the block type on the Block Type tab and click Settings.
- Change one or several of the settings as described for Creating a page type from admin view.
- Click Save, (or Revert to Default if you want to restore your settings).
Other content types
By default, there are generic content types for other types of content such as folders and media files. Based on these, developers can create specific content types. You can have a specific folder or media file content type, where you can add properties such as Copyright or Photographer.