N2 is a CMS engine for ASP.NET designed to change the way you do content mangement. Project home page and more information at
n2cms.com. The major benefits:
Declarative definition of content types
The code snipped shows all you need to define an editable page with a WYSIWYG text editor. The type is picked up by the N2 engine at runtime and made available to editors. There are quite a few extension points for all those advanced scenarios, e.g. extension of the content model using inheritance, constraints, user defined editors and replacements of core services.
[N2.Item("Default page")]
public class PageItem : N2.ContentItem
{
[EditableFreeTextArea("Text", 100)]
public virtual string Text
{
get { return (string)GetDetail("Text"); }
set { SetDetail("Text", value); }
}
}
Templates and data binding utilities
N2 allows great freedom when it comes to the end user interface (the HTML) and provides some nice data binding utilities.
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" />
An intuitive API
N2 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)
item["MyCustomField"] = "you've been touched!";
}
A simple editor interface
N2 is bundled with a simple 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.