Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

ContentItem Editor Hierarchy

Figure 1. Editors are exposed via attributes on the properties defined in ContentItems.

Creating the View

The ContentItem tells N2 everything about the data that needs to be stored for a given item in N2's database. However, it does not define how the ContentItem will look when N2 generates a HTML page. We will cover Creating the View in a later chapter; the actual implementation of the view will differ depending upon the view framework we're using (either MVC or WebForms). However, the content model (ContentItem) remains the same. 

...

 

  • Since TextPage inherits from N2.ContentItem (in this case a bit down the inheritance chain) it is treated by the N2 engine as a content type and made available for editing through the edit interface.
  • Take a quick look at that Text property before you move on. It has an interesting attribute that's used by the N2 engine to determine what kind of editor should be used to edit that property.

...