Home
Releases
Discussions
Issue Tracker
Source Code
Stats
People
License
RSS RSS Feed
Search Wiki:
N2 is a lightweight CMS framework that helps you build great web sites that anyone can update. Web content editors can enjoy a simple and enpowering web interface. Developers will benefit from a programmer friendly API that makes building web sites quick and fun. Project home page and more information at n2cms.com.

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.

[Definition]
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" />

Friendly 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)
		DoSomethingWith(item);
}

Easy to use 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.

EditInterface.gif
Last edited Jul 23 at 5:51 PM  by libardo, version 12
Comments
Also available: 3 reviews for current release.

libardo wrote  Dec 10 2006 at 2:50 PM  
Hi Zack, you can download the code from here: http://n2.libardo.com/upload/releases/demo.n2.libardo.com.zip

mbasgun wrote  May 15 2007 at 2:27 PM  
Seems to be an awesome and clean work... Is there anybody who has developed an enterprise level CMS application using this code? How is the performance issue? Are there any showcase type of URLs? Thanks. Mustafa Basgun - Atlanta, GA.

libardo wrote  May 15 2007 at 10:23 PM  
Mustafa, I havn't seen any enterprise level implementations. Performance should be ok for most situations. Let me know if you've experienced any issues. There's a demo site available through n2cms.com. Regards, Cristian - Stockholm, Sweden

mbasgun wrote  May 16 2007 at 11:29 AM  
Hi Cristian. Thanks for the demo site address. I am planning to spend some detailed time on experimenting N2 and its modules within the couple of weeks or so. Stronger XML handling and more AJAX implementation especially for the Content Edit modules may be the topics that I would invest on. I'll keep you updated when I get my hands dirty. Thanks again. Mustafa Basgun - Atlanta, GA.

poison wrote  May 21 2007 at 1:05 PM  
I donlowaded N2 1.1.10 Site Example, open it in VS2005, build it and got this error:
"The type or namespace name 'N2' could not be found (are you missing a using directive or an assembly reference?)"

libardo wrote  May 22 2007 at 7:51 PM  
poison: Try updating reference path to the Dependencies folder included in the zip file (project properties, reference paths, folder ..., find folder dependencies, ok, add folder). /Cristian

hossein wrote  Jun 4 2007 at 2:52 PM  
I need to install this CMS in my .net area but I do'nt know method of installation .
I could install Database file in my SQLServer (2005) but I can't install the web site folder.
anybody can tell me how can I do it please asap.
Thanks.

libardo wrote  Jun 4 2007 at 5:29 PM  
If you're using sql 2005 (not express) you can create a database and configure the connection string in web.config. Then you should be able to create tables through the interface at /edit/install

libardo wrote  Sep 26 2007 at 6:31 AM  
The code is in the templates folder if you download the source code.

cwillyg wrote  Oct 2 2007 at 4:11 PM  
thanks for this project - love the fact that it doesn't take over the rest of your web application like many other CMS implementations.

I was hoping to split the /edit directory off on to another server, is this possible?

libardo wrote  Oct 3 2007 at 3:05 PM  
It should work. The folder is only needed when editing. You may want to look into the cache invalidation. N2 stores a list of url mappings internally that may need to be updated somehow.

bg01au wrote  Oct 10 2007 at 5:23 AM  
I tried the demo site and on n2cms.com, I love this N2 because I think it has all what I just needed. Simple to use. Many thanks for development this CMS.

But help! I downloaded the source of N2 version 1.3. Unzip and create a new website pointing to /sources/N2DevelopmentWeb path. When I open this website, I am getting an error message: Server Error in '/' Application. Parser Error Message: Could not load type 'N2.TemplateWeb.Global'. Line 1: <%@ Application Codebehind="Global.asax.cs" Inherits="N2.TemplateWeb.Global" Language="C#" %>

Can someone helps.....Thanks heaps

Updating...