Versions Compared

Key

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

N2 is a lightweight CMS framework. With just a few strokes of your keyboard a wonderful strongly typed model emerges complete with a management UI. You can spend the rest of your day building the best site imaginable.

It's so .NET!  With N2CMS, you build the model of the data that needs to be managed using C# or VB code in Visual Studio. The type below is picked up by the N2 engine at runtime and made available to be edited. The code uses an open API with multiple built-in options and unlimited customization options.

All you have to do is design your model class (inherit N2.ContentItem) and define which properties are editable by adding attributes

Code Block
languagec#
[PageDefinition(TemplateUrl = "~/my/pageitemtemplate.aspx")]
public class PageItem : N2.ContentItem
{
	[EditableFreeTextArea]
	public virtual string Text { get; set; }
}

"I never thought getting the data out again could be so easy"

N2 CMS knows not to mess with YOUR HTML. For web-forms it provides a nice data binding controls, and for ASP.NET MVC routes to your controller and provides easy access to data.

Code Block
Binds a control to the current page's text property: 
<asp:Literal Text="<%$ CurrentItem: Text %>" runat="server" />

Provides create, read, update, delete access to content through ASP.NET the databinding API:
<n2:ItemDataSource ID="Level1Items" runat="server" Path="/" />
<asp:DataGrid DataSourceID="Level1Items" runat="server" />

Renders non-page items added to the "RightColumn" zone:
<n2:Zone ZoneName="RightColumn" runat="server" />

Outputs content using the default control (a literal in this case):
<n2:Display PropertyName="Text" runat="server" />

"This API is my friend"

N2 CMS not only makes the content manageable by non-techies, it also makes it easy to find and do stuff with content programmatically.

Code Block
languagecsharp
public void DoSomeStuffWithSomeItems(DateTime minDate, DateTime maxDate)
{
	IList<ContentItem> items = N2.Find.Items
		.Where.Created.Between(minDate, maxDate)
		.And.SavedBy.Eq("admin")
		.OrderBy.Published.Desc
		.Select();

	foreach (ContentItem item in items)
		DoSomethingWith(item);
}

 

"I just know what to do with this"

N2 is bundled with a usable editor interface that allows (among other things) editing, organization, moving, exporting and importing of content. Virtually no administration or configuration is required. To further simplify usage you can create plug ins.
user_friendly_interface_2_0.pngImage RemovedSee also: Editors via Attributes