<?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>Fri, 09 Jul 2010 12:50:46 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
	<language>en</language>
			<item>
		<title>Updating the locator package to support umbraco 4.5</title>
		<link>http://www.nibble.be/?p=78</link>
		<comments>http://www.nibble.be/?p=78#comments</comments>
		<pubDate>Fri, 09 Jul 2010 12:42:42 +0000</pubDate>
		<dc:creator>Tim Geyssens</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.nibble.be/?p=78</guid>
		<description><![CDATA[As you may know there are some changes in umbraco 4.5 that might require some packages to be updated in order to be compatible with umbraco 4.5. This post outlines what I did to update the locator package with 4.5 support.
What’s important for me is that I don’t want multiple versions of the code/package depending [...]]]></description>
			<content:encoded><![CDATA[<p>As you may know there are some changes in umbraco 4.5 that might require some packages to be updated in order to be <a href="http://our.umbraco.org/wiki/reference/packaging/umbraco-45-compatibility" target="_blank">compatible with umbraco 4.5</a>. This post outlines what I did to update the <a href="http://our.umbraco.org/projects/backoffice-extensions/locator-package" target="_blank">locator package</a> with 4.5 support.</p>
<p>What’s important for me is that I don’t want multiple versions of the code/package depending on the umbraco version but would like to handle that in the code/installer instead. So that I have a single package that can be used on both 4.0.X and 4.5.</p>
<h3>Identifing what schema the site is running on</h3>
<p>In the locator package there is an xslt file to transform the results and also in the code there are several actions that manipulate the content xml, so before I can do any updates I need to know what schema the current site is using.</p>
<p>In umbraco 4.5 there is a new setting UmbracoSettings.UseLegacyXmlSchema (which is pulled from the /config/umbracoSettings.config), this isn’t there in umbraco version older then 4.5, so if you try to get that value and it fails because of a MissingMethodException then it should be an older version then 4.5 (and thus on the old schema)</p>
<div class="csharpcode">
<pre class="alt"><span class="kwrd">bool</span> useLegacySchema = <span class="kwrd">true</span>;</pre>
<pre><span class="kwrd">try</span> { useLegacySchema = Utility.UseLegacySchema; }</pre>
<pre class="alt"><span class="kwrd">catch</span> (MissingMethodException) { }</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>
<h3>
  <br />Updating the code</h3>
<p>In the locator package I manipulate the content xml and add some nodes (extra properties on documents) on the fly so depending on the schema I need to add<br />
  <br />&lt;data alias=”myAlias”&gt;value&lt;/data&gt; (old schema) or simply &lt;myAlias&gt;value&lt;myAlias&gt; (new schema). </p>
<p>After the update the code that does that looks like this:</p>
<div class="csharpcode">
<pre class="alt"><span class="kwrd">bool</span> useLegacySchema = <span class="kwrd">true</span>;</pre>
<pre><span class="kwrd">try</span> { useLegacySchema = Utility.UseLegacySchema; }</pre>
<pre class="alt"><span class="kwrd">catch</span> (MissingMethodException) { }</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>
<div class="csharpcode">
<pre class="alt">XmlElement distanceNode =</pre>
<pre>content.CreateElement(useLegacySchema ? <span class="str">&quot;data&quot;</span> : <span class="str">&quot;distance&quot;</span>);</pre>
<pre class="alt">distanceNode.InnerText = distance.ToString(Utility.NumberFormatInfo);</pre>
<pre><span class="kwrd">if</span> (useLegacySchema)</pre>
<pre class="alt">{</pre>
<pre>XmlAttribute aliasAttribute = content.CreateAttribute(<span class="str">&quot;alias&quot;</span>);</pre>
<pre class="alt">aliasAttribute.Value = <span class="str">&quot;distance&quot;</span>;</pre>
<pre>distanceNode.Attributes.Append(aliasAttribute);</pre>
<pre class="alt">}</pre>
<pre>node.AppendChild(distanceNode);</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>
<h3>
  <br />Updating the package, installing the correct xslt file</h3>
<p>The locator package installs an xslt file (LocatorResults.xslt) that is used to transform the search results. Depending on what schema the current site is using it needs to install the correct version, this is handled by a custom package action.</p>
<p>In the package I simply include an additional xslt file LocatorResultsNewSchema.xslt (the new schema version)<br />
  <br />But I let the installer place this in the /data/packages/temp directory </p>
<p>So in the package.xml I have this part:</p>
<div class="csharpcode">
<pre class="alt"><span class="kwrd">&lt;</span><span class="html">file</span><span class="kwrd">&gt;</span></pre>
<pre><span class="kwrd">&lt;</span><span class="html">guid</span><span class="kwrd">&gt;</span>LocatorResults.xslt<span class="kwrd">&lt;/</span><span class="html">guid</span><span class="kwrd">&gt;</span></pre>
<pre class="alt"><span class="kwrd">&lt;</span><span class="html">orgPath</span><span class="kwrd">&gt;</span>/xslt<span class="kwrd">&lt;/</span><span class="html">orgPath</span><span class="kwrd">&gt;</span></pre>
<pre><span class="kwrd">&lt;</span><span class="html">orgName</span><span class="kwrd">&gt;</span>LocatorResults.xslt<span class="kwrd">&lt;/</span><span class="html">orgName</span><span class="kwrd">&gt;</span></pre>
<pre class="alt"><span class="kwrd">&lt;/</span><span class="html">file</span><span class="kwrd">&gt;</span></pre>
<pre><span class="kwrd">&lt;</span><span class="html">file</span><span class="kwrd">&gt;</span></pre>
<pre class="alt"><span class="kwrd">&lt;</span><span class="html">guid</span><span class="kwrd">&gt;</span>LocatorResultsNewSchema.xslt<span class="kwrd">&lt;/</span><span class="html">guid</span><span class="kwrd">&gt;</span></pre>
<pre><span class="kwrd">&lt;</span><span class="html">orgPath</span><span class="kwrd">&gt;</span>/data/packages/temp<span class="kwrd">&lt;/</span><span class="html">orgPath</span><span class="kwrd">&gt;</span></pre>
<pre class="alt"><span class="kwrd">&lt;</span><span class="html">orgName</span><span class="kwrd">&gt;</span>LocatorResultsNewSchema.xslt<span class="kwrd">&lt;/</span><span class="html">orgName</span><span class="kwrd">&gt;</span></pre>
<pre><span class="kwrd">&lt;/</span><span class="html">file</span><span class="kwrd">&gt;</span></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>Which will copy the LocatorResults.xslt file(using the old schema) in the package to the /xslt directory and the LocatorResultsNewSchema.xslt(using the new schema) to the /data/packages/temp directory.</p>
<p>At this point the xslt using the old schema is installed in the /xslt directory, so now if the site is using the new schema I simply need to move the LocatorResultsNewSchema.xslt file to /xslt/LocatorResults.xslt.</p>
<p>That’s done with a custom package action<br />
  <br />The package action Xml looks like this:</p>
<div class="csharpcode">
<pre class="alt"><span class="kwrd">&lt;</span><span class="html">Action</span> <span class="attr">runat</span><span class="kwrd">=&quot;install&quot;</span> <span class="attr">alias</span><span class="kwrd">=&quot;addNewSchemaContentToFile&quot;</span><span class="kwrd">&gt;</span></pre>
<pre><span class="kwrd">&lt;</span><span class="html">source</span><span class="kwrd">&gt;</span>/data/packages/temp/LocatorResultsNewSchema.xslt<span class="kwrd">&lt;/</span><span class="html">source</span><span class="kwrd">&gt;</span></pre>
<pre class="alt"><span class="kwrd">&lt;</span><span class="html">target</span><span class="kwrd">&gt;</span>/xslt/LocatorResults.xslt<span class="kwrd">&lt;/</span><span class="html">target</span><span class="kwrd">&gt;</span></pre>
<pre><span class="kwrd">&lt;/</span><span class="html">Action</span><span class="kwrd">&gt;</span></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 source node contains the path to the new schema xslt file and the target node contains the path to the location of the xslt file to overwrite.<br />
  <br />The package action then simply checks if the current site is using the new schema, if it is it deletes the existing xslt file (the one using the old schema) and then moves the xslt file that’s using the new schema to that location. If the site is on the old schema it will simply delete the new schema xslt file.</p>
<div class="csharpcode">
<pre class="alt"><span class="kwrd">public</span> <span class="kwrd">bool</span> Execute(<span class="kwrd">string</span> packageName, System.Xml.XmlNode xmlData)</pre>
<pre>{</pre>
<pre class="alt"><span class="kwrd">string</span> basePath = System.Web.Hosting.HostingEnvironment.ApplicationPhysicalPath;</pre>
<pre><span class="kwrd">string</span> sourceFile = xmlHelper.GetNodeValue(xmlData.SelectSingleNode(<span class="str">&quot;source&quot;</span>));</pre>
<pre class="alt"><span class="kwrd">string</span> targetFile = xmlHelper.GetNodeValue(xmlData.SelectSingleNode(<span class="str">&quot;target&quot;</span>));</pre>
<pre><span class="kwrd">try</span></pre>
<pre class="alt">{</pre>
<pre><span class="kwrd">if</span> (!Utility.UseLegacySchema)</pre>
<pre class="alt">{</pre>
<pre><span class="kwrd">if</span> (File.Exists(basePath + sourceFile))</pre>
<pre class="alt">{</pre>
<pre><span class="kwrd">if</span> (File.Exists(basePath + targetFile))</pre>
<pre class="alt">File.Delete(basePath + targetFile);</pre>
<pre>File.Move(basePath + sourceFile, basePath + targetFile);</pre>
<pre class="alt">}</pre>
<pre><span class="kwrd">return</span> <span class="kwrd">true</span>;</pre>
<pre class="alt">}</pre>
<pre><span class="kwrd">else</span></pre>
<pre class="alt">{</pre>
<pre>File.Delete(basePath + sourceFile);</pre>
<pre class="alt"><span class="kwrd">return</span> <span class="kwrd">true</span>;</pre>
<pre>}</pre>
<pre class="alt">}</pre>
<pre><span class="kwrd">catch</span>(MissingMemberException)</pre>
<pre class="alt">{</pre>
<pre>File.Delete(basePath + sourceFile);</pre>
<pre class="alt"><span class="kwrd">return</span> <span class="kwrd">true</span>;</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>That’s what it took to update the locator package (in this case it was all related to the schema changes), the new package is available on the <a href="http://our.umbraco.org/projects/backoffice-extensions/locator-package" target="_blank">locator project page</a> at our.umbraco.org and sourcecode is available on <a href="http://locator4umbraco.codeplex.com/" target="_blank">codeplex</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nibble.be/?feed=rss2&amp;p=78</wfw:commentRss>
		</item>
		<item>
		<title>Umbraco courses landed in the Benelux</title>
		<link>http://www.nibble.be/?p=77</link>
		<comments>http://www.nibble.be/?p=77#comments</comments>
		<pubDate>Mon, 22 Mar 2010 08:05:04 +0000</pubDate>
		<dc:creator>Tim Geyssens</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.nibble.be/?p=77</guid>
		<description><![CDATA[Be among the first to get certified in the Benelux, registration just opened for the first round of official umbraco courses held in Antwerp, Belgium. 
Level 1 is running on 3-4 May and level 2 on 5-6 May. 
These are the same courses taught throughout the world and will teach you everything you need to [...]]]></description>
			<content:encoded><![CDATA[<p>Be among the first to get certified in the Benelux, registration just opened for the first round of official umbraco courses held in Antwerp, Belgium. </p>
<p><a href="http://umbraco.org/training/training-in-benelux/level-1-course" target="_blank">Level 1</a> is running on 3-4 May and <a href="http://umbraco.org/training/training-in-benelux/level-2-course" target="_blank">level 2</a> on 5-6 May. </p>
<p>These are the same courses taught throughout the world and will teach you everything you need to know to attain your Umbraco Certification. </p>
<p>Secure your seat today!   <br /><a href="http://umbraco.org/training/training-in-benelux" target="_blank">http://umbraco.org/training/training-in-benelux</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nibble.be/?feed=rss2&amp;p=77</wfw:commentRss>
		</item>
		<item>
		<title>Getting started with Umbraco is easy!</title>
		<link>http://www.nibble.be/?p=76</link>
		<comments>http://www.nibble.be/?p=76#comments</comments>
		<pubDate>Tue, 23 Feb 2010 18:57:42 +0000</pubDate>
		<dc:creator>Tim Geyssens</dc:creator>
		
		<category><![CDATA[Umbraco]]></category>

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

		<guid isPermaLink="false">http://www.nibble.be/?p=76</guid>
		<description><![CDATA[The getting started with umbraco post is the most visited one on this blog. I thought I would make an update since getting started with umbraco got a lot easier recently because there are 9 free videos on umbraco.tv outlining the basics for both site builders and developers. Learn about the basis building blocks like [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.nibble.be/?p=40">getting started with umbraco post</a> is the most visited one on this blog. I thought I would make an update since getting started with umbraco got a lot easier recently because there are <strong>9 free videos</strong> on umbraco.tv outlining the basics for both site builders and developers. Learn about the basis building blocks like document types, templates and macros and also see how easy it is to use .net user controls.</p>
<p>You can find the free umbraco foundation videos on <a href="http://umbraco.org/videos">umbraco.tv</a></p>
<p>For site builders: </p>
<ul>
<li><a href="http://umbraco.org/documentation/videos/for-site-builders/foundation/document-types" target="_blank">Document types</a> </li>
<li><a href="http://umbraco.org/documentation/videos/for-site-builders/foundation/templates" target="_blank">Templates</a> </li>
<li><a href="http://umbraco.org/documentation/videos/for-site-builders/foundation/stylesheets" target="_blank">Stylesheets</a> </li>
<li><a href="http://umbraco.org/documentation/videos/for-site-builders/foundation/what-are-macros" target="_blank">What are macros</a> </li>
<li><a href="http://umbraco.org/documentation/videos/for-site-builders/foundation/creating-your-first-xslt-macro" target="_blank">Creating your first xslt macro</a> </li>
</ul>
<p>For developers</p>
<ul>
<li><a href="http://umbraco.org/documentation/videos/for-developers/foundation/using-net-user-controls" target="_blank">Using .Net User Controls</a> </li>
<li><a href="http://umbraco.org/documentation/videos/for-developers/foundation/macro-parameters" target="_blank">Macro Parameters</a> </li>
<li><a href="http://umbraco.org/documentation/videos/for-developers/foundation/macro-caching" target="_blank">Macro Caching</a> </li>
<li><a href="http://umbraco.org/documentation/videos/for-developers/foundation/debugging" target="_blank">Debugging</a> </li>
</ul>
<p>These should be your first stop when diving into Umbraco!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nibble.be/?feed=rss2&amp;p=76</wfw:commentRss>
		</item>
		<item>
		<title>Umbraco Contour is out !</title>
		<link>http://www.nibble.be/?p=75</link>
		<comments>http://www.nibble.be/?p=75#comments</comments>
		<pubDate>Fri, 13 Nov 2009 15:57:02 +0000</pubDate>
		<dc:creator>Tim Geyssens</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.nibble.be/?p=75</guid>
		<description><![CDATA[The last couple of months (since joining the umbraco corp) I’ve been involved in the development of Umbraco Contour.
It turned out to be an amazing product! Detailed info and some screencast can be found on the official Contour product page. 
You can also try Contour before buy, by installing a trial straight from the package [...]]]></description>
			<content:encoded><![CDATA[<p>The last couple of months (since joining the umbraco corp) I’ve been involved in the development of <a href="http://bit.ly/1v68Dp" target="_blank">Umbraco Contour</a>.</p>
<p>It turned out to be an amazing product! Detailed info and some screencast can be found on the <a href="http://bit.ly/1v68Dp" target="_blank">official Contour product page</a>. </p>
<p>You can also try Contour before buy, by installing a trial straight from the package repository.</p>
<p><a href="http://www.nibble.be/wlwimages/UmbracoContourisout_EE3B/image.png"><img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="349" alt="image" src="http://www.nibble.be/wlwimages/UmbracoContourisout_EE3B/image_thumb.png" width="581" border="0" /></a> </p>
<p><a href="http://www.nibble.be/wlwimages/UmbracoContourisout_EE3B/image_3.png"><img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="349" alt="image" src="http://www.nibble.be/wlwimages/UmbracoContourisout_EE3B/image_thumb_3.png" width="581" border="0" /></a> </p>
<p><a href="http://www.nibble.be/wlwimages/UmbracoContourisout_EE3B/image_4.png"><img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="348" alt="image" src="http://www.nibble.be/wlwimages/UmbracoContourisout_EE3B/image_thumb_4.png" width="580" border="0" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nibble.be/?feed=rss2&amp;p=75</wfw:commentRss>
		</item>
		<item>
		<title>Richtext editor datatype and related stylesheets</title>
		<link>http://www.nibble.be/?p=74</link>
		<comments>http://www.nibble.be/?p=74#comments</comments>
		<pubDate>Tue, 20 Oct 2009 09:51:16 +0000</pubDate>
		<dc:creator>Tim Geyssens</dc:creator>
		
		<category><![CDATA[Quick tip]]></category>

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

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

		<guid isPermaLink="false">http://www.nibble.be/?p=74</guid>
		<description><![CDATA[You can relate stylesheets to the richttext editor datatype in umbraco, sometimes this will cause an unwanted effect. Like a background color that you don&#8217;t want, &#8230;
But this can easily be changed.
You can target the richttext editor with the class
.mceContentBody
So by appending this to the related stylesheet, you have more control over the styling in [...]]]></description>
			<content:encoded><![CDATA[<p>You can relate stylesheets to the richttext editor datatype in umbraco, sometimes this will cause an unwanted effect. Like a background color that you don&#8217;t want, &#8230;</p>
<p>But this can easily be changed.</p>
<p>You can target the richttext editor with the class</p>
<p>.mceContentBody</p>
<p>So by appending this to the related stylesheet, you have more control over the styling in the richttext editor datatype.</p>
<p>(make sure to clear your browser cache, to view the result)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nibble.be/?feed=rss2&amp;p=74</wfw:commentRss>
		</item>
		<item>
		<title>Umbraco poll package sourcecode</title>
		<link>http://www.nibble.be/?p=73</link>
		<comments>http://www.nibble.be/?p=73#comments</comments>
		<pubDate>Sat, 19 Sep 2009 16:13:24 +0000</pubDate>
		<dc:creator>Tim Geyssens</dc:creator>
		
		<category><![CDATA[Umbraco]]></category>

		<guid isPermaLink="false">http://www.nibble.be/?p=73</guid>
		<description><![CDATA[The last couple of weeks I&#8217;ve gotten lots of request for the poll package sourcecode.
So I&#8217;ve added the sourcecode to the poll project page on our.umbraco.org (attached files).
Enjoy!
]]></description>
			<content:encoded><![CDATA[<p>The last couple of weeks I&#8217;ve gotten lots of request for the <a href="http://our.umbraco.org/projects/poll" target="_blank">poll package</a> sourcecode.</p>
<p>So I&#8217;ve added the sourcecode to the poll project page on <a href="http://our.umbraco.org/projects/poll" target="_blank">our.umbraco.org</a> (attached files).</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nibble.be/?feed=rss2&amp;p=73</wfw:commentRss>
		</item>
		<item>
		<title>Example for adding a PDF generator to your umbraco site</title>
		<link>http://www.nibble.be/?p=72</link>
		<comments>http://www.nibble.be/?p=72#comments</comments>
		<pubDate>Sun, 13 Sep 2009 17:22:13 +0000</pubDate>
		<dc:creator>Tim Geyssens</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.nibble.be/?p=72</guid>
		<description><![CDATA[Some time ago I created a solution for generating pdf documents from your umbraco content (and from the outputted html). I always wanted to make a package out of this but since the project relies on the commercial pdf generating library ABCpdf this isn&#8217;t possible. The main reason for using ABCpdf is that it&#8217;s html [...]]]></description>
			<content:encoded><![CDATA[<p>Some time ago I created a solution for generating pdf documents from your umbraco content (and from the outputted html). I always wanted to make a package out of this but since the project relies on the commercial pdf generating library <a href="http://www.websupergoo.com/products.htm" target="_blank">ABCpdf</a> this isn&#8217;t possible. The main reason for using ABCpdf is that it&#8217;s html to pdf options are pretty decent. </p>
<p>So instead of releasing a package I&#8217;ll share the sourcecode and I&#8217;ll give an overview of how to use it.</p>
<div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:ebc26863-da96-4db8-8424-2d951cec1b99" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">
<p>Download: <a href="http://www.nibble.be/wlwimages/ExampleforaddingaPDFgeneratortoyourumbra_10FFC/Nibble.PDFGen.zip" target="_blank">PDFGen sourcecode</a></p>
</div>
<h2>Installation</h2>
<p>Once you have <a href="http://www.websupergoo.com/abcpdf-1.htm" target="_blank">ABCpdf</a> installed (it&#8217;s possible to download a trail and you can also apply for a free license) the installation is just a mather of dropping some files in your umbraco instance.</p>
<ul>
<li>Drop PDFGen.dll in the /bin folder </li>
<li>Drop PDFGen.aspx in the /umbraco</li>
<li> Drop PDFGen.config in the /config folder</li>
</ul>
<h2>Setup</h2>
<p>First you&#8217;ll need to define a pdf template, this can be done in the PDFGen.config file which should<br />be in the /config folder.<br />Lets look at an example config file:
<div class="csharpcode">
<pre class="alt"><span class="kwrd">&lt;?</span><span class="html">xml</span> <span class="attr">version</span><span class="kwrd">=&#8221;1.0&#8243;</span> <span class="attr">encoding</span><span class="kwrd">=&#8221;utf-8&#8243;</span> ?<span class="kwrd">&gt;</span></pre>
<pre><span class="kwrd">&lt;</span><span class="html">PDFGen</span> <span class="attr">PermitPrint</span><span class="kwrd">=&#8221;False&#8221;</span> <span class="attr">PermitExtractContent</span><span class="kwrd">=&#8221;False&#8221;</span><span class="kwrd">&gt;</span></pre>
<pre class="alt"><span class="rem">&lt;!&#8211; Header&#8211;&gt;</span></pre>
<pre><span class="kwrd">&lt;</span><span class="html">Text</span> <span class="attr">FontName</span><span class="kwrd">=&#8221;Arial&#8221;</span> <span class="attr">FontSize</span><span class="kwrd">=&#8221;12&#8243;</span> <span class="attr">FontColor</span><span class="kwrd">=&#8221;0,0,0&#8243;</span> <span class="attr">X1</span><span class="kwrd">=&#8221;20&#8243;</span> <span class="attr">Y1</span><span class="kwrd">=&#8221;40&#8243;</span> <span class="attr">X2</span><span class="kwrd">=&#8221;500&#8243;</span> <span class="attr">Y2</span><span class="kwrd">=&#8221;700&#8243;</span></pre>
<pre class="alt"><span class="attr">IsRecurring</span><span class="kwrd">=&#8221;true&#8221;</span><span class="kwrd">&gt;</span>my header text<span class="kwrd">&lt;/</span><span class="html">Text</span><span class="kwrd">&gt;</span></pre>
<pre><span class="kwrd">&lt;</span><span class="html">Image</span> <span class="attr">File</span><span class="kwrd">=&#8221;/media/950/joblistpdfhead.jpg&#8221;</span> <span class="attr">X</span><span class="kwrd">=&#8221;20&#8243;</span> <span class="attr">Y</span><span class="kwrd">=&#8221;670&#8243;</span> <span class="attr">Width</span><span class="kwrd">=&#8221;570&#8243;</span> <span class="attr">Height</span><span class="kwrd">=&#8221;100&#8243;</span> <span class="attr">IsRecurring</span><span class="kwrd">=&#8221;true&#8221;</span><span class="kwrd">/&gt;</span></pre>
<pre class="alt"><span class="rem">&lt;!&#8211; Content &#8211;&gt;</span></pre>
<pre><span class="kwrd">&lt;</span><span class="html">Property</span> <span class="attr">RequestParam</span><span class="kwrd">=&#8221;test&#8221;</span> <span class="attr">PropertyAlias</span><span class="kwrd">=&#8221;title;@createDate&#8221;</span> <span class="attr">FontName</span><span class="kwrd">=&#8221;Arial&#8221;</span> <span class="attr">FontSize</span><span class="kwrd">=&#8221;18&#8243;</span></pre>
<pre class="alt"><span class="attr">FontColor</span><span class="kwrd">=&#8221;0,0,0&#8243;</span> <span class="attr">X1</span><span class="kwrd">=&#8221;25&#8243;</span> <span class="attr">Y1</span><span class="kwrd">=&#8221;620&#8243;</span> <span class="attr">X2</span><span class="kwrd">=&#8221;500&#8243;</span> <span class="attr">Y2</span><span class="kwrd">=&#8221;650&#8243;</span> <span class="attr">IsRecurring</span><span class="kwrd">=&#8221;false&#8221;</span><span class="kwrd">&gt;</span>{0} - {1}<span class="kwrd">&lt;/</span><span class="html">Property</span><span class="kwrd">&gt;</span></pre>
<pre><span class="kwrd">&lt;</span><span class="html">Property</span> <span class="attr">RequestParam</span><span class="kwrd">=&#8221;"</span> <span class="attr">PropertyAlias</span><span class="kwrd">=&#8221;info&#8221;</span> <span class="attr">FontName</span><span class="kwrd">=&#8221;Arial&#8221;</span> <span class="attr">FontSize</span><span class="kwrd">=&#8221;11&#8243;</span> <span class="attr">FontColor</span><span class="kwrd">=&#8221;0,0,0&#8243;</span> <span class="attr">X1</span><span class="kwrd">=&#8221;25&#8243;</span></pre>
<pre class="alt"><span class="attr">Y1</span><span class="kwrd">=&#8221;180&#8243;</span> <span class="attr">X2</span><span class="kwrd">=&#8221;530&#8243;</span> <span class="attr">Y2</span><span class="kwrd">=&#8221;630&#8243;</span> <span class="attr">IsRecurring</span><span class="kwrd">=&#8221;false&#8221;</span><span class="kwrd">&gt;&lt;/</span><span class="html">Property</span><span class="kwrd">&gt;</span></pre>
<pre><span class="kwrd">&lt;</span><span class="html">Property</span> <span class="attr">RequestParam</span><span class="kwrd">=&#8221;"</span> <span class="attr">PropertyAlias</span><span class="kwrd">=&#8221;linkURL&#8221;</span> <span class="attr">FontName</span><span class="kwrd">=&#8221;Arial&#8221;</span> <span class="attr">FontSize</span><span class="kwrd">=&#8221;11&#8243;</span> <span class="attr">FontColor</span><span class="kwrd">=&#8221;0,0,0&#8243;</span></pre>
<pre class="alt"><span class="attr">X1</span><span class="kwrd">=&#8221;40&#8243;</span> <span class="attr">Y1</span><span class="kwrd">=&#8221;715&#8243;</span> <span class="attr">X2</span><span class="kwrd">=&#8221;520&#8243;</span> <span class="attr">Y2</span><span class="kwrd">=&#8221;740&#8243;</span> <span class="attr">IsRecurring</span><span class="kwrd">=&#8221;false&#8221;</span><span class="kwrd">&gt;&lt;/</span><span class="html">Property</span><span class="kwrd">&gt;</span></pre>
<pre><span class="rem">&lt;!&#8211; Footer &#8211;&gt;</span></pre>
<pre class="alt"><span class="kwrd">&lt;</span><span class="html">Text</span> <span class="attr">FontName</span><span class="kwrd">=&#8221;Arial&#8221;</span> <span class="attr">FontSize</span><span class="kwrd">=&#8221;6&#8243;</span> <span class="attr">FontColor</span><span class="kwrd">=&#8221;0,0,0&#8243;</span> <span class="attr">X1</span><span class="kwrd">=&#8221;25&#8243;</span> <span class="attr">Y1</span><span class="kwrd">=&#8221;20&#8243;</span> <span class="attr">X2</span><span class="kwrd">=&#8221;500&#8243;</span> <span class="attr">Y2</span><span class="kwrd">=&#8221;30&#8243;</span></pre>
<pre><span class="attr">IsRecurring</span><span class="kwrd">=&#8221;true&#8221;</span><span class="kwrd">&gt;</span>Copyright mysite 2009 &#8212; All Rights Reserved.<span class="kwrd">&lt;/</span><span class="html">Text</span><span class="kwrd">&gt;</span></pre>
<pre class="alt"><span class="kwrd">&lt;/</span><span class="html">PDFGen</span><span class="kwrd">&gt;</span></pre>
</div>
<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>
</p>
<p>After the xml declaration (yes the config file is an xml file) you have the PDFGen root node.<br />On this node you can set wether the generated pdf files are printable and if it is possible to extract<br />content (copy,paste).
<pre class="csharpcode"><span class="kwrd">&lt;</span><span class="html">PDFGen</span> <span class="attr">PermitPrint</span><span class="kwrd">=&#8221;False&#8221;</span> <span class="attr">PermitExtractContent</span><span class="kwrd">=&#8221;False&#8221;</span><span class="kwrd">&gt;</span></pre>
<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>
</p>
<p>The child nodes of the root PDFGen node will be used to define the pdf. There are a couple of<br />possibilities:</p>
<ul>
<li>Text</li>
<li>Image</li>
<li>Property</li>
<li>RenderedOutput</li>
</ul>
<h2>Text nodes</h2>
<div class="csharpcode">
<pre class="alt"><span class="kwrd">&lt;</span><span class="html">Text</span> <span class="attr">FontName</span><span class="kwrd">=&#8221;Arial&#8221;</span> <span class="attr">FontSize</span><span class="kwrd">=&#8221;12&#8243;</span> <span class="attr">FontColor</span><span class="kwrd">=&#8221;0,0,0&#8243;</span> <span class="attr">X1</span><span class="kwrd">=&#8221;20&#8243;</span> <span class="attr">Y1</span><span class="kwrd">=&#8221;40&#8243;</span> <span class="attr">X2</span><span class="kwrd">=&#8221;500&#8243;</span> <span class="attr">Y2</span><span class="kwrd">=&#8221;700&#8243;</span></pre>
<pre><span class="attr">IsRecurring</span><span class="kwrd">=&#8221;true&#8221;</span><span class="kwrd">&gt;</span>my header text<span class="kwrd">&lt;/</span><span class="html">Text</span><span class="kwrd">&gt;</span></pre>
</div>
<p>A text node is used to add some static text on the pdf document it has several attributes</p>
<ul>
<li>FontName: name of the font family that will be used</li>
<li>FontSize: size of the font</li>
<li>FontColor: color of the font</li>
<li>X1,Y1,X2,Y2: these are the coordinated used to define a box where the text will be placed</li>
<li>IsRecurring: if this is set to true the text will appear on each page (used for headers and<br />footers)</li>
<li>The inner text is the static text that will be placed on the pdf (it is possible to add html).</li>
</ul>
<h2>Image nodes</h2>
<div class="csharpcode">
<pre class="alt"><span class="kwrd">&lt;</span><span class="html">Image</span> <span class="attr">File</span><span class="kwrd">=&#8221;/media/950/joblistpdfhead.jpg&#8221;</span> <span class="attr">X</span><span class="kwrd">=&#8221;20&#8243;</span> <span class="attr">Y</span><span class="kwrd">=&#8221;670&#8243;</span> <span class="attr">Width</span><span class="kwrd">=&#8221;570&#8243;</span> <span class="attr">Height</span><span class="kwrd">=&#8221;100&#8243;</span> <span class="attr">IsRecurring</span><span class="kwrd">=&#8221;true&#8221;</span><span class="kwrd">/&gt;</span></pre>
</div>
<p>An image node is used to add an image to the pdf document.</p>
<p>An overview of it&#8217;s attributes:</p>
<ul>
<li>File: path to the image</li>
<li>X,Y: coordinated of the image</li>
<li>Width: width of the image</li>
<li>Height: height of the image</li>
<li>IsRecurring: if this is set to true the image will appear on each page (used for headers and<br />footers)</li>
</ul>
<h2>Property nodes</h2>
<div class="csharpcode">
<pre class="alt"><span class="kwrd">&lt;</span><span class="html">Property</span> <span class="attr">RequestParam</span><span class="kwrd">=&#8221;test&#8221;</span> <span class="attr">PropertyAlias</span><span class="kwrd">=&#8221;title;@createDate&#8221;</span> <span class="attr">FontName</span><span class="kwrd">=&#8221;Arial&#8221;</span> <span class="attr">FontSize</span><span class="kwrd">=&#8221;18&#8243;</span></pre>
<pre><span class="attr">FontColor</span><span class="kwrd">=&#8221;0,0,0&#8243;</span> <span class="attr">X1</span><span class="kwrd">=&#8221;25&#8243;</span> <span class="attr">Y1</span><span class="kwrd">=&#8221;620&#8243;</span> <span class="attr">X2</span><span class="kwrd">=&#8221;500&#8243;</span> <span class="attr">Y2</span><span class="kwrd">=&#8221;650&#8243;</span> <span class="attr">IsRecurring</span><span class="kwrd">=&#8221;false&#8221;</span><span class="kwrd">&gt;</span>{0} – {1}<span class="kwrd">&lt;/</span><span class="html">Property</span><span class="kwrd">&gt;</span></pre>
</div>
<p>A property node is used to add umbraco content node property data to the pdf document.</p>
<p>An overview of it&#8217;s attributes:</p>
<ul>
<li>RequestParam: if this is empty the default request param id will be used, if you want to use<br />another one define it here</li>
<li>PropertyAlias: alias of the property (possible to add multiple separated by semicolon)</li>
<li>FontName: name of the font family that will be used</li>
<li>FontSize: size of the font</li>
<li>FontColor: color of the font</li>
<li>X1,Y1,X2,Y2 :these are the coordinated used to define a box where the text will be placed</li>
<li>IsRecurring :if this is set to true the text will appear on each page (used for headers and<br />footers)</li>
</ul>
<p>The innertext can be used to add some static text around the property or if you have multiple<br />propertyaliases you must define how they will be placed (simular to string.format).</p>
<p>&nbsp;</p>
<h2>RenderedOutput nodes</h2>
<div class="csharpcode">
<pre class="alt"><span class="kwrd">&lt;</span><span class="html">RenderedOutput</span> <span class="attr">RequestParam</span><span class="kwrd">=&#8221;"</span> <span class="attr">Template</span><span class="kwrd">=&#8221;"</span> <span class="attr">X1</span><span class="kwrd">=&#8221;25&#8243;</span> <span class="attr">Y1</span><span class="kwrd">=&#8221;620&#8243;</span> <span class="attr">X2</span><span class="kwrd">=&#8221;500&#8243;</span> <span class="attr">Y2</span><span class="kwrd">=&#8221;650&#8243;</span> <span class="attr">IsRecurring</span><span class="kwrd">=&#8221;false&#8221;</span> <span class="kwrd">/&gt;</span></pre>
</div>
<p>This will fetch the rendered output of a page, if no requestparam is used it will use the id one and if no template alias is defined it will use that default template of that page.</p>
<p>An overview of it&#8217;s attributes:</p>
<ul>
<li>RequestParam: if this is empty the default request param id will be used, if you want to use<br />another one define it here</li>
<li>Template: template alias to use, if this is empty the default template of the document will be used </li>
<li>X1,Y1,X2,Y2 :these are the coordinated used to define a box where the text will be placed</li>
<li>IsRecurring :if this is set to true the text will appear on each page (used for headers and<br />footers)</li>
</ul>
<h2>Usage</h2>
<p>Once installed and if you have a working config file. You can use pdfgen by calling /umbraco/pdfgen.aspx?id=1234 (the id is the id of the umbraco document).</p>
<p>If you have defined other RequestParams in your config file (like headerid) you just need to do:<br />/umbraco/pdfgen.aspx?id=1234&amp;headerid=2345</p>
<p>It&#8217;s also possible to have multiple config files (just copy the pdfgen.config) if you want to use anohter config file you can do it like this:</p>
<p>/umbraco/pdfgen.aspx?id=1234&amp;pdfconfig=pdfconfigcopy.config</p>
<p>pdfconfigcopy.config is the filename of the configfile (must be in the /config dir)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nibble.be/?feed=rss2&amp;p=72</wfw:commentRss>
		</item>
		<item>
		<title>Adding a new/custom section to umbraco, sample project</title>
		<link>http://www.nibble.be/?p=71</link>
		<comments>http://www.nibble.be/?p=71#comments</comments>
		<pubDate>Mon, 27 Jul 2009 13:55:32 +0000</pubDate>
		<dc:creator>Tim Geyssens</dc:creator>
		
		<category><![CDATA[.net]]></category>

		<category><![CDATA[C#]]></category>

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

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

		<guid isPermaLink="false">http://www.nibble.be/?p=71</guid>
		<description><![CDATA[Simon Justesen, has a great post describing how to add new sections and trees inside umbraco (part 1, part 2).
To make it easier to get started, I thought I would provide some starter sourcecode for a demo custom section.

You can download the sourcecode here

Steps to get this running on your umbraco installation:
- Copy the assembly [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.simm.dk/about.aspx" target="_blank">Simon Justesen</a>, has a great post describing how to add new sections and trees inside umbraco (<a href="http://www.simm.dk/umbraco-corner/articles/making-custom-sections-and-trees-inside-umbraco---part-i.aspx" target="_blank">part 1</a>, <a href="http://www.simm.dk/umbraco-corner/articles/making-custom-sections-and-trees-inside-umbraco---part-ii.aspx" target="_blank">part 2</a>).</p>
<p>To make it easier to get started, I thought I would provide some starter sourcecode for a demo custom section.</p>
<div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:7b6d08c7-d8ee-4e00-89e0-970b7e486a50" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">
<p>You can download the <a href="http://www.nibble.be/wlwimages/Addinganewcustomsectiontoumbracodemoproj_D4AE/CustomUmbracoSection.zip" target="_blank">sourcecode here</a></p>
</div>
<p>Steps to get this running on your umbraco installation:</p>
<p>- Copy the assembly (CustomUmbracoSection.dll) to the \bin directory</p>
<p>- Copy the file custom.gif to \umbraco\images\tray\ directory</p>
<p>- Make a &#8216;custom&#8217; directory in \umbraco and copy the editCustom.aspx page to \umbraco\custom directory</p>
<p>- Insert a new row in the umbracoApp table</p>
<div class="csharpcode">
<pre class="alt">INSERT <span class="kwrd">INTO</span> [umbracoApp]</pre>
<pre>           ([sortOrder]</pre>
<pre class="alt">           ,[appAlias]</pre>
<pre>           ,[appIcon]</pre>
<pre class="alt">           ,[appName])</pre>
<pre>     <span class="kwrd">VALUES</span></pre>
<pre class="alt">           (9</pre>
<pre>           ,<span class="str">&#8216;custom&#8217;</span></pre>
<pre class="alt">           ,<span class="str">&#8216;custom.gif&#8217;</span></pre>
<pre>           ,<span class="str">&#8216;custom&#8217;</span>)</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>- Insert a new row in to umbracoAppTree table</p>
<div class="csharpcode">
<pre class="alt">INSERT <span class="kwrd">INTO</span> [umbracoAppTree]</pre>
<pre>           ([treeSilent]</pre>
<pre class="alt">           ,[treeInitialize]</pre>
<pre>           ,[treeSortOrder]</pre>
<pre class="alt">           ,[appAlias]</pre>
<pre>           ,[treeAlias]</pre>
<pre class="alt">           ,[treeTitle]</pre>
<pre>           ,[treeIconClosed]</pre>
<pre class="alt">           ,[treeIconOpen]</pre>
<pre>           ,[treeHandlerAssembly]</pre>
<pre class="alt">           ,[treeHandlerType])</pre>
<pre>     <span class="kwrd">VALUES</span></pre>
<pre class="alt">           (0</pre>
<pre>           ,1</pre>
<pre class="alt">           ,0</pre>
<pre>           ,<span class="str">&#8216;custom&#8217;</span></pre>
<pre class="alt">           ,<span class="str">&#8216;custom&#8217;</span></pre>
<pre>           ,<span class="str">&#8216;custom&#8217;</span></pre>
<pre class="alt">           ,<span class="str">&#8216;.sprTreeFolder&#8217;</span></pre>
<pre>           ,<span class="str">&#8216;.sprTreeFolder_o&#8217;</span></pre>
<pre class="alt">           ,<span class="str">&#8216;CustomUmbracoSection&#8217;</span></pre>
<pre>           ,<span class="str">&#8216;Trees.LoadCustomTree&#8217;</span>)</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>- Update the \umbraco\config\create\UI.xml file, add:</p>
<div class="csharpcode">
<pre class="alt">  <span class="kwrd">&lt;</span><span class="html">nodeType</span> <span class="attr">alias</span><span class="kwrd">=&#8221;initcustom&#8221;</span><span class="kwrd">&gt;</span></pre>
<pre>      <span class="kwrd">&lt;</span><span class="html">header</span><span class="kwrd">&gt;</span>Custom<span class="kwrd">&lt;/</span><span class="html">header</span><span class="kwrd">&gt;</span></pre>
<pre class="alt">      <span class="kwrd">&lt;</span><span class="html">usercontrol</span><span class="kwrd">&gt;</span>/create/simple.ascx<span class="kwrd">&lt;/</span><span class="html">usercontrol</span><span class="kwrd">&gt;</span></pre>
<pre>      <span class="kwrd">&lt;</span><span class="html">tasks</span><span class="kwrd">&gt;</span></pre>
<pre class="alt">        <span class="kwrd">&lt;</span><span class="html">create</span> <span class="attr">assembly</span><span class="kwrd">=&#8221;CustomUmbracoSection&#8221;</span> <span class="attr">type</span><span class="kwrd">=&#8221;Tasks.CustomTasks&#8221;</span> <span class="kwrd">/&gt;</span></pre>
<pre>        <span class="kwrd">&lt;</span><span class="html">delete</span> <span class="attr">assembly</span><span class="kwrd">=&#8221;CustomUmbracoSection&#8221;</span> <span class="attr">type</span><span class="kwrd">=&#8221;Tasks.CustomTasks&#8221;</span> <span class="kwrd">/&gt;</span></pre>
<pre class="alt">      <span class="kwrd">&lt;/</span><span class="html">tasks</span><span class="kwrd">&gt;</span></pre>
<pre>  <span class="kwrd">&lt;/</span><span class="html">nodeType</span><span class="kwrd">&gt;</span></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>After these steps are completed you will have to enable the new section for your user.</p>
<p><a href="http://www.nibble.be/wlwimages/Addinganewcustomsectiontoumbracodemoproj_D4AE/image.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="199" alt="image" src="http://www.nibble.be/wlwimages/Addinganewcustomsectiontoumbracodemoproj_D4AE/image_thumb.png" width="291" border="0"></a> </p>
<p>Then it should show up as the last icon in the sections (called custom, with a <a href="http://en.wikipedia.org/wiki/HAL_9000" target="_blank">HAL&#8217;s</a> camera eye icon).</p>
<p><a href="http://www.nibble.be/wlwimages/Addinganewcustomsectiontoumbracodemoproj_D4AE/image_3.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="104" alt="image" src="http://www.nibble.be/wlwimages/Addinganewcustomsectiontoumbracodemoproj_D4AE/image_thumb_3.png" width="332" border="0"></a> </p>
<p>In the custom section you&#8217;ll find this:</p>
<p><a href="http://www.nibble.be/wlwimages/Addinganewcustomsectiontoumbracodemoproj_D4AE/image_4.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="357" alt="image" src="http://www.nibble.be/wlwimages/Addinganewcustomsectiontoumbracodemoproj_D4AE/image_thumb_4.png" width="545" border="0"></a> </p>
<p>So just a sample node that will open a demo edit page.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nibble.be/?feed=rss2&amp;p=71</wfw:commentRss>
		</item>
		<item>
		<title>Thoughts,tips for creating umbraco packages</title>
		<link>http://www.nibble.be/?p=70</link>
		<comments>http://www.nibble.be/?p=70#comments</comments>
		<pubDate>Tue, 07 Jul 2009 15:34:44 +0000</pubDate>
		<dc:creator>Tim Geyssens</dc:creator>
		
		<category><![CDATA[Package]]></category>

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

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

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

		<guid isPermaLink="false">http://www.nibble.be/?p=70</guid>
		<description><![CDATA[I&#8217;ve created my share of umbraco packages and thought I&#8217;d try to share some tips/insights.
Creating packages is easy, the built-in package creator makes it super simple and with package actions you can perform additional common tasks (like updating the xsltextensions) without having to write a single line of code.
It really takes a minimal effort to [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve created my share of <a href="http://www.nibble.be/?page_id=4" target="_blank">umbraco packages</a> and thought I&#8217;d try to share some tips/insights.
<p>Creating packages is easy, the built-in package creator makes it super simple and with <a href="http://umbraco.tv/assets/package%20actions.pdf" target="_blank">package actions</a> you can perform additional common tasks (like updating the xsltextensions) without having to write a single line of code.</p>
<p>It really takes a minimal effort to package something up that you made, even if it&#8217;s very project specific it should be possible to isolate the functionality and package it up. </p>
<h3>Dare to share </h3>
<p>Even a simple package can be a great help, so don&#8217;t hesitate and share</p>
<h3>Naming</h3>
<p> To avoid conflicts and overwriting other existing items when installing a package, make sure you have unique and meaningful names</p>
<ul>
<li>Assemblies</li>
</ul>
<blockquote><p>Starting these with your name or company name followed by a project name should be enough to make them unique<br />FE: Nibble.Umb.Poll </p>
</blockquote>
<ul>
<li>Stylesheets, Scripts, Document types, Templates, XSLT files, Macros</li>
</ul>
<blockquote><p>A unique and meaningful name that links them back to the package, so it easy to see that they are part of a package<br />FE: not style.css but starrating.css<br />not list.xslt but bloglistposts.xslt&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </p>
</blockquote>
<ul>
<li>Usercontrols</li>
</ul>
<blockquote><p>placing these in a new unique folder inside the /usercontrols folder makes it easy to see that they are part of a package<br />FE: /usercontrols/Nibble.Umb.Poll/poll.ascx</p>
</blockquote>
<ul>
<li>Config files</li>
</ul>
<blockquote><p>place these in the /config folder (again, with a unique and meaningful name)</p>
</blockquote>
<h3>Installation </h3>
<p>Package are really easy to install but in some cases the package installation might fail. So it&#8217;s always great to provide some manual installation instructions, just in case. </p>
<h3>Think ahead</h3>
<p>You might have created a package with a simple site in mind, but don&#8217;t forget they can/will also be used on multilingual sites, site running a different database engine. Or in case it&#8217;s a datatype, will be used with Canvas, autoform, doc2form. It&#8217;s a great plus if this is taken into account.</p>
<h3>What doesn&#8217;t work</h3>
<p>If the package only works with a certain umbraco version and up or if it only works on sql server, don&#8217;t forget to mention this to avoid that people install it on non supported installations.
<p>&nbsp;
<p>I&#8217;ve also added this post to the <a href="http://our.umbraco.org/wiki/how-tos/packages-and-projects/thoughts,tips-for-creating-packages" target="_blank">wiki</a> on our.umbraco.org, if you have anything to add/change (or correct my bad spelling) please do so .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nibble.be/?feed=rss2&amp;p=70</wfw:commentRss>
		</item>
		<item>
		<title>New Package - Poll package for umbraco 4</title>
		<link>http://www.nibble.be/?p=69</link>
		<comments>http://www.nibble.be/?p=69#comments</comments>
		<pubDate>Mon, 06 Jul 2009 10:16:47 +0000</pubDate>
		<dc:creator>Tim Geyssens</dc:creator>
		
		<category><![CDATA[Package]]></category>

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

		<guid isPermaLink="false">http://www.nibble.be/?p=69</guid>
		<description><![CDATA[I finally got round to polish and package the umbraco poll I made some time ago. So here it is &#8230;
 
The package installs the following:
 
&#160;
The document types (Polls, Poll, Poll Answer) will be used to setup the polls.
 
So you&#8217;ll have a Polls document that will contain several Poll documents and these will [...]]]></description>
			<content:encoded><![CDATA[<p>I finally got round to polish and package the umbraco poll I made some time ago. So here it is &#8230;</p>
<p><a href="http://www.nibble.be/wlwimages/NewPackagePollpackageforumbraco4_AC94/image.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="170" alt="image" src="http://www.nibble.be/wlwimages/NewPackagePollpackageforumbraco4_AC94/image_thumb.png" width="338" border="0"></a> </p>
<p>The package installs the following:</p>
<p><a href="http://www.nibble.be/wlwimages/NewPackagePollpackageforumbraco4_AC94/image_3.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="153" alt="image" src="http://www.nibble.be/wlwimages/NewPackagePollpackageforumbraco4_AC94/image_thumb_3.png" width="367" border="0"></a> </p>
<p>&nbsp;</p>
<p>The document types (Polls, Poll, Poll Answer) will be used to setup the polls.</p>
<p><a href="http://www.nibble.be/wlwimages/NewPackagePollpackageforumbraco4_AC94/image_4.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="131" alt="image" src="http://www.nibble.be/wlwimages/NewPackagePollpackageforumbraco4_AC94/image_thumb_4.png" width="240" border="0"></a> </p>
<p>So you&#8217;ll have a Polls document that will contain several Poll documents and these will have several Poll Answer documents beneath it.</p>
<p>After you have setup a poll with some answers in your content area you can get the poll on your page.</p>
<p>First add a reference to the installed stylesheet (/css/Nibble.Umb.Poll.css) and then place the Poll macro on your template.</p>
<p>Please note that:</p>
<ul>
<li>The macro will have to be placed inside a form with runat=&#8221;server&#8221; attribute
<li>There has to be a scriptmanager on the page</li>
</ul>
<p>The poll macro has several parameters:</p>
<p><a href="http://www.nibble.be/wlwimages/NewPackagePollpackageforumbraco4_AC94/image_5.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="233" alt="image" src="http://www.nibble.be/wlwimages/NewPackagePollpackageforumbraco4_AC94/image_thumb_5.png" width="240" border="0"></a> </p>
<p>&nbsp;</p>
<ul>
<li>Poll Node Id: This is the id of the Poll content node that you want to display
<li>Display Only: Check this if you only want to display the results of a poll
<li>Submit On Select: Check this if you want to submit the vote when a user selects a answer
<li>Hide Submit: Check this if you want to hide the submit button
<li>Sort Results: Check this if you want that the results are sorted by number of votes
<li>Width Total Votes: Instead of the highest number of votes being equal to 100% width, the total number of votes is 100%
<li>Hide Question: Check this if you want to hide the question
<li>Random Poll: Check this if you want to display a random Poll, you&#8217;ll also have to update the Poll Node Id to the Polls document (containing the different polls)</li>
</ul>
<p>&nbsp;</p>
<p>So depending on the parameters (Submit On Select and&nbsp; Hide Submit) your poll can look like:</p>
<p><a href="http://www.nibble.be/wlwimages/NewPackagePollpackageforumbraco4_AC94/image_6.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="158" alt="image" src="http://www.nibble.be/wlwimages/NewPackagePollpackageforumbraco4_AC94/image_thumb_6.png" width="313" border="0"></a> </p>
<p>or (with submit button)</p>
<p><a href="http://www.nibble.be/wlwimages/NewPackagePollpackageforumbraco4_AC94/image_7.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="167" alt="image" src="http://www.nibble.be/wlwimages/NewPackagePollpackageforumbraco4_AC94/image_thumb_7.png" width="303" border="0"></a> </p>
<p>The Results can look like this:</p>
<p><a href="http://www.nibble.be/wlwimages/NewPackagePollpackageforumbraco4_AC94/image_8.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="213" alt="image" src="http://www.nibble.be/wlwimages/NewPackagePollpackageforumbraco4_AC94/image_thumb_8.png" width="290" border="0"></a> </p>
<p>Sorted:</p>
<p><a href="http://www.nibble.be/wlwimages/NewPackagePollpackageforumbraco4_AC94/image_9.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="203" alt="image" src="http://www.nibble.be/wlwimages/NewPackagePollpackageforumbraco4_AC94/image_thumb_9.png" width="278" border="0"></a> </p>
<p>Width Total Votes:</p>
<p><a href="http://www.nibble.be/wlwimages/NewPackagePollpackageforumbraco4_AC94/image_10.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="200" alt="image" src="http://www.nibble.be/wlwimages/NewPackagePollpackageforumbraco4_AC94/image_thumb_10.png" width="274" border="0"></a> </p>
<p>You can download the package here: <a title="http://our.umbraco.org/projects/poll" href="http://our.umbraco.org/projects/poll">http://our.umbraco.org/projects/poll</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nibble.be/?feed=rss2&amp;p=69</wfw:commentRss>
		</item>
	</channel>
</rss>
