<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8739545492840900752</id><updated>2011-11-01T22:36:46.438Z</updated><title type='text'>N2CMS Tutorial</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://n2cmstutorial.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8739545492840900752/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://n2cmstutorial.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>N2CMS Tutorials</name><uri>http://www.blogger.com/profile/13799442310914050693</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>18</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8739545492840900752.post-5156193280106233014</id><published>2011-07-13T17:08:00.000+01:00</published><updated>2011-07-13T17:08:47.079+01:00</updated><title type='text'>How to make the N2 CMS free text area a bit more "WYSIWYG"</title><content type='html'>One of my clients recently noted that it would be much nicer if when he's editing the content of his website that the free text areas look like they do when he clicks on the "Save and publish" button. In other words, he wants the editor to be more "WYSIWYG" and show the real colours, fonts, font sizes etc when he's editing.&lt;br /&gt;&lt;br /&gt;It's actually a simple fix to make. Open your web.config &amp;nbsp;and look in the &amp;lt;n2&amp;gt; tag for the &amp;lt;edit&amp;gt; tag. You just need to add one line in there and away you go. I've highlighted it below:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;edit&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;!-- Set checkInstallationStatus to false to disable redirect to install page --&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;lt;installer checkInstallationStatus="true" /&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;lt;writers dynamic="true"/&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;lt;editors dynamic="true"/&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;lt;administrators dynamic="true"/&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;b&gt;&amp;lt;tinyMCE cssUrl="/Content/Css/N2Edit.css" enabled="true" /&amp;gt;&lt;/b&gt;&lt;br /&gt;&amp;lt;/edit&amp;gt;&lt;br /&gt;&lt;br /&gt;Now you just need to add the styles you like to the N2Edit.css file and you can customise the editor so that what you edit is what you see.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8739545492840900752-5156193280106233014?l=n2cmstutorial.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://n2cmstutorial.blogspot.com/feeds/5156193280106233014/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://n2cmstutorial.blogspot.com/2011/07/how-to-make-n2-cms-free-text-area-bit.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8739545492840900752/posts/default/5156193280106233014'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8739545492840900752/posts/default/5156193280106233014'/><link rel='alternate' type='text/html' href='http://n2cmstutorial.blogspot.com/2011/07/how-to-make-n2-cms-free-text-area-bit.html' title='How to make the N2 CMS free text area a bit more &quot;WYSIWYG&quot;'/><author><name>N2CMS Tutorials</name><uri>http://www.blogger.com/profile/13799442310914050693</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8739545492840900752.post-8104361754023729453</id><published>2011-01-29T17:25:00.000Z</published><updated>2011-01-29T17:25:30.045Z</updated><title type='text'>Importing data into N2</title><content type='html'>One of the projects I'm working on at the moment is for a local community website. The old site has a message forum and we want to migrate the content into N2 preserving as much of the data as we can.&lt;br /&gt;&lt;br /&gt;It is quite easy to do with N2 in that you can create a class of any page, populate it and save it.&lt;br /&gt;&lt;br /&gt;Here's an example from the code which imports the actual messages on the message board - it's not the best, but it works and demonstrates the principle.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;N2.Templates.Mvc.Models.Pages.MessagePage mp = new Models.Pages.MessagePage();&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mp.Created = reader.GetDateTime(reader.GetOrdinal("datePosted"));&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mp.Parent = parent;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mp.Author = reader.GetString(reader.GetOrdinal("MessageAuthor"));&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mp.Text = reader.GetString(reader.GetOrdinal("MessageText"));&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mp.Title = string.Format("Reply by {0}-{1}", reader.GetString(reader.GetOrdinal("Username")), ForumHelper.GetDateAsNumbers(mp.Created));&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;N2.Context.Persister.Save(mp);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;N2.Context.Persister.Save(parent);&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;There's a couple of things to note. The title must be unique in N2 so I have got around this by creating the title as normal, but adding the date of when it was created onto the end. You must also specify the parent page too and save it after you have created the message to create the relationship between them.&lt;br /&gt;&lt;br /&gt;What I am impressed with is that I can take an existing message board and import all the forums, topics and messages and do so really easily with N2. I have also imported all the user account information, profiles etc as well and we're hoping to get the new site live within a month. I'll let you know how we go on!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8739545492840900752-8104361754023729453?l=n2cmstutorial.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://n2cmstutorial.blogspot.com/feeds/8104361754023729453/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://n2cmstutorial.blogspot.com/2011/01/importing-data-into-n2.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8739545492840900752/posts/default/8104361754023729453'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8739545492840900752/posts/default/8104361754023729453'/><link rel='alternate' type='text/html' href='http://n2cmstutorial.blogspot.com/2011/01/importing-data-into-n2.html' title='Importing data into N2'/><author><name>N2CMS Tutorials</name><uri>http://www.blogger.com/profile/13799442310914050693</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8739545492840900752.post-5126519352085869987</id><published>2011-01-18T21:18:00.000Z</published><updated>2011-01-18T21:18:34.881Z</updated><title type='text'>Exceptioneer - superb and a doddle to integrate into N2</title><content type='html'>One of the lads at work pointed me in the direction of &lt;a href="http://www.exceptioneer.com/"&gt;Exceptioneer&lt;/a&gt;&amp;nbsp;which quite honestly is fantastic.&lt;br /&gt;&lt;br /&gt;Although Elmah which comes with N2 is simple to use and is very helpful in tracking bugs, if you get an exception on one of your N2 sites which is "buried down" under a load of code it's not easy to find. Exceptioneer gives you information on the current username, stack trace, where it was called from on the front end etc. There's simply so much information it collects for you that it would be hard to do a screenshot.&lt;br /&gt;&lt;br /&gt;Another big bonus is that it also tracks your javascript errors! I can't recommend this enough and this will definitely be a part of all N2 work I do from now on... not that I write code with loads of exceptions in it of course! :)&lt;br /&gt;&lt;br /&gt;Finally, if all that wasn't good enough... Exceptioneer has a free account which can log up to 2000 exceptions a month.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8739545492840900752-5126519352085869987?l=n2cmstutorial.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://n2cmstutorial.blogspot.com/feeds/5126519352085869987/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://n2cmstutorial.blogspot.com/2011/01/exceptioneer-superb-and-doddle-to.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8739545492840900752/posts/default/5126519352085869987'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8739545492840900752/posts/default/5126519352085869987'/><link rel='alternate' type='text/html' href='http://n2cmstutorial.blogspot.com/2011/01/exceptioneer-superb-and-doddle-to.html' title='Exceptioneer - superb and a doddle to integrate into N2'/><author><name>N2CMS Tutorials</name><uri>http://www.blogger.com/profile/13799442310914050693</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8739545492840900752.post-7597988988460607956</id><published>2011-01-18T21:11:00.000Z</published><updated>2011-01-18T21:11:51.834Z</updated><title type='text'>Not strictly N2, but a couple of fantastic tools</title><content type='html'>I'm currently working on a project of my own to convert an existing local community site into a full-on N2 site. The main part has involved migrating the message forum, news gathering service and other migration coding.&lt;br /&gt;&lt;br /&gt;I'm wanting to post the news regularly to Twitter and, once it's up and running, Facebook. I've found this library as a superb, simple way to post to Twitter now they are using oAuth which is more complicated than their old authentication method. Check this out:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.diplo.co.uk/blog/2010/8/9/oauth-with-twitter.aspx"&gt;www.diplo.co.uk/blog/2010/8/9/oauth-with-twitter.aspx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8739545492840900752-7597988988460607956?l=n2cmstutorial.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://n2cmstutorial.blogspot.com/feeds/7597988988460607956/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://n2cmstutorial.blogspot.com/2011/01/not-strictly-n2-but-couple-of-fantastic.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8739545492840900752/posts/default/7597988988460607956'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8739545492840900752/posts/default/7597988988460607956'/><link rel='alternate' type='text/html' href='http://n2cmstutorial.blogspot.com/2011/01/not-strictly-n2-but-couple-of-fantastic.html' title='Not strictly N2, but a couple of fantastic tools'/><author><name>N2CMS Tutorials</name><uri>http://www.blogger.com/profile/13799442310914050693</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8739545492840900752.post-6754338616591198091</id><published>2010-12-12T12:11:00.000Z</published><updated>2010-12-12T12:11:02.826Z</updated><title type='text'>N2CMS MVC and how to create a configurable MasterPage option</title><content type='html'>One of the most common questions on the N2CMS forums seems to be how to make it possible to be able to select a master page.&amp;nbsp;In the past when I've worked on cms driven sites the templates have been relatively straightforward - the homepage has had a unique design whilst the others have had a set template. This was quite easy to do as I just created my own class which derived from the StartPage class and then created it's own HTML without using the main MasterPage. Simple, but effective.&lt;br /&gt;&lt;br /&gt;However, recently I've been asked to convert an existing Sharepoint site to the MVC version of N2. This has been quite interesting to do and one of the areas I've had to work on is how to give the user the option of which master page template to use. I can't do this statically and because there are a number of templates on the current Sharepoint site it's possible that users may need to change page templates "on the fly".&lt;br /&gt;&lt;br /&gt;I'm not going to go to deep in to the workings of this - it's probably easier to fire up N2 MVC and step through the code. I'm going to give you a step-by-step tutorial to get it working!&lt;br /&gt;&lt;br /&gt;I'd like to thank the guys on this discussion on the N2CMS forum (n2cms.codeplex.com/discussions?size=2147483647) for providing the inspiration for this. I can't find the exact post however.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 1:&lt;/b&gt;&lt;br /&gt;Make sure you download the latest v2.1rc MVC version of the site and make sure you copy the DLLs in the library folder into the bin folder of the N2CMS folder. If you don't do this with then you might get an error when you first try to start the site.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 2:&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;In the services folder, open the&amp;nbsp;ThemedMasterViewEngine.cs file. In that there's a method which tries to determine which Master page to use based on theme or uses the&amp;nbsp;&amp;nbsp;there's a class which checks to see what master page to use.&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;public class ThemedMasterViewEngine : WebFormViewEngine&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// You should change the "TwoColumnLayout.master" to be your default template&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;string masterPageFile = "~/Views/Shared/TwoColumnLayout.master";&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;public override ViewEngineResult FindView(ControllerContext controllerContext, string viewName, string masterName, bool useCache)&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;{&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;if (!controllerContext.IsChildAction)&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;{&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;if (string.IsNullOrEmpty(masterName))&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;     &lt;/span&gt;masterName = masterPageFile;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;var root = Find.Closest&amp;lt;StartPage&amp;gt;(controllerContext.RouteData.CurrentPage()) ?? Find.ClosestStartPage;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;if (root != null)&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;{&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;     &lt;/span&gt;string theme = root.Theme;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;     &lt;/span&gt;if (!string.IsNullOrEmpty(theme))&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;     &lt;/span&gt;{&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;      &lt;/span&gt;string potentialMaster = string.Format("~/Views/Shared/{0}.master", theme);&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;      &lt;/span&gt;if (base.FileExists(controllerContext, potentialMaster))&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;      &lt;/span&gt;{&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;       &lt;/span&gt;masterName = potentialMaster;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;      &lt;/span&gt;}&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;     &lt;/span&gt;}&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;}&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;return base.FindView(controllerContext, viewName, masterName, useCache);&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;}&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;}&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step 3:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;In the models/pages folder there's a ContentPageBase.cs class. We're going to change this to add an enum for the name of the page templates and add a property for any page which derives from the ContentPageBase (which is all of them) which allows you to select a template and puts it under the Advanced tab.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Open /Models/Pages/ContentPageBaseup and add this code:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public enum PageTemplates&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MyHomePage,&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;TwoColumnLayout&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[EditableEnum("Page layout", 60, typeof(PageTemplates), ContainerName = Tabs.Advanced)]&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public virtual PageTemplates PageLayout&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;get { return (PageTemplates)(GetDetail("PageLayout") ?? PageTemplates.TwoColumnLayout); }&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;set&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SetDetail("PageLayout", value, PageTemplates.TwoColumnLayout);&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step 4:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;In the controllers folder, open up the TemplatesControllerBase.cs file. We're going to add some code in here which tries to get the name of the PageLayout from the page and sets the master page. Find the method below (be careful - there's a few overloads of it) and replace the method with this code:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;protected override ViewResult View(string viewName, string masterName, object model)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;CheckForPageRender(model);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;model = model ?? CurrentItem;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (model != null)&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var item = model as N2.Templates.Mvc.Models.Pages.ContentPageBase;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (!string.IsNullOrEmpty(item.PageLayout.ToString()))&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;masterName = item.PageLayout.ToString();&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;return base.View(viewName, masterName, model ?? CurrentItem);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step 5:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;I think this might be an oversight in the n2 release, but I've found I have to add this line into the web.config in the n2 editing folder:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;lt;httpRuntime requestValidationMode="2.0" /&amp;gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Otherwise I get an error when I try to change the page layout.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step 6:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;If you start up your site, and select "Edit" on any page you will find that under the "Advanced" tab you have a drop down list of layouts. If you change this you will be able to change the master page used on the site!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8739545492840900752-6754338616591198091?l=n2cmstutorial.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://n2cmstutorial.blogspot.com/feeds/6754338616591198091/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://n2cmstutorial.blogspot.com/2010/12/n2cms-mvc-and-how-to-create.html#comment-form' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8739545492840900752/posts/default/6754338616591198091'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8739545492840900752/posts/default/6754338616591198091'/><link rel='alternate' type='text/html' href='http://n2cmstutorial.blogspot.com/2010/12/n2cms-mvc-and-how-to-create.html' title='N2CMS MVC and how to create a configurable MasterPage option'/><author><name>N2CMS Tutorials</name><uri>http://www.blogger.com/profile/13799442310914050693</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8739545492840900752.post-6908444770329236025</id><published>2010-12-03T17:38:00.000Z</published><updated>2010-12-03T17:38:29.789Z</updated><title type='text'>New version of N2CMS released</title><content type='html'>I don't know if you've seen on&amp;nbsp;&lt;a href="http://n2cms.codeplex.com/releases"&gt;http://n2cms.codeplex.com/releases&lt;/a&gt;&amp;nbsp;but v2.1rc has been released. I'd strongly recommend anyone to sign up for the release notifications on Codeplex for the code as this way you will get the latest versions as soon as they come out. On the page for the releases if you look on the right you'll see the button to set notification settings.&lt;br /&gt;&lt;br /&gt;As you know, I've been doing tutorials for the web forms version of N2. If you read my earlier posts you'll have read that for beginners I'd recommended the web forms version to get started with because of the better templates that came with it - it was simply easier/quicker to create pages and items. This looks like it has changed with the new release and I am currently investigating the new changes so that I'll be able to comment on the web forms vs MVC projects.&lt;br /&gt;&lt;br /&gt;Another reason to download the new version is that it now ships with documentation! Now, I've read the documentation and it's still not perfect nor complete but it's far better than the array of wikis, pages and dead pages that are on the web. So, if nothing else you have a much better starting point for v2.1 than you did with the earlier versions.&lt;br /&gt;&lt;br /&gt;All that said, I still aim to continue writing on this blog. There's some new features in the new version which look very interesting such as templates. This will allow you to create templates of pages and subpages with pre-populated content. Very useful.&lt;br /&gt;&lt;br /&gt;I think however, my focus will broaden somewhat to include my experiences of the N2 MVC. I also am intrigued by how we can extend the editor with jQuery and similar technologies.&lt;br /&gt;&lt;br /&gt;For now though, have a look at the new version!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8739545492840900752-6908444770329236025?l=n2cmstutorial.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://n2cmstutorial.blogspot.com/feeds/6908444770329236025/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://n2cmstutorial.blogspot.com/2010/12/new-version-of-n2cms-released.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8739545492840900752/posts/default/6908444770329236025'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8739545492840900752/posts/default/6908444770329236025'/><link rel='alternate' type='text/html' href='http://n2cmstutorial.blogspot.com/2010/12/new-version-of-n2cms-released.html' title='New version of N2CMS released'/><author><name>N2CMS Tutorials</name><uri>http://www.blogger.com/profile/13799442310914050693</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8739545492840900752.post-456227322153433741</id><published>2010-11-25T21:04:00.000Z</published><updated>2010-11-25T21:04:14.361Z</updated><title type='text'>Enhancing the editor</title><content type='html'>I realise I've not updated the blog for a while, so apologies for that. A mixture of work and other engagements has meant that I've not had the time to get some thoughts down for a while! &lt;br /&gt;&lt;br /&gt;One area of N2 I've had to look at in recent months are the editor pages. At first glimpse it might seem that there's not a great deal you can do with them to specialise them seeing as they are to cater for the creating and editing of every single page type in your website. I've not needed to go into the guts of how the editor works as yet, but I've found a few things that might be of interest and certainly may help you get round a few tricky areas.&lt;br /&gt;&lt;br /&gt;You will have to bear with me on this whilst I explain the background to the problem.&amp;nbsp;On one recent project, I had a simple hierarchy similar to this:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Suppliers&amp;nbsp;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;WH Smith (all our books cost £10 and our magazines £5)&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;News International&amp;nbsp;&lt;/b&gt;&lt;b&gt;(all our books cost £12 and our magazines £3)&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;b&gt;Products&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Books&lt;/b&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Call of the wild&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;The Hobbit&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Lord of the Rings&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;Magazines&lt;/b&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;FMH&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Shoot&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Radio Times&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div&gt;So each supplier has a set price list and when you create a book or a magazine you have to select a supplier and then display the "summary" of that supplier including the prices. In effect the problem we have then is to take something that is generic (the creator/editor) yet add code to handle specifics. I appreciate there is ways to do this, but I didn't really want (for time reasons primarily) to get my hands dirty in the source code of N2.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The way I did this though was to use jQuery to make Ajax calls to a web handler&amp;nbsp;(ASHX files).&amp;nbsp;&amp;nbsp;I'd written which returned XML with details of the supplier. My jQuery code detected the type of page we're creating and then hooked in the calls to update the supplier summary if the supplier changed. When I get more time, I will try to package a simple example of this to demonstrate the principle. In effect it is just &amp;nbsp;a jQuery/Ajax solution but it certainly allows the N2 editor to potentially become even more responsive and powerful.&amp;nbsp;Taken further, maybe we can add some jQuery features to the editor to check for the uniqueness of page titles, maybe even preview the page you're working as you type!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I am not saying this method is perfect at all, but in future it's certainly a technique &amp;nbsp;I'd definitely consider again.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8739545492840900752-456227322153433741?l=n2cmstutorial.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://n2cmstutorial.blogspot.com/feeds/456227322153433741/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://n2cmstutorial.blogspot.com/2010/11/enhancing-editor.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8739545492840900752/posts/default/456227322153433741'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8739545492840900752/posts/default/456227322153433741'/><link rel='alternate' type='text/html' href='http://n2cmstutorial.blogspot.com/2010/11/enhancing-editor.html' title='Enhancing the editor'/><author><name>N2CMS Tutorials</name><uri>http://www.blogger.com/profile/13799442310914050693</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8739545492840900752.post-3186771821437868907</id><published>2010-09-14T17:26:00.003+01:00</published><updated>2010-09-14T17:28:08.864+01:00</updated><title type='text'>More room for the editor labels</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;This is just a quick tip for an N2CMS MVC site that I've found literally as I'm just making a few changes to a site I'm doing at the moment so it's short and sweet!&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;One of my clients says that when they are editing a page the descriptive labels next to the textboxes, checkboxes and dropdownlists are a bit "squashed" and I have to say I agree. There's very little space given for the labels before they roll onto the next line.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Just change the /N2/Resources/Css/Edit.css file where it says:-&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;body.framed .itemEditor .editorLabel { width:110px; float:left; clear:left; padding:5px 5px 0 0; margin:0 0 5px 0; }&lt;/span&gt;&lt;/blockquote&gt;to&lt;br /&gt;&lt;blockquote&gt;body.framed .itemEditor .editorLabel { width:210px; float:left; clear:left; padding:5px 5px 0 0; margin:0 0 5px 0; }&lt;/blockquote&gt;Your labels are now twice as wide and it looks much neater. I think I will include this is all my future N2 sites.&lt;br /&gt;&lt;br /&gt;Cheers!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8739545492840900752-3186771821437868907?l=n2cmstutorial.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://n2cmstutorial.blogspot.com/feeds/3186771821437868907/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://n2cmstutorial.blogspot.com/2010/09/more-room-for-editor-labels.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8739545492840900752/posts/default/3186771821437868907'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8739545492840900752/posts/default/3186771821437868907'/><link rel='alternate' type='text/html' href='http://n2cmstutorial.blogspot.com/2010/09/more-room-for-editor-labels.html' title='More room for the editor labels'/><author><name>N2CMS Tutorials</name><uri>http://www.blogger.com/profile/13799442310914050693</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8739545492840900752.post-6791734724305002279</id><published>2010-09-03T12:50:00.000+01:00</published><updated>2010-09-03T12:50:59.950+01:00</updated><title type='text'>Hosting companies that work with N2CMS</title><content type='html'>I just thought I'd share this with you and it may be something I revisit a few times in the coming months. I've seen a few people asking on the forums about which web hosts work with N2CMS.&lt;br /&gt;&lt;br /&gt;I have a few clients where they had an existing web site that is maintained by an external company and they want a CMS site which they can maintain themselves. Usually they are likely to be non-technical users in smaller companies. As a result of this, they are generally reluctant to move hosting companies for a variety of reasons such as the cost to terminate a contract and set up a new one, previous good service and also having to do other things like changing DNS records and migrating emails.&lt;br /&gt;&lt;br /&gt;The problem I then have is that&amp;nbsp;I don't get to specify which hosting company to use, it's given to me! Obviously, I know which ones will work from previous experience.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;As a result of this, one of the first things I do is my "one hour" test. Basically if I can't download the code, deploy a "vanilla site", configure a few settings, create and edit a couple of pages within the hour I think that it will be problematic later on. I may well be able to fix all the issues if I had more time, but this is my rule of thumb.&amp;nbsp;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;I have worked with three hosting providers and one intranet so far and here's my findings.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;ukfast.co.uk&lt;/b&gt;&lt;br /&gt;I had a few issues with them that I couldn't resolve in my hour which I suspect may have been related to medium trust. Luckily the client was moving to a new hosting provider anyway so it didn't matter in the end, but if you're going to deploy an N2CMS site to ukfast, double check it first! They may have upgraded their hosting services since, but check first.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;discountasp.net&lt;/b&gt;&lt;br /&gt;I have had no problems with these at all - the only slight "gotcha" I had was that I had to make sure IIS7 to work in "integrated mode" with the N2CMS MVC project, but I suspect this was because I upgraded from IIS6 to IIS7. I used a SQL Server database server on these projects and it all worked no problem. I'd also say that when I emailed support about non-N2 matters they were very helpful and prompt which gave me confidence.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;FastHosts.co.uk&lt;/b&gt;&lt;br /&gt;I have had no problems with these at all - everything worked out of the box. The only slight issue I had (although I suspect it wasn't a FastHost issue as such) was that we had to get them to set IIS to work on ASP.NET v2 which is something I'd have expected out of the box. I suspect this could just have been because the server was a few years old, but again it's something to double check. I used a MySQL database server on two projects and had no problems at all. I had to email support a question about MySQL database and again this was answered promptly.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Intranet server running IIS6&lt;br /&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;Just make sure that the ASPNET account can write to the upload directory or similar if you plan to allow users to upload documents or images but overall, n&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;o problems here - deployed the site onto the server and it worked no problem :)&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;The databases work no problem and there's no difference from I (or the client!) can tell with regards to speed with either SQL Server or MySQL.&lt;br /&gt;&lt;br /&gt;I am sure that some of these issues may well be specific to the projects I worked on - especially as the servers had been used on older sites, but if you experience a couple of problems then it's worth just double checking that the settings are correct. If you have problems with you current host then from my own personal experience as someone who's created and deployed working N2CMS sites onto live servers, these hosts will work for you too! :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8739545492840900752-6791734724305002279?l=n2cmstutorial.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://n2cmstutorial.blogspot.com/feeds/6791734724305002279/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://n2cmstutorial.blogspot.com/2010/09/hosting-companies-that-work-with-n2cms.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8739545492840900752/posts/default/6791734724305002279'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8739545492840900752/posts/default/6791734724305002279'/><link rel='alternate' type='text/html' href='http://n2cmstutorial.blogspot.com/2010/09/hosting-companies-that-work-with-n2cms.html' title='Hosting companies that work with N2CMS'/><author><name>N2CMS Tutorials</name><uri>http://www.blogger.com/profile/13799442310914050693</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8739545492840900752.post-8200539477555496741</id><published>2010-09-02T19:08:00.000+01:00</published><updated>2010-09-02T19:08:19.976+01:00</updated><title type='text'>Resizing images on N2</title><content type='html'>One of the main issues you have with CMS systems is clients uploading images. Usually they take some pictures on their cameras and just want to upload the images without having to edit it in Photoshop or some other editing software.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The parameters&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The parameters are pretty self&amp;nbsp;explanatory, but let's run through them to make sure.Remember these are all done via the querystring e.g image.ashx?img=picture.jpg&amp;amp;w=100&amp;amp;h=75&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;img&lt;/b&gt;&amp;nbsp;- this is the url of your image and can be a url from anywhere on the site&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;w&lt;/b&gt;&amp;nbsp;- this is the width of the image.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;h&lt;/b&gt;&amp;nbsp;- This is the height of the image.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;You can pass in the width, height or both parameters. If you only specified either the width or the height though&amp;nbsp;then the handler will automatically resize your image to the correct proportions.&lt;br /&gt;&lt;br /&gt;Note if you're using an N2 image property that you may need to remove the ~ at the start of the url. Also, you will need to URLEncode this so that spaces etc are handled correctly. If you don't see the image appearing on your page or it appears as a broken link, it's most likely to be because the handler cannot load the image.&lt;br /&gt;&lt;br /&gt;I have found this really helpful when automatically resizing an image depending on where it is dropped on a page. For example, if we had a standard two-column page with a small left hand column and a wider main column on the right, we'd want to size the image so that it wasn't too big - or small - for the column.&lt;br /&gt;&lt;br /&gt;If we had a "Photograph" part, you could check which parent Zone it was in and then pass in different values to the image.ashx handler!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8739545492840900752-8200539477555496741?l=n2cmstutorial.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://n2cmstutorial.blogspot.com/feeds/8200539477555496741/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://n2cmstutorial.blogspot.com/2010/09/resizing-images-on-n2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8739545492840900752/posts/default/8200539477555496741'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8739545492840900752/posts/default/8200539477555496741'/><link rel='alternate' type='text/html' href='http://n2cmstutorial.blogspot.com/2010/09/resizing-images-on-n2.html' title='Resizing images on N2'/><author><name>N2CMS Tutorials</name><uri>http://www.blogger.com/profile/13799442310914050693</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8739545492840900752.post-6904826682863120043</id><published>2010-08-29T11:45:00.000+01:00</published><updated>2010-08-29T11:45:05.798+01:00</updated><title type='text'>Tip: Configuration settings on your website</title><content type='html'>Just a little tip today, but one I've had to use on all the N2 work I've done.&lt;div&gt;&lt;br /&gt;For most sites I've had to do, I've had to add general configuration settings that can be access by any page. The current N2 site has these - if you right click/edit on your homepage and then click on the "Site" tab, you'll see a few there such as 404settings and the like.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I like to put all my config values in here as it's then all in the one place, but accessing them is a bit of a pain. If you try to access them by N2.Find.StartPage then the object returned is a ContentItem, not a StartPage.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To get round this, I create a static class and have a static method to return any property in the configuration settings:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;public static StartPage SiteConfigurationSettings&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;get&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;StartPage sp = N2.Find.StartPage as StartPage;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (sp == null)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;throw new Exception("Cannot find the N2 Start page");&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return sp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now you can then access this property across the site in code as well as allow the end users to be able to update the value!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This is just a simple bare-bones example, but of course, you can cache this property too :)&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8739545492840900752-6904826682863120043?l=n2cmstutorial.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://n2cmstutorial.blogspot.com/feeds/6904826682863120043/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://n2cmstutorial.blogspot.com/2010/08/tip-configuration-settings-on-your.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8739545492840900752/posts/default/6904826682863120043'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8739545492840900752/posts/default/6904826682863120043'/><link rel='alternate' type='text/html' href='http://n2cmstutorial.blogspot.com/2010/08/tip-configuration-settings-on-your.html' title='Tip: Configuration settings on your website'/><author><name>N2CMS Tutorials</name><uri>http://www.blogger.com/profile/13799442310914050693</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8739545492840900752.post-7989880464062532959</id><published>2010-08-24T18:01:00.001+01:00</published><updated>2010-08-24T18:04:23.385+01:00</updated><title type='text'>Creating a page with a drop down list selectable value</title><content type='html'>In the past I had to create a page for a client which contained a list of cars and one of the requirements was that they would want to create pages on the site to show the types of cars that they sell.&amp;nbsp;This information included:-&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The car&amp;nbsp;body shapes (eg hatchback, estate, small van)&lt;/li&gt;&lt;li&gt;The year the car registration plate&lt;/li&gt;&lt;li&gt;The colour of the car&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;You get the idea. Now, we could of course allow free text to allow the user to enter this information and N2 will display this quite easily with&amp;nbsp;&amp;lt;%=CurrentItem.CarBodyShape%&amp;gt; or similar. However, it's quite easy to make typing mistakes and it becomes harder to write a method later to return all red cars, or all cars registered in 2002 for example.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So, we decided that we would&amp;nbsp;use drop down lists where possible so that data entry errors would be reduced. Simple? It should be straightforward, but first we need to look at how N2CMS properties work. If you look at a simple textfield:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[EditableTextBox("Host Name", 72, ContainerName = MiscArea)]&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public virtual string HostName&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;get { return (string)(GetDetail("HostName") ?? string.Empty); }&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;set { SetDetail("HostName", value); }&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can see that "EditableTextBox" attribute tells N2CMS that when you want to edit or display this property it's a TextBox.We can change this easily to EditableFreeTextArea and get a text area.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;However, for our drop down list it's not that straightforward. For my list, I want to add values in like red, blue, silver and black but how do we specify them? The answer is we create our own attribute first, then add it to our Item.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Load up Visual Studio and create a new class in your Items folder called CarShapeAttribute.cs like this:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_NoQmjGXToNk/THPxCcldwNI/AAAAAAAAABw/_WUcrM_a_-U/s1600/1.+Create+class.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_NoQmjGXToNk/THPxCcldwNI/AAAAAAAAABw/_WUcrM_a_-U/s320/1.+Create+class.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;I like to add "Attribute" to the end of my class names when I am creating attributes, but it's purely personal choice!&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Ok, the next thing we're going to do is create the class. Copy and paste this code into your new CarShapeAttribute.cs class:-&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;#region Namespaces&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;using System;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;using System.Data;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;using System.Configuration;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;using System.Linq;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;using System.Web;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;using System.Web.Security;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;using System.Web.UI;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;using System.Web.UI.HtmlControls;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;using System.Web.UI.WebControls;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;using System.Web.UI.WebControls.WebParts;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;using N2;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;#endregion&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;namespace MyProject.Items&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;{&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;public class CarShapeAttribute : N2.Details.AbstractEditableAttribute&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public override void UpdateEditor(ContentItem item, Control editor)&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Update the drop down list with the value from the ContentItem&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DropDownList ddl = editor as DropDownList;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (ddl != null)&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ddl.SelectedValue = item[this.Name].ToString();&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (ddl.Items.FindByValue(item[this.Name].ToString()) != null)&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ddl.Items.FindByValue(item[this.Name].ToString()).Selected = true;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public override bool UpdateItem(ContentItem item, Control editor)&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Get the drop downlist in the editor control&amp;nbsp;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Maybe you can add a check that ddl is not null afterwards!&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DropDownList ddl = (DropDownList)editor;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Get the item ID from the drop downlist&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// NB this could just as easily be a string value&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// If it was a string you would do this instead&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// string itemID = ddl.SelectedValue;&amp;nbsp;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;int itemID = int.Parse(ddl.SelectedValue);&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Set the value on the "bag" to save&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;item[this.Name] = itemID;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Return true if the item changed (and needs to be saved)&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return true;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;protected override Control AddEditor(Control container)&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Create your drop down list here and populate it with values - nothing fancy here!&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DropDownList ddl = new DropDownList();&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ddl.Items.Add(new ListItem("Not applicable", "0"));&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ddl.Items.Add(new ListItem("Hatchback", "1"));&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ddl.Items.Add(new ListItem("5 door", "2"));&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ddl.Items.Add(new ListItem("4 Door", "3"));&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ddl.Items.Add(new ListItem("Small van", "4"));&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ddl.Items.Add(new ListItem("Sports car", "5"));&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;container.Controls.Add(ddl);&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return ddl;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public override Control AddTo(Control container)&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return base.AddTo(container);&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;}&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Next we need to create a Page and associated Item that we can edit.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;On your Visual Studio PROJECT, right click and click on Add &amp;gt; New Item and you should be able to see you've got your N2 Page Template like this:-&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href="http://4.bp.blogspot.com/_NoQmjGXToNk/THPzTOBKUqI/AAAAAAAAAB4/KwcrDfPzJgU/s1600/2.Template.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_NoQmjGXToNk/THPzTOBKUqI/AAAAAAAAAB4/KwcrDfPzJgU/s320/2.Template.PNG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;I've called my page Car.aspx.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Once you've clicked ok, look in your "UI" folder and you'll see the template has created a Car.aspx page for you and in your Items folder you've got a CarPage.cs file! Great! That's saved us some boring config work!&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Open up your Item/Car.cs file and paste this in:-&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;using N2;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;using N2.Web;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;using N2.Details;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;using MyProject.Items;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;namespace N2.Items&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;{&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;/// &amp;lt;summary&amp;gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;/// This class represents the data transfer object that encapsulates&amp;nbsp;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;/// the information used by the template.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;/// &amp;lt;/summary&amp;gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;[PageDefinition("CarPage", TemplateUrl = "~/UI/Car.aspx")]&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;[WithEditableTitle, WithEditableName]&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;public class CarPage : ContentItem&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[EditableFreeTextArea("Text", 100)]&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public virtual string Text&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;get { return (string)(GetDetail("Text") ?? string.Empty); }&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;set { SetDetail("Text", value, string.Empty); }&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// This is our car shape attribute!&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[CarShapeAttribute(Title = "Car shape", SortOrder = 110)]&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public virtual int CarShape&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;get { return (int)(GetDetail("CarShape", 0)); }&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;set { SetDetail("CarShape", value, 0); }&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;}&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;And in your UI/CarPage.aspx page, paste this in:&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;lt;%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Car.aspx.cs" Inherits="N2.UI.Car" %&amp;gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&amp;gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;lt;html xmlns="http://www.w3.org/1999/xhtml" &amp;gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;lt;head runat="server"&amp;gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;title&amp;gt;Car&amp;lt;/title&amp;gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;lt;/head&amp;gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;lt;body&amp;gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;form id="form1" runat="server"&amp;gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;div&amp;gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&amp;lt;n2:Display PropertyName="Text" runat="server" /&amp;gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&amp;lt;p&amp;gt;The car shape selected is:&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;&amp;lt;%=CurrentItem.CarShape %&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/form&amp;gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;lt;/body&amp;gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;lt;/html&amp;gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now save it all, check it compiles and hit Control and F5 to run it. When it loads up, right click on the root page and select "new" and you should see the option to create a new CarPage!&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_NoQmjGXToNk/THP1XdQ5LuI/AAAAAAAAACA/Z-V-XnuWaYo/s1600/3.+New+carpage.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_NoQmjGXToNk/THP1XdQ5LuI/AAAAAAAAACA/Z-V-XnuWaYo/s320/3.+New+carpage.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Great! Click on it and you'll now see your page where you can enter a title and select a drop down list of the car shape:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_NoQmjGXToNk/THP10suIe1I/AAAAAAAAACI/IGp5Ohms8JM/s1600/4.+new+car.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_NoQmjGXToNk/THP10suIe1I/AAAAAAAAACI/IGp5Ohms8JM/s320/4.+new+car.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Save this and your page will be displayed:&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_NoQmjGXToNk/THP2HUUqRyI/AAAAAAAAACQ/kr4n8rfkhS4/s1600/5.+error.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_NoQmjGXToNk/THP2HUUqRyI/AAAAAAAAACQ/kr4n8rfkhS4/s320/5.+error.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The car shape is 5?! WHAT!! Well, it is in N2CMS as we're storing it as an integer!&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The good news is that the display value of the car can change - we're not storing the "Sports car" value, but the ID so you can easily change this and also add new values.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To display the correct "friendly name", we'll need to add a property onto our Items/Car.cs class. So now paste this into your class:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;using N2;&lt;/div&gt;&lt;div&gt;using N2.Web;&lt;/div&gt;&lt;div&gt;using N2.Details;&lt;/div&gt;&lt;div&gt;using MyProject.Items;&lt;/div&gt;&lt;div&gt;using System.Web.UI;&lt;/div&gt;&lt;div&gt;using System.Web.UI.WebControls;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;namespace N2.Items&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;/// &amp;lt;summary&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;/// This class represents the data transfer object that encapsulates&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;/// the information used by the template.&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;/// &amp;lt;/summary&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;[PageDefinition("CarPage", TemplateUrl = "~/UI/Car.aspx")]&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;[WithEditableTitle, WithEditableName]&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;public class CarPage : ContentItem&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[EditableFreeTextArea("Text", 100)]&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public virtual string Text&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;get { return (string)(GetDetail("Text") ?? string.Empty); }&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;set { SetDetail("Text", value, string.Empty); }&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// This is our car shape attribute!&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[CarShapeAttribute(Title = "Car shape", SortOrder = 110)]&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public virtual int CarShape&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;get { return (int)(GetDetail("CarShape", 0)); }&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;set { SetDetail("CarShape", value, 0); }&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/// &amp;lt;summary&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/// This method takes in the id of a car shape and returns its friendly name&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/// &amp;lt;/summary&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/// &amp;lt;param name="id"&amp;gt;The c&amp;lt;/param&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public string CarShapeText&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;get&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Create an instance of the attribute class&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CarShapeAttribute attr = new CarShapeAttribute();&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Pass in a temporary control to get back our drop down list&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Control c = new Control();&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DropDownList list = (DropDownList)attr.AddTo(c);&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (list == null)&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return "Not found!";&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Return the value!&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return list.Items.FindByValue(CarShape.ToString()).Text;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now, when you compile and then reload your page you should see this:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_NoQmjGXToNk/THP6Rsod7VI/AAAAAAAAACY/DilfOrBF8fU/s1600/final.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_NoQmjGXToNk/THP6Rsod7VI/AAAAAAAAACY/DilfOrBF8fU/s320/final.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;You can see the principle here of how we can now go on to create other attributes for other parts of the car. You may also want to create an "attributes" folder to put all your attribute classes in so it doesn't get too cluttered.&lt;br /&gt;&lt;br /&gt;What is now VERY powerful is that we can do search for cars by this attribute type to create search pages - I'll cover this at a later date though!&lt;br /&gt;&lt;br /&gt;&lt;div&gt;Simple! Hope this helps!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8739545492840900752-7989880464062532959?l=n2cmstutorial.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://n2cmstutorial.blogspot.com/feeds/7989880464062532959/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://n2cmstutorial.blogspot.com/2010/08/creating-page-with-drop-down-list.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8739545492840900752/posts/default/7989880464062532959'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8739545492840900752/posts/default/7989880464062532959'/><link rel='alternate' type='text/html' href='http://n2cmstutorial.blogspot.com/2010/08/creating-page-with-drop-down-list.html' title='Creating a page with a drop down list selectable value'/><author><name>N2CMS Tutorials</name><uri>http://www.blogger.com/profile/13799442310914050693</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_NoQmjGXToNk/THPxCcldwNI/AAAAAAAAABw/_WUcrM_a_-U/s72-c/1.+Create+class.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8739545492840900752.post-8821188828619663946</id><published>2010-08-18T18:56:00.003+01:00</published><updated>2010-08-20T06:27:30.270+01:00</updated><title type='text'>Using N2CMS with MySQL</title><content type='html'>As I have mentioned before in an earlier blog, when I am developing locally I like to use SQL Server 2008 primarily as it's the one I have most experience with. However, some of my clients can only use MySql.&lt;br /&gt;&lt;br /&gt;To complicate matters further, I've recently had an order come through to build a site which will have to use the ASP.NET membership with MySql which is something I've not done before. &lt;br /&gt;&lt;br /&gt;I'd recommend reading these blog posts first:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.integratedwebsystems.com/2010/02/how-to-setup-and-configure-mysql-membership-provider-6-2-2-porting-to-mono-part-2-of-3/"&gt;http://www.integratedwebsystems.com/2010/02/how-to-setup-and-configure-mysql-membership-provider-6-2-2-porting-to-mono-part-2-of-3/&lt;/a&gt;&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.nolanbailey.com/2008/03/08/mysql-aspnet-membership-and-role-provider/194"&gt;http://blog.nolanbailey.com/2008/03/08/mysql-aspnet-membership-and-role-provider/194&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;Both were a big help in explaining what to do.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;However, I had to do a few tweaks first to get it working. Nothing too difficult but again it's the kind of thing which can eat time. So, if you want to get your N2CMS site working with ASP.NET Membership and MySql, here's my two minute guide:-&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Download the .NET connector from&amp;nbsp;&lt;a href="http://www.mysql.com/downloads/connector/net/"&gt;http://www.mysql.com/downloads/connector/net/&lt;/a&gt;&amp;nbsp;the version I am using is 6.2.3&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Add a reference to the MySql.Web.Dll which you will find in "c:\Program Files\MySql\MySql Connector Net 6.2.3\Assemblies"&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Change the N2CMS connectionstring to point to your MySql database (for this example I am just going to leave the of the connection string as "N2CMS" which is the default one)&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Replace your membership, roles and profiles nodes in the web.config with this:-&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;membership defaultProvider="MySqlMembershipProvider"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;providers&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;clear/&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;add name="MySqlMembershipProvider"&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;type="MySql.Web.Security.MySQLMembershipProvider, MySql.Web, Version=6.2.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;connectionStringName="N2CMS"&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;enablePasswordRetrieval="false"&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;enablePasswordReset="true"&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;requiresQuestionAndAnswer="false"&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;requiresUniqueEmail="true"&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;passwordFormat="Hashed"&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;maxInvalidPasswordAttempts="5"&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;minRequiredPasswordLength="6"&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;minRequiredNonalphanumericCharacters="0"&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;passwordAttemptWindow="10"&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;applicationName="/"&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;autogenerateschema="true"/&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/providers&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/membership&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;roleManager enabled="true" defaultProvider="MySqlRoleProvider"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;providers&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;clear /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;add connectionStringName="N2CMS"&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;applicationName="/"&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;name="MySqlRoleProvider"&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;type="MySql.Web.Security.MySQLRoleProvider, MySql.Web, Version=6.2.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;autogenerateschema="true"/&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/providers&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/roleManager&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;profile defaultProvider="MySqlProfileProvider"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;providers&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;clear/&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;add&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;type="MySql.Web.Profile.MySqlProfileProvider, MySql.Web, Version=6.2.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;name="MySqlProfileProvider"&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;applicationName="/"&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;connectionStringName="N2CMS"&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;autogenerateschema="true"/&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/providers&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/profile&amp;gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;If you are wondering how I got the version and PublicKeyToken, right click on the MySql.Web.dll in the solution explorer and click properties - this will give you the version. To get the PublicKeyToken, you will need to look in the c:\windows\microsoft.net\framework\v2.0.xxx\config\machine.config file and search for "MySql".&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;I&lt;/span&gt;f you now run N2 you will get the installer and be able to install a new site! Note you can also manage the providers, members, roles etc from within Visual Studio with the ASP.NET Configuration tool.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Once you've done this you may need to alter the rules on passwords etc, but that is beyond this two minute guide!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;Hope this helps!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8739545492840900752-8821188828619663946?l=n2cmstutorial.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://n2cmstutorial.blogspot.com/feeds/8821188828619663946/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://n2cmstutorial.blogspot.com/2010/08/using-n2cms-with-mysql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8739545492840900752/posts/default/8821188828619663946'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8739545492840900752/posts/default/8821188828619663946'/><link rel='alternate' type='text/html' href='http://n2cmstutorial.blogspot.com/2010/08/using-n2cms-with-mysql.html' title='Using N2CMS with MySQL'/><author><name>N2CMS Tutorials</name><uri>http://www.blogger.com/profile/13799442310914050693</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8739545492840900752.post-8901139707476740751</id><published>2010-08-17T19:40:00.001+01:00</published><updated>2010-08-17T19:41:37.204+01:00</updated><title type='text'>How to reorder pages in N2CMS</title><content type='html'>This is just a little tip, but one which I missed.&lt;br /&gt;&lt;br /&gt;If you want to move pages up and down through the N2CMS hierarchy, there's two small buttons at the top left of the page which can do this for you. Select your page, then click on one of these and your page will move!&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_NoQmjGXToNk/TGrX1ORowKI/AAAAAAAAABM/-XL80SpOl_4/s1600/moving2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_NoQmjGXToNk/TGrX1ORowKI/AAAAAAAAABM/-XL80SpOl_4/s320/moving2.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8739545492840900752-8901139707476740751?l=n2cmstutorial.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://n2cmstutorial.blogspot.com/feeds/8901139707476740751/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://n2cmstutorial.blogspot.com/2010/08/how-to-reorder-pages-in-n2cms.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8739545492840900752/posts/default/8901139707476740751'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8739545492840900752/posts/default/8901139707476740751'/><link rel='alternate' type='text/html' href='http://n2cmstutorial.blogspot.com/2010/08/how-to-reorder-pages-in-n2cms.html' title='How to reorder pages in N2CMS'/><author><name>N2CMS Tutorials</name><uri>http://www.blogger.com/profile/13799442310914050693</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_NoQmjGXToNk/TGrX1ORowKI/AAAAAAAAABM/-XL80SpOl_4/s72-c/moving2.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8739545492840900752.post-7527825626092378674</id><published>2010-08-17T19:29:00.002+01:00</published><updated>2011-10-15T09:19:34.336+01:00</updated><title type='text'>Run several N2CMS websites on one database server</title><content type='html'>One of the things that I have found is that out of the box, N2CMS will create your tables as:-&lt;br /&gt;&lt;ul&gt;&lt;li&gt;n2item&lt;/li&gt;&lt;li&gt;n2ContentItem&amp;nbsp;etc.&lt;/li&gt;&lt;/ul&gt;Now, for some smaller clients of ours they can't afford to have a dedicated database server. On some of the cheaper hosts you can one database but then you'd need to create separate n2cms tables for each client.&lt;br /&gt;&lt;br /&gt;It's dead simple to do this. If you had ClientA and ClientB you would want your tables to be something like:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;ClientA_Item&lt;/li&gt;&lt;li&gt;ClientA_ContentItem and&amp;nbsp;&lt;/li&gt;&lt;li&gt;ClientB_Item&lt;/li&gt;&lt;li&gt;ClientB_ContentItem&lt;/li&gt;&lt;/ul&gt;To do this, look in your web.config and there's an element that you need to ammend&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&amp;lt;!-- Other flavours: SqlServer2005, SqlServer2000, MySql, SqLite, SqlCe, Firebird --&amp;gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&amp;lt;database connectionStringName="N2CMS" flavour="AutoDetect" caching="true" cacheProviderClass="NHibernate.Caches.SysCache2.SysCacheProvider, NHibernate.Caches.SysCache2" tablePrefix="&lt;b&gt;TheNameOfYourClient_&lt;/b&gt;"&amp;gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;&amp;lt;hibernateProperties&amp;gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;    &lt;/span&gt;&amp;lt;add name="hbm2ddl.keywords" value="none" /&amp;gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;&amp;lt;/hibernateProperties&amp;gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&amp;lt;/database&amp;gt;&lt;br /&gt;&lt;br /&gt;Voila! You can now run several sites on one database!&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Note:&lt;/b&gt;&amp;nbsp;I always add a "_" after the name of the client as it makes the tables in the database look a little neater!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8739545492840900752-7527825626092378674?l=n2cmstutorial.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://n2cmstutorial.blogspot.com/feeds/7527825626092378674/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://n2cmstutorial.blogspot.com/2010/08/run-several-n2cms-websites-on-one.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8739545492840900752/posts/default/7527825626092378674'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8739545492840900752/posts/default/7527825626092378674'/><link rel='alternate' type='text/html' href='http://n2cmstutorial.blogspot.com/2010/08/run-several-n2cms-websites-on-one.html' title='Run several N2CMS websites on one database server'/><author><name>N2CMS Tutorials</name><uri>http://www.blogger.com/profile/13799442310914050693</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8739545492840900752.post-759618696092293388</id><published>2010-08-17T19:27:00.001+01:00</published><updated>2010-08-17T19:34:04.819+01:00</updated><title type='text'>Data import and moving databases</title><content type='html'>When I am developing, I have a local setup which consists of a laptop to do the development work on and a separate database server. I prefer to develop with SQL server for a number of reasons, primarily it's the one I've got most exposure to and I know it more than any other database.&lt;br /&gt;&lt;br /&gt;However, some of my clients are using MySQL database so at first it may seem that there's some data migration that would need to be done to move the data from SQL Server to MySQL.&lt;br /&gt;&lt;br /&gt;Before I knew about this little "trick", I'd spent money on software to convert the databases (and most didn't quite work either) but there's a couple of reasons that I now realise why I don't need to have done this.&lt;br /&gt;&lt;br /&gt;Firstly, when n2cms is saving data to the database it uses &lt;a href="http://nhforge.org/Default.aspx"&gt;NHiberate &lt;/a&gt;to do it. This is great news as it hides the database implementation - I call save on an object and under the n2cms hood it calls NHibernate to save the object to the database. Luckily, to change databases it's a simple change in the web.config and it also allows us to use other database providers such as SQL Server, SQL Lite or MySql.&lt;br /&gt;&lt;br /&gt;Secondly, n2cms allows you to export your data from one n2cms website so you can import it into another. This is completely database agnostic as well!&lt;br /&gt;&lt;br /&gt;This is something I missed at first, but if you look at the top of the screen you'll see an "Export" button.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_NoQmjGXToNk/TGrTUeT35xI/AAAAAAAAAAs/iQ5-JjM4or0/s1600/Part1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_NoQmjGXToNk/TGrTUeT35xI/AAAAAAAAAAs/iQ5-JjM4or0/s320/Part1.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Click this and you'll now get the option to import or export data. Export your data and save it somewhere on your disk.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_NoQmjGXToNk/TGrTyYaUx-I/AAAAAAAAAA0/RbkvHsFd7wU/s1600/part2+what+to+export.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_NoQmjGXToNk/TGrTyYaUx-I/AAAAAAAAAA0/RbkvHsFd7wU/s320/part2+what+to+export.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;If you are exporting your site to move to another server, just click "Export these items".&lt;br /&gt;&lt;br /&gt;Ok, so we've exported the data to our local disk and we now need to&amp;nbsp;to migrate the data to the new server.&lt;br /&gt;&lt;br /&gt;Go back into your web.config and change the connection string to your new database server.Start&amp;nbsp;up your n2cms site and you will get the install page.&lt;br /&gt;&lt;br /&gt;Install as usual until step 4 and select the "Advanced options" at the bottom of the page.&lt;br /&gt;&lt;br /&gt;Select your exported file and n2 will then recreate your site on the new server!&lt;br /&gt;&lt;br /&gt;Simple, but absolute genius!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8739545492840900752-759618696092293388?l=n2cmstutorial.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://n2cmstutorial.blogspot.com/feeds/759618696092293388/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://n2cmstutorial.blogspot.com/2010/08/data-import-and-moving-databases.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8739545492840900752/posts/default/759618696092293388'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8739545492840900752/posts/default/759618696092293388'/><link rel='alternate' type='text/html' href='http://n2cmstutorial.blogspot.com/2010/08/data-import-and-moving-databases.html' title='Data import and moving databases'/><author><name>N2CMS Tutorials</name><uri>http://www.blogger.com/profile/13799442310914050693</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_NoQmjGXToNk/TGrTUeT35xI/AAAAAAAAAAs/iQ5-JjM4or0/s72-c/Part1.PNG' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8739545492840900752.post-2219520419344691858</id><published>2010-08-17T19:16:00.001+01:00</published><updated>2010-08-17T19:49:09.239+01:00</updated><title type='text'>How to set up your N2CMS and Web Forms development environment</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;One of the areas I found a little tricky at first was to set up N2CMS so I could actually run it. I wasn't quite sure where to start, what batch files to run etc. This guide will help you download the N2CMS Web Forms Template software, set up Visual Studio with the snippets and get you running N2CMS with a SQLLite database.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;This guide is purely to get you started. It's not going to get into any details, just a step by step guide to getting you ready to be able to follow some of my other guides later on.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Also, I am assuming you will be using Visual Studio 2008 as currently I believe there is issues with Visual Studio 2010.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;First of all, go to www.n2cms.com and then go to the downloads page and download the "N2 CMS 2.0 ASP.NET WebForms Templates Pack" as highlighted here:-&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #30332d;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="color: #30332d;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_NoQmjGXToNk/TGrJrDRxZLI/AAAAAAAAAAM/WRck3-oF8Vc/s1600/Part1+-+Downloading.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_NoQmjGXToNk/TGrJrDRxZLI/AAAAAAAAAAM/WRck3-oF8Vc/s320/Part1+-+Downloading.PNG" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="color: #30332d;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;Next, extract the archive out. I am going to extract this archive into my "d:\n2cms" folder. From now on, I will assume you will have done the same. You should now see something like this in your d:\n2cms folder:-&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #30332d;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_NoQmjGXToNk/TGrKqqpefBI/AAAAAAAAAAU/nENIlyUB7Gs/s1600/Part2-Files.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_NoQmjGXToNk/TGrKqqpefBI/AAAAAAAAAAU/nENIlyUB7Gs/s320/Part2-Files.PNG" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Because we're going to run this demo using SQL Lite, you will need to copy the two files in the "Libraries" folder into the N2CMS/bin folder. If it asks about copy and replacing, just click ok. If you don't do this, you will get an error when you try to run the site at the end of this guide!&lt;br /&gt;&lt;br /&gt;Now, the next stage is to set up Visual Studio 2008 so that we can use the properties and page template options. I have found these invaluable when developing N2CMS sites and I'd strongly suggest you use them. To be honest, although setting up the properties isn't easy there's a couple of "gotchas" which are simple to miss. If you use these, it's just far, far easier to develop.&lt;br /&gt;&lt;br /&gt;Ok, if you look inside the "Snippets" folder you'll see a few files that start with "n2" like&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_NoQmjGXToNk/TGrYpsjiHdI/AAAAAAAAABU/QfBTmFbCm28/s1600/snippets.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_NoQmjGXToNk/TGrYpsjiHdI/AAAAAAAAABU/QfBTmFbCm28/s320/snippets.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Copy these files into your "\Documents\Visual Studio 2008\Code Snippets\Visual C#\My Code Snippets" folder on your C: drive. When you develop a page in N2CMS, you'll be able to type "n2prop" then press tab and the code will be generated for you.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;The next thing is to set up the page and item templates. In the "Snippets" folder there are two zip files that you need to copy to your "\Documents\Visual Studio 2008\Templates\ItemTemplates\Visual C#" folder:-&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_NoQmjGXToNk/TGrY5W12D7I/AAAAAAAAABc/cuFIY1hjmcU/s1600/snippets2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_NoQmjGXToNk/TGrY5W12D7I/AAAAAAAAABc/cuFIY1hjmcU/s320/snippets2.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;You can ignore the &amp;nbsp;"N2 Page Controllers" snippet as that is for the ASP.NET MVC project.&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #30332d;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Right, now we've done the background work, go do d:\n2cms\n2cms and double click on the N2.Templates.sln file. Or you can open this from within Visual Studio 2008.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #30332d;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_NoQmjGXToNk/TGrZkDbB8_I/AAAAAAAAABo/34XFalc2mdM/s1600/directory.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_NoQmjGXToNk/TGrZkDbB8_I/AAAAAAAAABo/34XFalc2mdM/s320/directory.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="color: #30332d;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #30332d;"&gt;Once it's loaded you should see something like this now in your Solution Explorer:-&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #30332d;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_NoQmjGXToNk/TGrQSbPr3AI/AAAAAAAAAAc/LX1UaLWsBfo/s1600/Part3-Project.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_NoQmjGXToNk/TGrQSbPr3AI/AAAAAAAAAAc/LX1UaLWsBfo/s320/Part3-Project.PNG" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="color: #30332d;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #30332d;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;If you now press "Control and F5" together to run N2, you should then be able to see the N2 homepage!&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #30332d;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_NoQmjGXToNk/TGrRx6Zi-gI/AAAAAAAAAAk/EOWwSPJYh5k/s1600/Part4-Homepage.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_NoQmjGXToNk/TGrRx6Zi-gI/AAAAAAAAAAk/EOWwSPJYh5k/s320/Part4-Homepage.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="color: #30332d;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #30332d;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #30332d;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;b&gt;Note:&lt;/b&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&amp;nbsp;If you get an error saying "&lt;/span&gt;&lt;/span&gt;The IDbCommand and IDbConnection implementation in the assembly System.Data.SQLite could not be found." then you've forgotten to copy the MySQL files from the library folder. I nearly always&amp;nbsp;do this when I start a new project!&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #30332d; font-family: 'Segoe UI', 'Microsoft Sans Serif', Arial, Geneva, sans-serif; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8739545492840900752-2219520419344691858?l=n2cmstutorial.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://n2cmstutorial.blogspot.com/feeds/2219520419344691858/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://n2cmstutorial.blogspot.com/2010/08/how-to-set-up-your-n2cms-and-web-forms.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8739545492840900752/posts/default/2219520419344691858'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8739545492840900752/posts/default/2219520419344691858'/><link rel='alternate' type='text/html' href='http://n2cmstutorial.blogspot.com/2010/08/how-to-set-up-your-n2cms-and-web-forms.html' title='How to set up your N2CMS and Web Forms development environment'/><author><name>N2CMS Tutorials</name><uri>http://www.blogger.com/profile/13799442310914050693</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_NoQmjGXToNk/TGrJrDRxZLI/AAAAAAAAAAM/WRck3-oF8Vc/s72-c/Part1+-+Downloading.PNG' height='72' width='72'/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8739545492840900752.post-196997166572555210</id><published>2010-08-11T14:56:00.000+01:00</published><updated>2010-08-11T14:56:05.769+01:00</updated><title type='text'>Welcome</title><content type='html'>Welcome to my new blog which is aiming to provide some clear instructions for those developers who are looking to develop with the superb N2CMS platform.&lt;br /&gt;&lt;br /&gt;One of the complaints about N2CMS is that there's a lack of clear documentation and also that the instructions and tutorials aren't clear. I'll be honest and say that over the last year that I've been using it, I've found a few hurdles in the way but once you've mastered them you'll see just how easy it is to make pretty impressive content managed websites. I'm going to try where possible to use screenshots from Visual Studio, real code samples and not really delve too much into the "under the hood" code. The aim will be clear examples wherever possible to help solve "real world" problems that I've found.&lt;br /&gt;&lt;br /&gt;I'm going to try to dump everything I've picked up in the last year into this blog. I daresay some of it you'll know, some of it might not be 100% correct but I hope there's a few tips that you will be able to pick up on and find useful.&lt;br /&gt;&lt;br /&gt;Cheers!&lt;br /&gt;&lt;br /&gt;I'm going to assume that readers will at least know some ASP.NET and C# and have Visual Studio 2008.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8739545492840900752-196997166572555210?l=n2cmstutorial.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://n2cmstutorial.blogspot.com/feeds/196997166572555210/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://n2cmstutorial.blogspot.com/2010/08/welcome.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8739545492840900752/posts/default/196997166572555210'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8739545492840900752/posts/default/196997166572555210'/><link rel='alternate' type='text/html' href='http://n2cmstutorial.blogspot.com/2010/08/welcome.html' title='Welcome'/><author><name>N2CMS Tutorials</name><uri>http://www.blogger.com/profile/13799442310914050693</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry></feed>
