<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>Nibble, Umbraco developer</title>
	<atom:link href="http://www.nibble.be/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.nibble.be</link>
	<description>Umbraco .net cms Tips, tricks, examples, screencasts and more ...</description>
	<pubDate>Tue, 30 Apr 2013 10:33:48 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
	<language>en</language>
			<item>
		<title>Single page CRUD app with Umbraco 6</title>
		<link>http://www.nibble.be/?p=224</link>
		<comments>http://www.nibble.be/?p=224#comments</comments>
		<pubDate>Tue, 30 Apr 2013 10:33:48 +0000</pubDate>
		<dc:creator>Tim Geyssens</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.nibble.be/?p=224</guid>
		<description><![CDATA[A little experiment in using Umbraco as a datasource for a single page CRUD app. Making use of the new Umbraco APIs (ContentService and UmbracoAPIController).

&#160;
Umbraco setup
Using Umbraco 6.1 beta (since that includes the UmbracoApiController).
Default rendering engine is set to MVC (this is setup in the /config/umbracoSettings.config).    
Two doctype are in place


HomePage (with [...]]]></description>
			<content:encoded><![CDATA[<p>A little experiment in using Umbraco as a datasource for a single page CRUD app. Making use of the new Umbraco APIs (<a href="http://our.umbraco.org/documentation/v480/Reference/Management-v6/Services/ContentService">ContentService</a> and <a href="http://our.umbraco.org/documentation/Reference/WebApi/">UmbracoAPIController</a>).</p>
<p><iframe height="396" src="http://www.screenr.com/embed/UOw7" frameborder="0" width="650"></iframe></p>
<h2>&#160;</h2>
<h2>Umbraco setup</h2>
<p>Using Umbraco 6.1 beta (since that includes the <a href="http://our.umbraco.org/documentation/Reference/WebApi/" target="_blank">UmbracoApiController</a>).</p>
<p>Default rendering engine is set to MVC (this is setup in the /config/umbracoSettings.config).    </p>
<p>Two doctype are in place</p>
<ul>
<ul>
<li><font color="#ffffff">HomePage (with a property footer of type richtext editor)</font> </li>
<li>Status (with a property message of type textbox multiple) </li>
</ul>
</ul>
<p>So this is how the content structure looks (and with the app we’ll be able to list/create/update/delete status content docs)</p>
<p><a href="http://www.nibble.be/wp-content/uploads/2013/04/image.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.nibble.be/wp-content/uploads/2013/04/image-thumb.png" width="285" height="124" /></a></p>
<h2>Creating the model</h2>
<p>The data that we’ll pass between client and server, It’s a pretty simple model with only a couple of properties (the id, need that to be able to edit, and 2 other properties that will be used for the content name and the message field).</p>
<div class="csharpcode">
<pre class="alt">   <span class="kwrd">public</span> <span class="kwrd">class</span> Status</pre>
<pre>    {</pre>
<pre class="alt">        <span class="kwrd">public</span> <span class="kwrd">int</span> Id { get; set; }</pre>
<pre>        <span class="kwrd">public</span> <span class="kwrd">string</span> Title { get; set; }</pre>
<pre class="alt">        <span class="kwrd">public</span> <span class="kwrd">string</span> Message { get; set; }</pre>
<pre>&#160;</pre>
<pre class="alt">    }</pre>
</div>
<style type="text/css">
<p>.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<h2>&#160;</h2>
<h2>Creating the API</h2>
<p>Since we want to create a RESTful application the obvious choice would be to use <a href="http://www.asp.net/web-api" target="_blank">WEB API</a> and use a API controller, you can do that in Umbraco, there is a base Web Api controller you can inherit from that will expose Umbraco related services and objects, the <a href="http://our.umbraco.org/documentation/Reference/WebApi/" target="_blank">UmbracoApiController</a> (available since 6.1 beta)</p>
<p>It’s important that the controller class name is suffixed with &quot;<strong>ApiController</strong>&quot;</p>
<div class="csharpcode">
<pre class="alt"><span class="kwrd">public</span> <span class="kwrd">class</span> StatusApiController : UmbracoApiController</pre>
<pre>{</pre>
<pre class="alt">}</pre>
</div>
<style type="text/css">
<p>.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
</p>
<p>With that in place we can start adding the methods that we’ll need</p>
<h4>Fetching documents</h4>
<p>For <a href="http://our.umbraco.org/documentation/Reference/Mvc/querying" target="_blank">querying published content</a> we’ll be working with strongly typed Content (of type IPublishedContent).</p>
<p>Getting all status docs underneath a certain parent and mapping them to the type of our model</p>
<div class="csharpcode">
<pre class="alt"> <span class="kwrd">public</span> IEnumerable&lt;Status&gt; GetAllStatuses(<span class="kwrd">int</span> parentId)</pre>
<pre>        {</pre>
<pre class="alt">            UmbracoHelper help = <span class="kwrd">new</span> UmbracoHelper(UmbracoContext);</pre>
<pre>            <span class="kwrd">return</span> help.TypedContent(parentId)</pre>
<pre class="alt">                .Children</pre>
<pre>                .Where(c =&gt; c.DocumentTypeAlias == StatusDocTypeAlias)</pre>
<pre class="alt">                .Select(obj =&gt; <span class="kwrd">new</span> Status()</pre>
<pre>            {</pre>
<pre class="alt">                Title = obj.Name,</pre>
<pre>                Message = obj.GetPropertyValue&lt;<span class="kwrd">string</span>&gt;(MessagePropertyAlias),</pre>
<pre class="alt">                Id = obj.Id</pre>
<pre>            });</pre>
<pre class="alt">        }</pre>
</div>
<style type="text/css">
<p>.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<p>&#160;</p>
<p>Getting a doc by it’s id and mapping it to our model type</p>
<div class="csharpcode">
<pre class="alt">        <span class="kwrd">public</span> Status GetStatus(<span class="kwrd">int</span> id)</pre>
<pre>        {</pre>
<pre class="alt">            UmbracoHelper help = <span class="kwrd">new</span> UmbracoHelper(UmbracoContext);</pre>
<pre>            var content  = help.TypedContent(id);</pre>
<pre class="alt">            <span class="kwrd">return</span> <span class="kwrd">new</span> Status</pre>
<pre>            {</pre>
<pre class="alt">                Id = content.Id,</pre>
<pre>                Title = content.Name,</pre>
<pre class="alt">                Message = content.GetPropertyValue&lt;<span class="kwrd">string</span>&gt;(MessagePropertyAlias)</pre>
<pre>            };</pre>
<pre class="alt">        }</pre>
</div>
<style type="text/css">
<p>.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
</p>
<h4>Create/Update/Delete documents</h4>
<p>For this we’ll make use of the new APIs available in v6, the new API consists of a number of services since we are interacting with content we’ll be using the <a href="http://umbraco.com/follow-us/blog-archive/2013/1/22/introducing-contentservice-aka-the-v6-api.aspx" target="_blank">ContentService</a>. Because our controller inherits from the UmbracoAPIController we can easily access the ContentService with Services.ContentService </p>
<p>Creating a new doc (+ setting prop value + save and publish)</p>
<div class="csharpcode">
<pre class="alt"> <span class="kwrd">public</span> Status PostStatus(Status status, <span class="kwrd">int</span> parentId)</pre>
<pre>        {</pre>
<pre class="alt">            var cs = Services.ContentService;</pre>
<pre>            var content = cs.CreateContent(status.Title, parentId, StatusDocTypeAlias);</pre>
<pre class="alt">            content.Name = status.Title;</pre>
<pre>            content.SetValue(MessagePropertyAlias, status.Message);</pre>
<pre class="alt">            cs.SaveAndPublish(content);</pre>
<pre>            status.Id = content.Id;</pre>
<pre class="alt">            <span class="kwrd">return</span> status;</pre>
<pre>        </pre>
<pre class="alt">        }</pre>
</div>
<style type="text/css">
<p>.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
</p>
<p>Updating a doc</p>
<div class="csharpcode">
<pre class="alt"> <span class="kwrd">public</span> Status PutStatus(Status status)</pre>
<pre>        {</pre>
<pre class="alt">            var cs = Services.ContentService;</pre>
<pre>            var content = cs.GetById(status.Id);</pre>
<pre class="alt">            content.Name = status.Title;</pre>
<pre>            content.SetValue(MessagePropertyAlias, status.Message);</pre>
<pre class="alt">            cs.SaveAndPublish(content);</pre>
<pre>            <span class="kwrd">return</span> status;</pre>
<pre class="alt">&#160;</pre>
<pre>        }</pre>
</div>
<style type="text/css">
<p>.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
</p>
<p>Deleting a doc</p>
<div class="csharpcode">
<pre class="alt"> <span class="kwrd">public</span> <span class="kwrd">void</span> DeleteStatus(<span class="kwrd">int</span> statusId)</pre>
<pre>        {</pre>
<pre class="alt">            var cs = Services.ContentService;</pre>
<pre>            var content = cs.GetById(statusId);</pre>
<pre class="alt">            cs.Delete(content);</pre>
<pre>        }</pre>
</div>
<style type="text/css">
<p>.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<p>&#160;</p>
<h2>The App</h2>
<p>To create the actual app that will make use of our api&#160;&#160; I used <a href="http://angularjs.org/" target="_blank">AngularJS</a>, that made it pretty simple. </p>
<p>To show a small snippet (http delete against the DeleteStatus method)</p>
<div class="csharpcode">
<pre class="alt">            $http({ method: <span class="str">&#8216;DELETE&#8217;</span>, url: <span class="str">&#8216;/umbraco/api/StatusApi/DeleteStatus/&#8217;</span>, <span class="kwrd">params</span>: { statusId: $routeParams.Id } })</pre>
<pre>                .success(<span class="kwrd">function</span> (data) {</pre>
<pre class="alt">                    </pre>
<pre>                    $rootScope.alert = <span class="kwrd">true</span>;</pre>
<pre class="alt">                    $rootScope.alertMessage = <span class="str">&quot;Status removed&quot;</span>;</pre>
<pre>                    </pre>
<pre class="alt">                    $location.path(<span class="str">&#8216;/list&#8217;</span>);</pre>
<pre>                })</pre>
<pre class="alt">                .error(<span class="kwrd">function</span> () {</pre>
<pre>                    $scope.error = <span class="str">&quot;An Error has occured while deleting!&quot;</span>;</pre>
<pre class="alt">                });</pre>
</div>
<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<p>For an intro on AngularJS check <a href="http://www.egghead.io/">http://www.egghead.io/</a>&#160;</p>
<p>For the UI <a href="http://twitter.github.io/bootstrap/" target="_blank">Bootstrap</a> is used</p>
<h2>Source code</h2>
<p>Complete example site and source code is available on github<br />
  <br /><a href="https://github.com/TimGeyssens/UmbracoSinglePageCrudApp">https://github.com/TimGeyssens/UmbracoSinglePageCrudApp</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nibble.be/?feed=rss2&amp;p=224</wfw:commentRss>
		</item>
		<item>
		<title>Contour code first and Conditional Logic</title>
		<link>http://www.nibble.be/?p=221</link>
		<comments>http://www.nibble.be/?p=221#comments</comments>
		<pubDate>Mon, 10 Dec 2012 15:29:08 +0000</pubDate>
		<dc:creator>Tim Geyssens</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.nibble.be/?p=221</guid>
		<description><![CDATA[Another code first example, setting up field conditions when designing your form in visual studio.
There are 3 properties on the Field attribute that need to be used (EnableCondition, ConditionActionType and ConditionLogicType) then for setting up 1 or multiple rules you’ll need to decorate the property with a FieldConditionRule attribute providing it the caption of the [...]]]></description>
			<content:encoded><![CDATA[<p>Another code first example, setting up <a href="http://umbraco.com/follow-us/blog-archive/2012/11/7/contour-30-features-conditional-logic.aspx" target="_blank">field conditions</a> when designing your form in visual studio.</p>
<p>There are 3 properties on the Field attribute that need to be used (EnableCondition, ConditionActionType and ConditionLogicType) then for setting up 1 or multiple rules you’ll need to decorate the property with a FieldConditionRule attribute providing it the caption of the field, the rule operator and the value.</p>
<div class="csharpcode">
<pre class="alt">        [Field(<span class="str">&quot;Leave a comment&quot;</span>, <span class="str">&quot;Your comment&quot;</span>,</pre>
<pre>            Mandatory = <span class="kwrd">true</span>)]</pre>
<pre class="alt">        <span class="kwrd">public</span> <span class="kwrd">string</span> Name { get; set; }</pre>
<pre>&#160;</pre>
<pre class="alt">        [Field(<span class="str">&quot;Leave a comment&quot;</span>, <span class="str">&quot;Your comment&quot;</span>,</pre>
<pre>            EnableCondition = <span class="kwrd">true</span>,</pre>
<pre class="alt">            ConditionActionType = FieldConditionActionType.Show,</pre>
<pre>            ConditionLogicType = FieldConditionLogicType.Any)]</pre>
<pre class="alt">        [FieldConditionRule(<span class="str">&quot;Name&quot;</span>,FieldConditionRuleOperator.Is, <span class="str">&quot;Test&quot;</span>)]</pre>
<pre>        <span class="kwrd">public</span> <span class="kwrd">string</span> Hidden { get; set; }</pre>
</div>
<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<p>In this case the field with caption hidden will only be shown if the value of the field with caption Name is test</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nibble.be/?feed=rss2&amp;p=221</wfw:commentRss>
		</item>
		<item>
		<title>Contour code first and custom fieldtypes</title>
		<link>http://www.nibble.be/?p=220</link>
		<comments>http://www.nibble.be/?p=220#comments</comments>
		<pubDate>Fri, 07 Dec 2012 10:18:17 +0000</pubDate>
		<dc:creator>Tim Geyssens</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.nibble.be/?p=220</guid>
		<description><![CDATA[A question that popped up several times regarding the new Contour code first feature is if it’s possible to use custom fieldtypes.
It sure is, take a look at the following example. Let’s say we want to use a fieldtype from the Contour Contrib project.
First we’ll need to add a reference to the assembly containing the [...]]]></description>
			<content:encoded><![CDATA[<p>A question that popped up several times regarding the new <a href="http://umbraco.com/follow-us/blog-archive/2012/11/6/contour-30-features-code-first.aspx" target="_blank">Contour code first feature</a> is if it’s possible to use custom fieldtypes.</p>
<p>It sure is, take a look at the following example. Let’s say we want to use a fieldtype from the <a href="http://our.umbraco.org/projects/developer-tools/contour-contrib" target="_blank">Contour Contrib project</a>.</p>
<p>First we’ll need to add a reference to the assembly containing the custom fieldtype we want to use</p>
<p><a href="http://www.nibble.be/wp-content/uploads/2012/12/image.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.nibble.be/wp-content/uploads/2012/12/image-thumb.png" width="298" height="165" /></a></p>
<p>Once that is in place we can simply set the type of field to the type of the fieldtype you wish to use</p>
<div class="csharpcode">
<pre class="alt">[Field(<span class="str">&quot;Leave a comment&quot;</span>, <span class="str">&quot;Your comment&quot;</span>,</pre>
<pre>           Mandatory = <span class="kwrd">true</span>,</pre>
<pre class="alt">           Type = <span class="kwrd">typeof</span>(Contour.Contrib.FieldTypes.ReCaptcha))]</pre>
<pre>        <span class="kwrd">public</span> <span class="kwrd">string</span> Captcha { get; set; }</pre>
</div>
<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<p>And that’s basically it!</p>
<p>If the custom fieldtype has additional settings you can also provide a value for those with the following syntax</p>
<div class="csharpcode">
<pre class="alt"> [Field(<span class="str">&quot;Leave a comment&quot;</span>, <span class="str">&quot;Your comment&quot;</span>, </pre>
<pre>           <span class="str">&quot;Language:en&quot;</span>,<span class="str">&quot;Theme:clean&quot;</span>,</pre>
<pre class="alt">           Mandatory = <span class="kwrd">true</span>,</pre>
<pre>           Type = <span class="kwrd">typeof</span>(Contour.Contrib.FieldTypes.ReCaptcha))]</pre>
<pre class="alt">        <span class="kwrd">public</span> <span class="kwrd">string</span> Captcha { get; set; }</pre>
</div>
<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<p>&#160;</p>
<p>Of course to deploy this we’ll need to deploy the necessary references (like contour contrib and recaptcha in this case) to your umbraco site.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nibble.be/?feed=rss2&amp;p=220</wfw:commentRss>
		</item>
		<item>
		<title>Extending Contour, multilingual countries prevalue source</title>
		<link>http://www.nibble.be/?p=217</link>
		<comments>http://www.nibble.be/?p=217#comments</comments>
		<pubDate>Fri, 30 Nov 2012 10:00:25 +0000</pubDate>
		<dc:creator>Tim Geyssens</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.nibble.be/?p=217</guid>
		<description><![CDATA[A question that got my attention this week is what would be the best way to add a multilingual list of countries to a Contour form.

So this post explains how you can extend contour with a custom prevalue source type
The data
Of course we need the multilingual data, after some research I found the Unicode Common [...]]]></description>
			<content:encoded><![CDATA[<p>A question that got my attention this week is what would be the best way to add a multilingual list of countries to a Contour form.</p>
<p><a href="http://www.nibble.be/wp-content/uploads/2012/11/contourcountries.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="ContourCountries" border="0" alt="ContourCountries" src="http://www.nibble.be/wp-content/uploads/2012/11/contourcountries-thumb.png" width="507" height="365" /></a></p>
<p>So this post explains how you can extend contour with a custom prevalue source type</p>
<h2>The data</h2>
<p>Of course we need the multilingual data, after some research I found the Unicode Common Locale Data Repository <a title="http://cldr.unicode.org/" href="http://cldr.unicode.org/">http://cldr.unicode.org/</a> it’s basically a collection of xml files with locale data, including a list a countries</p>
<h2>The Code</h2>
<p>The code is pretty simply it just uses the current culture the fetch the correct xml file (falling back to English if a culture xml isn’t found) and then it loops trough the territory nodes found in the xml.</p>
<div class="csharpcode">
<pre class="alt"><span class="kwrd">using</span> System;</pre>
<pre><span class="kwrd">using</span> System.Collections.Generic;</pre>
<pre class="alt"><span class="kwrd">using</span> System.Globalization;</pre>
<pre><span class="kwrd">using</span> System.IO;</pre>
<pre class="alt"><span class="kwrd">using</span> System.Linq;</pre>
<pre><span class="kwrd">using</span> System.Web;</pre>
<pre class="alt"><span class="kwrd">using</span> System.Xml;</pre>
<pre><span class="kwrd">using</span> Umbraco.Forms.Core;</pre>
<pre class="alt">&#160;</pre>
<pre><span class="kwrd">namespace</span> Contour.Addons.Countries</pre>
<pre class="alt">{</pre>
<pre>    <span class="kwrd">public</span> <span class="kwrd">class</span> PrevalueSource : FieldPreValueSourceType </pre>
<pre class="alt">    {</pre>
<pre>        <span class="kwrd">public</span> PrevalueSource()</pre>
<pre class="alt">        {</pre>
<pre>            <span class="kwrd">this</span>.Id = <span class="kwrd">new</span> Guid(<span class="str">&quot;9ED6C6D7-16A7-4087-A75D-B936D6FAE5A9&quot;</span>);</pre>
<pre class="alt">            <span class="kwrd">this</span>.Name = <span class="str">&quot;List of countries&quot;</span>;</pre>
<pre>            <span class="kwrd">this</span>.Description = <span class="str">&quot;Multilingual list of countries (http://unicode.org/ files need to be in /app_data/countrydata/)&quot;</span>;</pre>
<pre class="alt">        }</pre>
<pre>&#160;</pre>
<pre class="alt">        <span class="kwrd">public</span> <span class="kwrd">override</span> List&lt;Exception&gt; ValidateSettings()</pre>
<pre>        {</pre>
<pre class="alt">            var ex = <span class="kwrd">new</span> List&lt;Exception&gt;();</pre>
<pre>&#160;</pre>
<pre class="alt">            <span class="kwrd">if</span> (!File.Exists(HttpContext.Current.Server.MapPath(<span class="str">&quot;/App_Data/CountryData/common/main/en.xml&quot;</span>)))</pre>
<pre>                ex.Add(<span class="kwrd">new</span> Exception(<span class="str">&quot;Unicode Common Locale Data Repository not found, please download from http://cldr.unicode.org and place in /app_data/countrydata/ directory&quot;</span>));</pre>
<pre class="alt">            </pre>
<pre>            <span class="kwrd">return</span> ex;</pre>
<pre class="alt">        }</pre>
<pre>&#160;</pre>
<pre class="alt">        <span class="kwrd">public</span> <span class="kwrd">override</span> List&lt;PreValue&gt; GetPreValues(Field field)</pre>
<pre>        {</pre>
<pre class="alt">            var pvs = <span class="kwrd">new</span> List&lt;PreValue&gt;();</pre>
<pre>&#160;</pre>
<pre class="alt">            var d = <span class="kwrd">new</span> XmlDocument();</pre>
<pre>            <span class="kwrd">if</span> (File.Exists(HttpContext.Current.Server.MapPath(</pre>
<pre class="alt">                <span class="kwrd">string</span>.Format(<span class="str">&quot;/App_Data/CountryData/common/main/{0}.xml&quot;</span>,</pre>
<pre>                              CultureInfo.CurrentCulture.TwoLetterISOLanguageName))))</pre>
<pre class="alt">            {</pre>
<pre>                d.Load(HttpContext.Current.Server.MapPath(</pre>
<pre class="alt">                    <span class="kwrd">string</span>.Format(<span class="str">&quot;/App_Data/CountryData/common/main/{0}.xml&quot;</span>,</pre>
<pre>                                  CultureInfo.CurrentCulture.TwoLetterISOLanguageName)));</pre>
<pre class="alt">            }</pre>
<pre>            <span class="kwrd">else</span></pre>
<pre class="alt">            {</pre>
<pre>                d.Load(HttpContext.Current.Server.MapPath(</pre>
<pre class="alt">                  <span class="str">&quot;/App_Data/CountryData/common/main/en.xml&quot;</span>));</pre>
<pre>            }</pre>
<pre class="alt">&#160;</pre>
<pre>            var countries = <span class="kwrd">new</span> List&lt;KeyValuePair&lt;<span class="kwrd">string</span>, <span class="kwrd">string</span>&gt;&gt;();</pre>
<pre class="alt">            </pre>
<pre>            <span class="kwrd">foreach</span> (XmlNode c <span class="kwrd">in</span> d.SelectNodes(<span class="str">&quot;//territory [string-length(string(@type)) &lt; 3]&quot;</span>))</pre>
<pre class="alt">                countries.Add(<span class="kwrd">new</span> KeyValuePair&lt;<span class="kwrd">string</span>, <span class="kwrd">string</span>&gt;(c.Attributes[<span class="str">&quot;type&quot;</span>].Value, c.InnerText));</pre>
<pre>&#160;</pre>
<pre class="alt">            countries.Sort((firstPair, nextPair) =&gt; String.Compare(firstPair.Value, nextPair.Value, StringComparison.Ordinal));</pre>
<pre>&#160;</pre>
<pre class="alt">            <span class="kwrd">int</span> sort = 0;</pre>
<pre>            <span class="kwrd">foreach</span> (var c <span class="kwrd">in</span> countries)</pre>
<pre class="alt">            {</pre>
<pre>                PreValue pv = <span class="kwrd">new</span> PreValue();</pre>
<pre class="alt">                pv.Id = c.Key;</pre>
<pre>                pv.Value = c.Value;</pre>
<pre class="alt">                <span class="kwrd">if</span> (field != <span class="kwrd">null</span>)</pre>
<pre>                    pv.Field = field.Id;</pre>
<pre class="alt">                pv.SortOrder = sort;</pre>
<pre>                pvs.Add(pv);</pre>
<pre class="alt">&#160;</pre>
<pre>                sort++;</pre>
<pre class="alt">            }</pre>
<pre>&#160;</pre>
<pre class="alt">            <span class="kwrd">return</span> pvs;</pre>
<pre>        }</pre>
<pre class="alt">&#160;</pre>
<pre>    }</pre>
<pre class="alt">}</pre>
</div>
<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<p>&#160;</p>
<p>Code is available on bitbucket <a title="https://bitbucket.org/starfighter83/contour.addons.country" href="https://bitbucket.org/starfighter83/contour.addons.country">https://bitbucket.org/starfighter83/contour.addons.country</a></p>
<h2>The package</h2>
<p>The countries prevalue source is available as a package and can be used on your current Contour projects <a title="http://our.umbraco.org/projects/backoffice-extensions/contour-countries" href="http://our.umbraco.org/projects/backoffice-extensions/contour-countries">http://our.umbraco.org/projects/backoffice-extensions/contour-countries</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nibble.be/?feed=rss2&amp;p=217</wfw:commentRss>
		</item>
		<item>
		<title>Contour 3.0 Code First, Member registration, profile, login, change password</title>
		<link>http://www.nibble.be/?p=205</link>
		<comments>http://www.nibble.be/?p=205#comments</comments>
		<pubDate>Fri, 09 Nov 2012 10:25:26 +0000</pubDate>
		<dc:creator>Tim Geyssens</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.nibble.be/?p=205</guid>
		<description><![CDATA[The upcoming Contour 3.0 release features a new code first framework that is outlined in this post on umbraco.com
To add some more examples I’ve updated the example with some additional member forms:
Profile form

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd [...]]]></description>
			<content:encoded><![CDATA[<p>The upcoming <a href="http://umbraco.com/follow-us/blog-archive/2012/11/6/contour-30-beta.aspx" target="_blank">Contour 3.0</a> release features a new code first framework that is outlined in this <a href="http://umbraco.com/follow-us/blog-archive/2012/11/6/contour-30-features-code-first.aspx" target="_blank">post on umbraco.com</a></p>
<p>To add some more examples I’ve updated the example with some additional member forms:</p>
<h2>Profile form</h2>
<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<div class="csharpcode">
<pre class="alt"><span class="kwrd">using</span> System;</pre>
<pre><span class="kwrd">using</span> System.Collections.Generic;</pre>
<pre class="alt"><span class="kwrd">using</span> Umbraco.Forms.CodeFirst;</pre>
<pre><span class="kwrd">using</span> Umbraco.Forms.Core.Providers.FieldTypes;</pre>
<pre class="alt"><span class="kwrd">using</span> umbraco.cms.businesslogic.member;</pre>
<pre>&#160;</pre>
<pre class="alt"><span class="kwrd">namespace</span> Contour.CodeFirstExample</pre>
<pre>{</pre>
<pre class="alt">    [Form(<span class="str">&quot;Member/Profile&quot;</span>, ShowValidationSummary = <span class="kwrd">true</span>, MessageOnSubmit = <span class="str">&quot;Profile updated!&quot;</span>)]</pre>
<pre>    <span class="kwrd">public</span> <span class="kwrd">class</span> Profile: FormBase</pre>
<pre class="alt">    {</pre>
<pre>        [Field(<span class="str">&quot;Profile&quot;</span>, FormFieldsets.Details,</pre>
<pre class="alt">            Mandatory = <span class="kwrd">true</span>,</pre>
<pre>            DefaultValue = <span class="str">&quot;{member.name}&quot;</span>)]</pre>
<pre class="alt">        <span class="kwrd">public</span> <span class="kwrd">string</span> Name { get; set; }</pre>
<pre>&#160;</pre>
<pre class="alt">        [Field(<span class="str">&quot;Profile&quot;</span>, FormFieldsets.Details,</pre>
<pre>            Mandatory = <span class="kwrd">true</span>,</pre>
<pre class="alt">            Regex = <span class="str">@&quot;(\w[-._\w]*\w@\w[-._\w]*\w\.\w{2,3})&quot;</span>,</pre>
<pre>            DefaultValue = <span class="str">&quot;{member.email}&quot;</span>)]</pre>
<pre class="alt">        <span class="kwrd">public</span> <span class="kwrd">string</span> Email { get; set; }</pre>
<pre>&#160;</pre>
<pre class="alt">        [Field(<span class="str">&quot;Profile&quot;</span>, FormFieldsets.Details,</pre>
<pre>            Type = <span class="kwrd">typeof</span>(FileUpload),</pre>
<pre class="alt">            DefaultValue = <span class="str">&quot;{member.avatar}&quot;</span>)]</pre>
<pre>        <span class="kwrd">public</span> <span class="kwrd">string</span> Avatar { get; set; }</pre>
<pre class="alt">&#160;</pre>
<pre>        <span class="kwrd">public</span> <span class="kwrd">override</span> IEnumerable&lt;Exception&gt; Validate()</pre>
<pre class="alt">        {</pre>
<pre>            var e = <span class="kwrd">new</span> List&lt;Exception&gt;();</pre>
<pre class="alt">&#160;</pre>
<pre>            var m = Member.GetCurrentMember();</pre>
<pre class="alt">&#160;</pre>
<pre>            <span class="kwrd">if</span> (m != <span class="kwrd">null</span>)</pre>
<pre class="alt">            {</pre>
<pre>                <span class="kwrd">if</span> (m.Email != Email)</pre>
<pre class="alt">                {</pre>
<pre>                    <span class="kwrd">if</span> (Member.GetMemberFromLoginName(Email) != <span class="kwrd">null</span>)</pre>
<pre class="alt">                        e.Add(<span class="kwrd">new</span> Exception(<span class="str">&quot;Email already in use&quot;</span>));</pre>
<pre>                }</pre>
<pre class="alt">            }</pre>
<pre>&#160;</pre>
<pre class="alt">            <span class="kwrd">return</span> e;</pre>
<pre>&#160;</pre>
<pre class="alt">        }</pre>
<pre>&#160;</pre>
<pre class="alt">        <span class="kwrd">public</span> <span class="kwrd">override</span> <span class="kwrd">void</span> Submit()</pre>
<pre>        {</pre>
<pre class="alt">            var m = Member.GetCurrentMember();</pre>
<pre>&#160;</pre>
<pre class="alt">            <span class="kwrd">if</span> (m != <span class="kwrd">null</span>)</pre>
<pre>            {</pre>
<pre class="alt">                m.Email = Email;</pre>
<pre>                m.LoginName = Email;</pre>
<pre class="alt">                m.Text = Name;</pre>
<pre>                <span class="rem">//asign custom properties</span></pre>
<pre class="alt">                <span class="kwrd">if</span> (!<span class="kwrd">string</span>.IsNullOrEmpty(Avatar))</pre>
<pre>                    m.getProperty(<span class="str">&quot;avatar&quot;</span>).Value = Avatar;</pre>
<pre class="alt">            }</pre>
<pre>        }</pre>
<pre class="alt">    }</pre>
<pre>}</pre>
</div>
<style type="text/css">
<p>.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<h2>&#160;</h2>
<h2>Change password form</h2>
<div class="csharpcode">
<pre class="alt"><span class="kwrd">using</span> System;</pre>
<pre><span class="kwrd">using</span> System.Collections.Generic;</pre>
<pre class="alt"><span class="kwrd">using</span> Umbraco.Forms.CodeFirst;</pre>
<pre><span class="kwrd">using</span> Umbraco.Forms.Core.Providers.FieldTypes;</pre>
<pre class="alt"><span class="kwrd">using</span> umbraco.cms.businesslogic.member;</pre>
<pre>&#160;</pre>
<pre class="alt"><span class="kwrd">namespace</span> Contour.CodeFirstExample</pre>
<pre>{</pre>
<pre class="alt">    [Form(<span class="str">&quot;Member/Change password&quot;</span>, ShowValidationSummary = <span class="kwrd">true</span>, MessageOnSubmit = <span class="str">&quot;Password updated!&quot;</span>)]</pre>
<pre>    <span class="kwrd">public</span> <span class="kwrd">class</span> ChangePassword: FormBase</pre>
<pre class="alt">    {</pre>
<pre>        [Field(<span class="str">&quot;Change password&quot;</span>, <span class="str">&quot;&quot;</span>,</pre>
<pre class="alt">            Type = <span class="kwrd">typeof</span>(Password),</pre>
<pre>            Mandatory = <span class="kwrd">true</span>)]</pre>
<pre class="alt">        <span class="kwrd">public</span> <span class="kwrd">string</span> Password { get; set; }</pre>
<pre>&#160;</pre>
<pre class="alt">        [Field(<span class="str">&quot;Change password&quot;</span>, <span class="str">&quot;&quot;</span>,</pre>
<pre>            Type = <span class="kwrd">typeof</span>(Password),</pre>
<pre class="alt">            Mandatory = <span class="kwrd">true</span>)]</pre>
<pre>        <span class="kwrd">public</span> <span class="kwrd">string</span> RepeatPassword { get; set; }</pre>
<pre class="alt">&#160;</pre>
<pre>        <span class="kwrd">public</span> <span class="kwrd">override</span> IEnumerable&lt;Exception&gt; Validate()</pre>
<pre class="alt">        {</pre>
<pre>            var e = <span class="kwrd">new</span> List&lt;Exception&gt;();</pre>
<pre class="alt">         </pre>
<pre>            <span class="rem">//makes sure the passwords are identical</span></pre>
<pre class="alt">            <span class="kwrd">if</span> (Password != RepeatPassword)</pre>
<pre>                e.Add(<span class="kwrd">new</span> Exception(<span class="str">&quot;Passwords must match&quot;</span>));</pre>
<pre class="alt">&#160;</pre>
<pre>            <span class="kwrd">return</span> e;</pre>
<pre class="alt">        }</pre>
<pre>&#160;</pre>
<pre class="alt">        <span class="kwrd">public</span> <span class="kwrd">override</span> <span class="kwrd">void</span> Submit()</pre>
<pre>        {</pre>
<pre class="alt">            var m = Member.GetCurrentMember();</pre>
<pre>&#160;</pre>
<pre class="alt">            <span class="kwrd">if</span>(m != <span class="kwrd">null</span>)</pre>
<pre>                m.Password = Password;</pre>
<pre class="alt">        }</pre>
<pre>    }</pre>
<pre class="alt">}</pre>
</div>
<style type="text/css">
<p>.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<h2>&#160;</h2>
<h2>Login form</h2>
<div class="csharpcode">
<pre class="alt"><span class="kwrd">using</span> System;</pre>
<pre><span class="kwrd">using</span> System.Collections.Generic;</pre>
<pre class="alt"><span class="kwrd">using</span> Umbraco.Forms.CodeFirst;</pre>
<pre><span class="kwrd">using</span> Umbraco.Forms.Core.Providers.FieldTypes;</pre>
<pre class="alt"><span class="kwrd">using</span> umbraco.cms.businesslogic.member;</pre>
<pre>&#160;</pre>
<pre class="alt"><span class="kwrd">namespace</span> Contour.CodeFirstExample</pre>
<pre>{</pre>
<pre class="alt">    [Form(<span class="str">&quot;Member/Login&quot;</span>, ShowValidationSummary = <span class="kwrd">true</span>, MessageOnSubmit =<span class="str">&quot;You are now logged in&quot;</span>)]</pre>
<pre>    <span class="kwrd">public</span> <span class="kwrd">class</span> Login: FormBase</pre>
<pre class="alt">    {</pre>
<pre>        [Field(<span class="str">&quot;Login&quot;</span>, <span class="str">&quot;&quot;</span>,</pre>
<pre class="alt">           Mandatory = <span class="kwrd">true</span>,</pre>
<pre>           Regex = <span class="str">@&quot;(\w[-._\w]*\w@\w[-._\w]*\w\.\w{2,3})&quot;</span>)]</pre>
<pre class="alt">        <span class="kwrd">public</span> <span class="kwrd">string</span> Email { get; set; }</pre>
<pre>&#160;</pre>
<pre class="alt">        [Field(<span class="str">&quot;Login&quot;</span>, <span class="str">&quot;&quot;</span>,</pre>
<pre>            Type = <span class="kwrd">typeof</span>(Password),</pre>
<pre class="alt">            Mandatory = <span class="kwrd">true</span>)]</pre>
<pre>        <span class="kwrd">public</span> <span class="kwrd">string</span> Password { get; set; }</pre>
<pre class="alt">&#160;</pre>
<pre>&#160;</pre>
<pre class="alt">        <span class="kwrd">public</span> <span class="kwrd">override</span> IEnumerable&lt;Exception&gt; Validate()</pre>
<pre>        {</pre>
<pre class="alt">            var e = <span class="kwrd">new</span> List&lt;Exception&gt;();</pre>
<pre>&#160;</pre>
<pre class="alt">            <span class="kwrd">if</span>(Member.GetMemberFromLoginName(Email) == <span class="kwrd">null</span>)</pre>
<pre>                e.Add(<span class="kwrd">new</span> Exception(<span class="str">&quot;No member found with that email address&quot;</span>));</pre>
<pre class="alt">            <span class="kwrd">else</span> <span class="kwrd">if</span> (Member.GetMemberFromLoginNameAndPassword(Email, Password) == <span class="kwrd">null</span>)</pre>
<pre>                e.Add(<span class="kwrd">new</span> Exception(<span class="str">&quot;Incorrect password&quot;</span>));</pre>
<pre class="alt">&#160;</pre>
<pre>            <span class="kwrd">return</span> e;</pre>
<pre class="alt">        }</pre>
<pre>&#160;</pre>
<pre class="alt">        <span class="kwrd">public</span> <span class="kwrd">override</span> <span class="kwrd">void</span> Submit()</pre>
<pre>        {</pre>
<pre class="alt">           var m = Member.GetMemberFromLoginNameAndPassword(Email, Password);</pre>
<pre>           <span class="kwrd">if</span> (m != <span class="kwrd">null</span>)</pre>
<pre class="alt">               Member.AddMemberToCache(m);</pre>
<pre>        }</pre>
<pre class="alt">    }</pre>
<pre>}</pre>
</div>
<style type="text/css">
<p>.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<h2>&#160;</h2>
<h2>Registration form</h2>
<div class="csharpcode">
<pre class="alt"><span class="kwrd">using</span> System;</pre>
<pre><span class="kwrd">using</span> System.Collections.Generic;</pre>
<pre class="alt"><span class="kwrd">using</span> Umbraco.Forms.CodeFirst;</pre>
<pre><span class="kwrd">using</span> umbraco.cms.businesslogic.member;</pre>
<pre class="alt"><span class="kwrd">using</span> umbraco.BusinessLogic;</pre>
<pre><span class="kwrd">using</span> Umbraco.Forms.Core.Providers.FieldTypes;</pre>
<pre class="alt">&#160;</pre>
<pre><span class="kwrd">namespace</span> Contour.CodeFirstExample</pre>
<pre class="alt">{</pre>
<pre>    </pre>
<pre class="alt">    <span class="kwrd">public</span> <span class="kwrd">enum</span> FormPages</pre>
<pre>    {</pre>
<pre class="alt">        Registration</pre>
<pre>    }</pre>
<pre class="alt">&#160;</pre>
<pre>    <span class="kwrd">public</span> <span class="kwrd">enum</span> FormFieldsets</pre>
<pre class="alt">    {</pre>
<pre>        Details</pre>
<pre class="alt">    }</pre>
<pre>&#160;</pre>
<pre class="alt">    [Form(<span class="str">&quot;Member/Registration&quot;</span>, ShowValidationSummary = <span class="kwrd">true</span>, MessageOnSubmit=<span class="str">&quot;You are now registered!&quot;</span>)]</pre>
<pre>    <span class="kwrd">public</span> <span class="kwrd">class</span> Registration: FormBase</pre>
<pre class="alt">    {</pre>
<pre>        <span class="kwrd">public</span> <span class="kwrd">const</span> <span class="kwrd">string</span> MemberTypeAlias = <span class="str">&quot;Member&quot;</span>;</pre>
<pre class="alt">        <span class="kwrd">public</span> <span class="kwrd">const</span> <span class="kwrd">string</span> MemberGroupName = <span class="str">&quot;Authenticated&quot;</span>;</pre>
<pre>&#160;</pre>
<pre class="alt">        [Field(FormPages.Registration,FormFieldsets.Details,</pre>
<pre>            Mandatory= <span class="kwrd">true</span>)]</pre>
<pre class="alt">        <span class="kwrd">public</span> <span class="kwrd">string</span> Name { get; set; }</pre>
<pre>&#160;</pre>
<pre class="alt">        [Field(FormPages.Registration, FormFieldsets.Details,</pre>
<pre>            Mandatory = <span class="kwrd">true</span>,</pre>
<pre class="alt">            Regex = <span class="str">@&quot;(\w[-._\w]*\w@\w[-._\w]*\w\.\w{2,3})&quot;</span>)]</pre>
<pre>        <span class="kwrd">public</span> <span class="kwrd">string</span> Email { get; set; }</pre>
<pre class="alt">&#160;</pre>
<pre>        [Field(FormPages.Registration, FormFieldsets.Details, </pre>
<pre class="alt">            Type = <span class="kwrd">typeof</span>(Password),</pre>
<pre>            Mandatory = <span class="kwrd">true</span>)]</pre>
<pre class="alt">        <span class="kwrd">public</span> <span class="kwrd">string</span> Password { get; set; }</pre>
<pre>&#160;</pre>
<pre class="alt">        [Field(FormPages.Registration, FormFieldsets.Details, </pre>
<pre>            Type = <span class="kwrd">typeof</span>(Password),</pre>
<pre class="alt">            Mandatory = <span class="kwrd">true</span>)]</pre>
<pre>        <span class="kwrd">public</span> <span class="kwrd">string</span> RepeatPassword { get; set; }</pre>
<pre class="alt">&#160;</pre>
<pre>        [Field(FormPages.Registration, FormFieldsets.Details, </pre>
<pre class="alt">            Type = <span class="kwrd">typeof</span>(FileUpload))]</pre>
<pre>        <span class="kwrd">public</span> <span class="kwrd">string</span> Avatar { get; set; }</pre>
<pre class="alt">&#160;</pre>
<pre>        <span class="kwrd">public</span> <span class="kwrd">override</span> IEnumerable&lt;Exception&gt; Validate()</pre>
<pre class="alt">        {</pre>
<pre>            var e = <span class="kwrd">new</span> List&lt;Exception&gt;();</pre>
<pre class="alt">            <span class="rem">//checks if email isn&#8217;t in use</span></pre>
<pre>            <span class="kwrd">if</span>(Member.GetMemberFromLoginName(Email) != <span class="kwrd">null</span>)</pre>
<pre class="alt">                e.Add(<span class="kwrd">new</span> Exception(<span class="str">&quot;Email already in use&quot;</span>));</pre>
<pre>            <span class="rem">//makes sure the passwords are identical</span></pre>
<pre class="alt">            <span class="kwrd">if</span> (Password != RepeatPassword)</pre>
<pre>                e.Add(<span class="kwrd">new</span> Exception(<span class="str">&quot;Passwords must match&quot;</span>));</pre>
<pre class="alt">&#160;</pre>
<pre>            <span class="kwrd">return</span> e;</pre>
<pre class="alt">        }</pre>
<pre>        <span class="kwrd">public</span> <span class="kwrd">override</span> <span class="kwrd">void</span> Submit()</pre>
<pre class="alt">        {</pre>
<pre>            <span class="rem">//get a membertype by its alias</span></pre>
<pre class="alt">            var mt = MemberType.GetByAlias(MemberTypeAlias); <span class="rem">//needs to be an existing membertype</span></pre>
<pre>            <span class="rem">//get the user(0)</span></pre>
<pre class="alt">            var user = <span class="kwrd">new</span> User(0);</pre>
<pre>            <span class="rem">//create a new member with Member.MakeNew</span></pre>
<pre class="alt">            var member = Member.MakeNew(Name, mt, user);</pre>
<pre>            <span class="rem">//assign email, password and loginname</span></pre>
<pre class="alt">            member.Email = Email;</pre>
<pre>            member.Password = Password;</pre>
<pre class="alt">            member.LoginName = Email;</pre>
<pre>            <span class="rem">//asign custom properties</span></pre>
<pre class="alt">            <span class="kwrd">if</span>(!<span class="kwrd">string</span>.IsNullOrEmpty(Avatar))</pre>
<pre>                member.getProperty(<span class="str">&quot;avatar&quot;</span>).Value = Avatar;</pre>
<pre class="alt">            <span class="rem">//asssign a group, get the group by name, and assign its Id</span></pre>
<pre>            var group = MemberGroup.GetByName(MemberGroupName); <span class="rem">//needs to be an existing MemberGroup</span></pre>
<pre class="alt">            member.AddGroup(group.Id);</pre>
<pre>            <span class="rem">//generate the member xml with .XmlGenerate</span></pre>
<pre class="alt">            member.XmlGenerate(<span class="kwrd">new</span> System.Xml.XmlDocument());</pre>
<pre>            <span class="rem">//add the member to the website cache to log the member in</span></pre>
<pre class="alt">            Member.AddMemberToCache(member);</pre>
<pre>            </pre>
<pre class="alt">        }</pre>
<pre>    }</pre>
<pre class="alt">}</pre>
</div>
<style type="text/css">
<p>.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
</p>
<p>The code assumes there is a membertype called Member with a additional property with the alias avatar and a membergroup called Authenticated</p>
<p>For more member properties the code needs to be updated…</p>
<p>After deploying you should end up with the following forms</p>
<p><a href="http://www.nibble.be/wp-content/uploads/2012/11/image.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.nibble.be/wp-content/uploads/2012/11/image-thumb.png" width="240" height="181" /></a></p>
<p><a href="https://bitbucket.org/starfighter83/contour.codefirstexample" target="_blank">Full sourcecode is available here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nibble.be/?feed=rss2&amp;p=205</wfw:commentRss>
		</item>
		<item>
		<title>Restricted Upload datatype for Umbraco</title>
		<link>http://www.nibble.be/?p=202</link>
		<comments>http://www.nibble.be/?p=202#comments</comments>
		<pubDate>Fri, 02 Nov 2012 09:26:00 +0000</pubDate>
		<dc:creator>Tim Geyssens</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.nibble.be/?p=202</guid>
		<description><![CDATA[Another friday another project  , this time an improved upload datatype that will allow you to restrict the upload for your content editor.
The settings will allow you to provide a maximum file size (in KB) and the allowed file extension(s)

When the file isn’t valid the editor will get a notification

That’s it 
 
The package [...]]]></description>
			<content:encoded><![CDATA[<p>Another friday another project <img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://www.nibble.be/wp-content/uploads/2012/10/wlemoticon-smile2.png" /> , this time an improved upload datatype that will allow you to restrict the upload for your content editor.</p>
<p>The settings will allow you to provide a maximum file size (in KB) and the allowed file extension(s)</p>
<p><a href="http://www.nibble.be/wp-content/uploads/2012/10/image2.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.nibble.be/wp-content/uploads/2012/10/image-thumb2.png" width="537" height="188" /></a></p>
<p>When the file isn’t valid the editor will get a notification</p>
<p><a href="http://www.nibble.be/wp-content/uploads/2012/10/image3.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.nibble.be/wp-content/uploads/2012/10/image-thumb3.png" width="533" height="89" /></a></p>
<p>That’s it <img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://www.nibble.be/wp-content/uploads/2012/10/wlemoticon-smile2.png" /></p>
<p> <iframe height="396" src="http://www.screenr.com/embed/iAs7" frameborder="0" width="650"></iframe>
<p>The package is available on <a href="http://our.umbraco.org/projects/backoffice-extensions/restricted-upload">our.umbraco.org</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nibble.be/?feed=rss2&amp;p=202</wfw:commentRss>
		</item>
		<item>
		<title>Embedding third party media in Umbraco</title>
		<link>http://www.nibble.be/?p=196</link>
		<comments>http://www.nibble.be/?p=196#comments</comments>
		<pubDate>Wed, 24 Oct 2012 08:38:10 +0000</pubDate>
		<dc:creator>Tim Geyssens</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.nibble.be/?p=196</guid>
		<description><![CDATA[Since Umbraco v4.9 embedding third party media in the RTE has gotten a lot easier, it’ just a matter of supplying the Url to the video/image/sound/poll/… you want to add setting the size and hitting insert!

This is done by making use of the oembed format so every site that support the format can be supported [...]]]></description>
			<content:encoded><![CDATA[<p>Since <a href="http://umbraco.codeplex.com/releases/view/94118">Umbraco v4.9</a> embedding third party media in the RTE has gotten a lot easier, it’ just a matter of supplying the Url to the video/image/sound/poll/… you want to add setting the size and hitting insert!</p>
<p><a href="http://www.nibble.be/wp-content/uploads/2012/10/image1.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.nibble.be/wp-content/uploads/2012/10/image-thumb1.png" width="612" height="437" /></a></p>
<p>This is done by making use of the <a href="http://oembed.com/">oembed format</a> so every site that support the format can be supported by the dialog in a minute&#160; (if it isn’t already) <img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://www.nibble.be/wp-content/uploads/2012/10/wlemoticon-smile1.png" /></p>
<p>All this is setup in the new config file /config/EmbeddedMedia.config, for each supported third party site there is an entry in the config file</p>
<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<div class="csharpcode">
<pre class="alt">  &lt;!-- Youtube Settings --&gt;</pre>
<pre>  &lt;provider name=<span class="str">&quot;Youtube&quot;</span> type=<span class="str">&quot;Umbraco.Web.Media.EmbedProviders.OEmbedVideo, umbraco&quot;</span>&gt;</pre>
<pre class="alt">    &lt;urlShemeRegex&gt;&lt;![CDATA[youtu(?:\.be|be\.com)/(?:(.*)v(/|=)|(.*/)?)([a-zA-Z0-9-_]+)]]&gt;&lt;/urlShemeRegex&gt;</pre>
<pre>    &lt;apiEndpoint&gt;&lt;![CDATA[http:<span class="rem">//www.youtube.com/oembed]]&gt;&lt;/apiEndpoint&gt;</span></pre>
<pre class="alt">    &lt;requestParams type=<span class="str">&quot;Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco&quot;</span>&gt;</pre>
<pre>      &lt;param name=<span class="str">&quot;iframe&quot;</span>&gt;1&lt;/param&gt;</pre>
<pre class="alt">      &lt;param name=<span class="str">&quot;format&quot;</span>&gt;xml&lt;/param&gt;</pre>
<pre>    &lt;/requestParams&gt;</pre>
<pre class="alt">  &lt;/provider&gt;</pre>
</div>
<style type="text/css">
<p>.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<p>The provider that needs to be used (most of the time it’s oembed), a regex that will match the supported urls, the api endpount for the oembed stuff and some optional request params if needed.</p>
<p>So if a third party site supports oembed and isn’t supported by the insert third party media dialog yet it’s just a case if adding an entry to the config file</p>
<p>But the implementation isn’t fixed to oembed it’s also possible to plug in custom providers that don’t make use of the oembed format</p>
<p>Look at the following entry for twitgoo</p>
<div class="csharpcode">
<pre class="alt">  &lt;!-- Twitgoo Settings , not an OEmbed one --&gt;</pre>
<pre>  &lt;provider name=<span class="str">&quot;Twitgoo&quot;</span> type=<span class="str">&quot;Umbraco.Web.Media.EmbedProviders.Twitgoo, umbraco&quot;</span>&gt;</pre>
<pre class="alt">    &lt;urlShemeRegex&gt;&lt;![CDATA[twitgoo\.com/]]&gt;&lt;/urlShemeRegex&gt;</pre>
<pre>  &lt;/provider&gt;</pre>
</div>
<style type="text/css">
<p>.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<p>That makes use of a custom provider that looks like</p>
<div class="csharpcode">
<pre class="alt"><span class="kwrd">using</span> HtmlAgilityPack;</pre>
<pre>&#160;</pre>
<pre class="alt"><span class="kwrd">namespace</span> Umbraco.Web.Media.EmbedProviders</pre>
<pre>{</pre>
<pre class="alt">    <span class="kwrd">public</span> <span class="kwrd">class</span> Twitgoo : AbstractProvider</pre>
<pre>    {</pre>
<pre class="alt">        <span class="kwrd">public</span> <span class="kwrd">override</span> <span class="kwrd">bool</span> SupportsDimensions</pre>
<pre>        {</pre>
<pre class="alt">            get</pre>
<pre>            {</pre>
<pre class="alt">                <span class="kwrd">return</span> <span class="kwrd">false</span>;</pre>
<pre>            }</pre>
<pre class="alt">        }</pre>
<pre>&#160;</pre>
<pre class="alt">        <span class="kwrd">public</span> <span class="kwrd">override</span> <span class="kwrd">string</span> GetMarkup(<span class="kwrd">string</span> url, <span class="kwrd">int</span> maxWidth, <span class="kwrd">int</span> maxHeight)</pre>
<pre>        {</pre>
<pre class="alt">            var web = <span class="kwrd">new</span> HtmlWeb();</pre>
<pre>            var doc = web.Load(url);</pre>
<pre class="alt">&#160;</pre>
<pre>            var img = doc.DocumentNode.SelectSingleNode(<span class="str">&quot;//img [@id = &#8216;fullsize&#8217;]&quot;</span>).Attributes[<span class="str">&quot;src&quot;</span>];</pre>
<pre class="alt">&#160;</pre>
<pre>            <span class="kwrd">return</span> <span class="kwrd">string</span>.Format(<span class="str">&quot;&lt;img src=\&quot;{0}\&quot;/&gt;&quot;</span>,</pre>
<pre class="alt">               img.Value);</pre>
<pre>        }</pre>
<pre class="alt">    }</pre>
<pre>}</pre>
</div>
<style type="text/css">
<p>.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<p>Which will basically search for the element with id full-size and return an image using the src attribute of the full-size element found.</p>
<p>So you can also write your own providers for sites you wish to support <img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://www.nibble.be/wp-content/uploads/2012/10/wlemoticon-smile1.png" /></p>
<p><iframe height="396" src="http://www.screenr.com/embed/WLE8" frameborder="0" width="650"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nibble.be/?feed=rss2&amp;p=196</wfw:commentRss>
		</item>
		<item>
		<title>Create/Update COntour forms code first</title>
		<link>http://www.nibble.be/?p=192</link>
		<comments>http://www.nibble.be/?p=192#comments</comments>
		<pubDate>Fri, 19 Oct 2012 09:23:24 +0000</pubDate>
		<dc:creator>Tim Geyssens</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.nibble.be/?p=192</guid>
		<description><![CDATA[Another result of freedom Fridays at the Umbraco HQ, an addon for Umbraco Contour the official form builder that will allow you to create/update forms from code.
It’s heavily inspired by uSiteBuilder (they did all the hard work).
With this add-on you will be able to design your Contour forms from visual studio, here is a simple [...]]]></description>
			<content:encoded><![CDATA[<p>Another result of freedom Fridays at the <a href="http://umbraco.com/about-us/team.aspx">Umbraco HQ</a>, an addon for <a href="http://umbraco.com/products/more-add-ons/contour.aspx">Umbraco Contour</a> the official form builder that will allow you to create/update forms from code.</p>
<p>It’s heavily inspired by <a href="http://usitebuilder.vegaitsourcing.rs/">uSiteBuilder</a> (they did all the hard work).</p>
<p>With this add-on you will be able to design your Contour forms from visual studio, here is a simple example:</p>
<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<div class="csharpcode">
<pre class="alt">   <span class="kwrd">public</span> <span class="kwrd">enum</span> FormPages</pre>
<pre>    {</pre>
<pre class="alt">        Contact</pre>
<pre>    }</pre>
<pre class="alt">&#160;</pre>
<pre>    <span class="kwrd">public</span> <span class="kwrd">enum</span> FormFieldsets</pre>
<pre class="alt">    {</pre>
<pre>        Details</pre>
<pre class="alt">    }</pre>
<pre>&#160;</pre>
<pre class="alt">    [Form(<span class="str">&quot;Another Contact Form&quot;</span>, MessageOnSubmit = <span class="str">&quot;Thank you&quot;</span>)]</pre>
<pre>    <span class="kwrd">public</span> <span class="kwrd">class</span> AnotherContactForm : FormBase</pre>
<pre class="alt">    {</pre>
<pre>        [Field(FormPages.Contact, FormFieldsets.Details,</pre>
<pre class="alt">           Mandatory = <span class="kwrd">true</span>)]</pre>
<pre>        <span class="kwrd">public</span> <span class="kwrd">string</span> Name { get; set; }</pre>
<pre class="alt">&#160;</pre>
<pre>        [Field(FormPages.Contact, FormFieldsets.Details,</pre>
<pre class="alt">            Mandatory = <span class="kwrd">true</span>)]</pre>
<pre>        <span class="kwrd">public</span> <span class="kwrd">string</span> Email { get; set; }</pre>
<pre class="alt">&#160;</pre>
<pre>        [Field(FormPages.Contact, FormFieldsets.Details,</pre>
<pre class="alt">           Mandatory = <span class="kwrd">true</span>,</pre>
<pre>           Type = <span class="kwrd">typeof</span>(Umbraco.Forms.Core.Providers.FieldTypes.Textarea))]</pre>
<pre class="alt">        <span class="kwrd">public</span> <span class="kwrd">string</span> Message { get; set; }</pre>
<pre>&#160;</pre>
<pre class="alt">    }</pre>
</div>
<style type="text/css">
<p>.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<p>This code will result in the following form</p>
<p><a href="http://www.nibble.be/wp-content/uploads/2012/10/image.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.nibble.be/wp-content/uploads/2012/10/image-thumb.png" width="655" height="373" /></a></p>
<p>It’s also possible to attach third party functionality either by attaching workflows from code</p>
<div class="csharpcode">
<pre class="alt">        <span class="kwrd">public</span> <span class="kwrd">override</span> List&lt;WorkflowBase&gt; Workflows</pre>
<pre>        {</pre>
<pre class="alt">            get</pre>
<pre>            {</pre>
<pre class="alt">                <span class="kwrd">return</span> <span class="kwrd">new</span> List&lt;WorkflowBase&gt; {</pre>
<pre>                        <span class="kwrd">new</span> Email()</pre>
<pre class="alt">                    };</pre>
<pre>            }</pre>
<pre class="alt">        }</pre>
</div>
<style type="text/css">
<p>.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<p>With the email class being as follows</p>
<div class="csharpcode">
<pre class="alt">    [Workflow(<span class="str">&quot;Send Email&quot;</span>,FormState.Submitted)]</pre>
<pre>    <span class="kwrd">public</span> <span class="kwrd">class</span> Email: WorkflowBase</pre>
<pre class="alt">    {</pre>
<pre>&#160;</pre>
<pre class="alt">        <span class="kwrd">public</span> <span class="kwrd">override</span> WorkflowType Type</pre>
<pre>        {</pre>
<pre class="alt">            get</pre>
<pre>            {</pre>
<pre class="alt">                <span class="kwrd">return</span> <span class="kwrd">new</span> Umbraco.Forms.Core.Providers.WorkflowTypes.SendEmail</pre>
<pre>                    {</pre>
<pre class="alt">                        Email = <span class="str">&quot;test@test.com&quot;</span>,</pre>
<pre>                        Subject = <span class="str">&quot;the form Contact Form was submitted&quot;</span>,</pre>
<pre class="alt">                        Message = <span class="str">&quot;the form Contact Form was submitted, &quot;</span> +</pre>
<pre>                                    <span class="str">&quot;this is the list of values it contained, &quot;</span> +</pre>
<pre class="alt">                                    <span class="str">&quot;you can turn this email off under workflows in Umbraco Contour&quot;</span></pre>
<pre>                    };</pre>
<pre class="alt">            }</pre>
<pre>        }</pre>
<pre class="alt">    }</pre>
</div>
<style type="text/css">
<p>.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<p>Or by overriding the submit method (form class properties will be populated with the record values <img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://www.nibble.be/wp-content/uploads/2012/10/wlemoticon-smile.png" /> )</p>
<div class="csharpcode">
<pre class="alt">        <span class="kwrd">public</span> <span class="kwrd">override</span> <span class="kwrd">void</span> Submit()</pre>
<pre>        {</pre>
<pre class="alt">            </pre>
<pre>            umbraco.library.SendMail(</pre>
<pre class="alt">                Email,</pre>
<pre>                <span class="str">&quot;me@company.com&quot;</span>,</pre>
<pre class="alt">                <span class="str">&quot;New Contact&quot;</span>,</pre>
<pre>                <span class="kwrd">string</span>.Format(<span class="str">&quot;New message from {0} : {1}&quot;</span>,Name,Message),</pre>
<pre class="alt">                <span class="kwrd">false</span>);</pre>
<pre>        }</pre>
</div>
<style type="text/css">
<p>.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<p>The main advantages of this code first approach is that forms and workflows can be source controlled, support for unit testing, support for automated deployments, easy form maintenance through code…</p>
<p>The add-ons and some example forms are available on the project page at <a href="http://our.umbraco.org/projects/developer-tools/contour-code-first">our.umbraco.org</a></p>
<p>Full sourcecode is available <a href="https://bitbucket.org/starfighter83/contour.addons.codefirst">here</a></p>
<p>For a quick demo watch:</p>
<p><iframe height="396" src="http://www.screenr.com/embed/K1y8" frameborder="0" width="650"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nibble.be/?feed=rss2&amp;p=192</wfw:commentRss>
		</item>
		<item>
		<title>Look who&#8217;s editing now</title>
		<link>http://www.nibble.be/?p=188</link>
		<comments>http://www.nibble.be/?p=188#comments</comments>
		<pubDate>Fri, 05 Oct 2012 11:27:41 +0000</pubDate>
		<dc:creator>Tim Geyssens</dc:creator>
		
		<category><![CDATA[Package]]></category>

		<category><![CDATA[Umbraco]]></category>

		<guid isPermaLink="false">http://www.nibble.be/?p=188</guid>
		<description><![CDATA[As a result of freedom fridays at the umbraco HQ I’ve made a new little umbraco package.
Make sure your content editors don’t end up editing the same document and overwriting each others changes with this addon for umbraco.
In environments with multiple editors the editors will see in the umbraco content tree which documents are currently [...]]]></description>
			<content:encoded><![CDATA[<p>As a result of freedom fridays at the <a href="http://umbraco.com/about-us/team.aspx">umbraco HQ</a> I’ve made a new little umbraco package.</p>
<p>Make sure your content editors don’t end up editing the same document and overwriting each others changes with this addon for umbraco.</p>
<p>In environments with multiple editors the editors will see in the umbraco content tree which documents are currently being edited.</p>
<p><a href="http://www.nibble.be/wp-content/uploads/2012/10/tree.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Tree" border="0" alt="Tree" src="http://www.nibble.be/wp-content/uploads/2012/10/tree-thumb.png" width="192" height="144" /></a></p>
<p>Also on the content page there will be a notification when another editors are viewing/editing the same document.</p>
<p><a href="http://www.nibble.be/wp-content/uploads/2012/10/page.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Page" border="0" alt="Page" src="http://www.nibble.be/wp-content/uploads/2012/10/page-thumb.png" width="363" height="177" /></a></p>
<p>For a quick demo check out this video</p>
<p> <iframe height="396" src="http://www.screenr.com/embed/Pv58" frameborder="0" width="650"></iframe>
<p>&#160;</p>
<p>You can download the package on the project page at <a href="http://our.umbraco.org/projects/backoffice-extensions/look-who's-editing-now">http://our.umbraco.org/projects/backoffice-extensions/look-who&#8217;s-editing-now</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nibble.be/?feed=rss2&amp;p=188</wfw:commentRss>
		</item>
		<item>
		<title>Moving from Umbraco V4 to v5 : Installation</title>
		<link>http://www.nibble.be/?p=183</link>
		<comments>http://www.nibble.be/?p=183#comments</comments>
		<pubDate>Thu, 12 Apr 2012 13:45:10 +0000</pubDate>
		<dc:creator>Tim Geyssens</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.nibble.be/?p=183</guid>
		<description><![CDATA[First post in a hopefully large series on the differences and similarities between Umbraco v4 (webforms) and Umbraco v5 (MVC). So this assumes you’ve already used Umbraco v4 and are starting with Umbraco v5 (although it should also be valuable if you don’t have previous experience and just want to get started with Umbraco v5).
As [...]]]></description>
			<content:encoded><![CDATA[<p>First post in a hopefully large series on the differences and similarities between Umbraco v4 (webforms) and Umbraco v5 (MVC). So this assumes you’ve already used Umbraco v4 and are starting with Umbraco v5 (although it should also be valuable if you don’t have previous experience and just want to get started with Umbraco v5).</p>
<p>As an obvious first post we’ll take a look at the installation of Umbraco v5.</p>
<p>There are different ways to install Umbraco but here I’ll outline my preferred option, downloading the latest stable release from codeplex and using webmatrix to get up and running.</p>
<p>To get details on different installation methods( iis and web platform installer, nuget, visual studio template, manually, …) check out the <a href="http://our.umbraco.org/documentation/v501/Getting-Started/" target="_blank">getting started page</a> on the v5 documentation.</p>
<h2>Downloading</h2>
<p>You can always find the latest stable release on <a href="http://umbraco.codeplex.com/releases">http://umbraco.codeplex.com/releases</a>, at the time of this blogpost that’s Umbraco 5.0.1. So simply download the recommended download (the web application).</p>
<p><a href="http://www.nibble.be/wp-content/uploads/2012/04/image15.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.nibble.be/wp-content/uploads/2012/04/image-thumb15.png" width="300" height="189" /></a></p>
<p>There is also an option to get a nightly build (so a work in progress version) you can find those at <a href="http://nightly.umbraco.org/">http://nightly.umbraco.org/</a> (of course there is no guaranty that the version you’ll download will work 100% since it’s a current development version).</p>
<p>Once the download is successful you should end up with an archive if you unzip that you should have a file structure similar to the following screenshot.</p>
<p><a href="http://www.nibble.be/wp-content/uploads/2012/04/image16.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.nibble.be/wp-content/uploads/2012/04/image-thumb16.png" width="472" height="248" /></a></p>
<h2>Firing up </h2>
<p>Now to get Umbraco running I’ll be using WebMatrix, if you don’t have it installed you can get it at the following site <a href="http://www.microsoft.com/web/webmatrix/">http://www.microsoft.com/web/webmatrix/</a> (basically WebMatrix will make it easy to get up and running without having to worry about all the dependencies, you might have to install Umbraco once trough the <a href="http://our.umbraco.org/documentation/v501/Getting-Started/Installing-Umbraco-with-Web-Matrix" target="_blank">web gallery</a> to make sure the dependencies get installed).</p>
<p>WIth webmatrix installed I can simply fire it up and have it ready to run my site if I open the context menu on the Umbraco web application archive folder.</p>
<p><a href="http://www.nibble.be/wp-content/uploads/2012/04/image17.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.nibble.be/wp-content/uploads/2012/04/image-thumb17.png" width="529" height="120" /></a></p>
<p>After hitting the &#8216;”Open as a web site with Microsoft WebMatrix” option you should end up with an instance of WebMatrix that has the Umbraco site open (tree at the middle left should show you the files).</p>
<p><a href="http://www.nibble.be/wp-content/uploads/2012/04/image18.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.nibble.be/wp-content/uploads/2012/04/image-thumb18.png" width="529" height="276" /></a></p>
<p>So all that’s left is to hit the run button in the webmatrix toolbar.</p>
<p><a href="http://www.nibble.be/wp-content/uploads/2012/04/image19.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.nibble.be/wp-content/uploads/2012/04/image-thumb19.png" width="240" height="145" /></a></p>
<p>Webmatrix will open a new browser window or will add a new tab to an existing window and you should see the following</p>
<p><a href="http://www.nibble.be/wp-content/uploads/2012/04/image20.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.nibble.be/wp-content/uploads/2012/04/image-thumb20.png" width="531" height="374" /></a></p>
<p>So now we’ll have to launch the Umbraco installation wizard by clicking 1 of the 2 links.</p>
<h2>Installation wizard</h2>
<p>The installation wizard looks pretty much the same as it did in Umbraco v4 with the big difference being that there are less steps in the installation process (no license and no skins step).</p>
<p><a href="http://www.nibble.be/wp-content/uploads/2012/04/image21.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.nibble.be/wp-content/uploads/2012/04/image-thumb21.png" width="530" height="369" /></a></p>
<p>After hitting “Lets get started!” We need to specify the db that we want to use. Currently you can choose for SQL Server 2008 (and higher versions), SQL CE 4, or a custom connection string.</p>
<p>Still pretty similar to the v4 installer just that SQL Server 2005 isn’t supported and that there isn’t support for MySQL at this point. If you choose the SQL CE 4 option you won’t need to add additional files like you needed when installing v4 on SQL CE. So to get up an running without having to worry about the db simply choose SQL CE 4 and hit install.</p>
<p><a href="http://www.nibble.be/wp-content/uploads/2012/04/image22.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.nibble.be/wp-content/uploads/2012/04/image-thumb22.png" width="530" height="369" /></a></p>
<p>After hitting install you should see the installation progress and once it’s finished you can continue to the next step.</p>
<p><a href="http://www.nibble.be/wp-content/uploads/2012/04/image23.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.nibble.be/wp-content/uploads/2012/04/image-thumb23.png" width="528" height="370" /></a></p>
<p>In the create user step you’ll have to specify the admin user details (this is exactly the same as on v4).</p>
<p><a href="http://www.nibble.be/wp-content/uploads/2012/04/image24.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.nibble.be/wp-content/uploads/2012/04/image-thumb24.png" width="524" height="367" /></a></p>
<p>After the user step you’ll be able to install a starter kit, this will install a sample starter site. Currently there is only 1 you can choose and there is no option to choose a skin for it (so different to v4 at the moment).</p>
<p><a href="http://www.nibble.be/wp-content/uploads/2012/04/image25.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.nibble.be/wp-content/uploads/2012/04/image-thumb25.png" width="524" height="349" /></a></p>
<p>Once that step is completed the installation is done</p>
<p><a href="http://www.nibble.be/wp-content/uploads/2012/04/image26.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.nibble.be/wp-content/uploads/2012/04/image-thumb26.png" width="519" height="361" /></a></p>
<h2>Accessing Umbraco</h2>
<p>After a successful installation it’s possible to go to the Umbraco backend and that’s still located at /Umbraco</p>
<p><a href="http://www.nibble.be/wp-content/uploads/2012/04/image27.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.nibble.be/wp-content/uploads/2012/04/image-thumb27.png" width="503" height="262" /></a></p>
<p>So after providing the user credentials (that where setup in the create user section) you should have access to the Umbraco backend (again looking very familiar).</p>
<p><a href="http://www.nibble.be/wp-content/uploads/2012/04/image28.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.nibble.be/wp-content/uploads/2012/04/image-thumb28.png" width="495" height="332" /></a></p>
<h2>Conclusion</h2>
<p>If you have experience with setting up an Umbraco v4 it al feels very familiar and you should be up and running in a couple of minutes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nibble.be/?feed=rss2&amp;p=183</wfw:commentRss>
		</item>
	</channel>
</rss>
