Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current Restore this Version View Page History

« Previous Version 3 Next »

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.

Project home page and more information at n2cms.com

"It's so .NET!"

Unlike most CMS'es 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.

[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.

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.

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.png