Concepts > Webpages

Webpages are the fundamental building blocks of your MrCMS application

The base class Webpage is an abstract class that can be extended to allow additional data to be stored against it, in order to display (e.g. a news article may have an addition abstract or teaser field to allow for a summary to be written to show elsewhere within the site or on an RSS feed)

Subclasses of Webpage are automapped as much as they can be by MrCMS's use of the FluentNHibernate automapper, with a couple of our own specific conventions for caching, naming etc. If for whatever reason you want to change the automappings, you can lean on FluentNHibernate's IAutoMappingOverride<T> to do anything else you need to like adjusting string field lengths.

In our core app, the simplest implementation is the TextPage, which takes the core functionality, and gives it an additional FeaturedImage property:
namespace MrCMS.Web.Apps.Core.Pages
    public class TextPage : Webpage
        [DisplayName("Featured Image")]
        public virtual string FeatureImage { get; set; }

Last edited Nov 14, 2014 at 3:30 PM by gmstr, version 4


No comments yet.