<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Footprints in the snow of a warped mind - Umbraco</title>
    <link>http://blogs.thesitedoctor.co.uk/test/</link>
    <description>newtelligence powered</description>
    <language>en-us</language>
    <copyright>Tim</copyright>
    <lastBuildDate>Tue, 09 Nov 2010 21:16:24 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.3.9074.18820</generator>
    <managingEditor>timgaunt@gmail.com</managingEditor>
    <webMaster>timgaunt@gmail.com</webMaster>
    <item>
      <trackback:ping>http://blogs.thesitedoctor.co.uk/test/Trackback.aspx?guid=3c783a9f-6450-4b6b-a372-5bb8c9ca109f</trackback:ping>
      <pingback:server>http://blogs.thesitedoctor.co.uk/test/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,3c783a9f-6450-4b6b-a372-5bb8c9ca109f.aspx</pingback:target>
      <dc:creator>Tim</dc:creator>
      <wfw:comment>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,3c783a9f-6450-4b6b-a372-5bb8c9ca109f.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.thesitedoctor.co.uk/test/SyndicationService.asmx/GetEntryCommentsRss?guid=3c783a9f-6450-4b6b-a372-5bb8c9ca109f</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" align="right" src="http://blogs.thesitedoctor.co.uk/tim/images/Download-any-document-types-values-as-cr_ECF7/image.png" width="320" height="260" />In
a follow up to my post yesterday -<a href="http://blogs.thesitedoctor.co.uk/tim/2010/11/08/Download+Umbraco+Content+Properties+Into+A+Crosstab+Table.aspx" target="_blank">How
to download Umbraco content properties into a crosstab table</a> this is the follow
up SQL Script that makes it even easier to download any Umbraco document type into
Excel.
</p>
        <p>
This SQL Script is fairly simple, basically what it does is it gets the properties
associated with the specified document type and then pivots the values so you end
up with a table of data that looks like this:
</p>
        <table border="0" cellspacing="0" cellpadding="2">
          <thead>
            <tr>
              <th valign="top" width="20">
Id</th>
              <th valign="top" width="20">
Property 1</th>
              <th valign="top" width="20">
Property 2</th>
              <th valign="top" width="20">
Property 3</th>
              <th valign="top" width="237">
Property n</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td valign="top" width="20">
123</td>
              <td valign="top" width="20">
String</td>
              <td valign="top" width="20">
Int</td>
              <td valign="top" width="20">
Date</td>
              <td valign="top" width="237">
xxx</td>
            </tr>
          </tbody>
        </table>
        <h2>How to use the script
</h2>
        <p>
All you need to do is set the parameter "@ContentTypeId" to the document type you
want (as in my <a href="http://blogs.thesitedoctor.co.uk/tim/2010/11/08/Download+Umbraco+Content+Properties+Into+A+Crosstab+Table.aspx" target="_blank">previous
post</a> you can get this by checking out the link on the document type).
</p>
        <p>
Once you set the id, just run the script and voila there's the data.
</p>
        <p>
If you run the code and get "Command(s) completed successfully" then you've not set
the id right so double check and try again.
</p>
        <h2>The Script
</h2>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:40c53f65-8da0-43c3-ba9d-5f15451a170e" class="wlWriterEditableSmartContent">
          <pre class="brush: sql;">DECLARE @cols NVARCHAR(max), @ContentTypeId int
SET @ContentTypeId = 1074

SELECT  @cols = STUFF(( 
	SELECT DISTINCT TOP 100 PERCENT
        '],[' 
        + CONVERT(varchar, Name + ' (' + CONVERT(varchar, id) + ')', 255)
    FROM
		dbo.cmsPropertyType
	WHERE
		contentTypeId = @ContentTypeId
    ORDER BY
        '],[' 
        + CONVERT(varchar, Name + ' (' + CONVERT(varchar, id) + ')', 255)
    FOR XML PATH('')
), 1, 2, '') + ']'
--SELECT  @cols

DECLARE @query NVARCHAR(max)
SET @query = N'SELECT Id, ' + @cols + '
FROM
  (
		SELECT
			CONVERT(varchar, t.Name + '' ('' + CONVERT(varchar, t.id) + '')'', 255) As [PropId],
			contentNodeId As [Id],
			ISNULL(dataNvarchar, ISNULL(CONVERT(varchar, dataDate), ISNULL(CONVERT(varchar, dataInt), dataNtext))) As [Value]
		FROM
			dbo.cmsPropertyType t LEFT JOIN dbo.cmsPropertyData d ON t.id = d.propertytypeid
		WHERE
			contentTypeId = ' + CONVERT(varchar, @ContentTypeId) + ' 
) p
PIVOT
(
	MAX(Value) 
	FOR PropId IN ( '+ @cols +' )
) AS pvt
ORDER BY Id ASC'

--PRINT(@query)
EXECUTE(@query)</pre>
        </div>
        <img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=3c783a9f-6450-4b6b-a372-5bb8c9ca109f" />
      </body>
      <title>Download any Umbraco document type’s values as crosstab/Excel table</title>
      <guid isPermaLink="false">http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,3c783a9f-6450-4b6b-a372-5bb8c9ca109f.aspx</guid>
      <link>http://blogs.thesitedoctor.co.uk/test/2010/11/09/DownloadAnyUmbracoDocumentTypesValuesAsCrosstabExcelTable.aspx</link>
      <pubDate>Tue, 09 Nov 2010 21:16:24 GMT</pubDate>
      <description>&lt;p&gt;
&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" align="right" src="http://blogs.thesitedoctor.co.uk/tim/images/Download-any-document-types-values-as-cr_ECF7/image.png" width="320" height="260" /&gt;In
a follow up to my post yesterday -&lt;a href="http://blogs.thesitedoctor.co.uk/tim/2010/11/08/Download+Umbraco+Content+Properties+Into+A+Crosstab+Table.aspx" target="_blank"&gt;How
to download Umbraco content properties into a crosstab table&lt;/a&gt; this is the follow
up SQL Script that makes it even easier to download any Umbraco document type into
Excel.
&lt;/p&gt;
&lt;p&gt;
This SQL Script is fairly simple, basically what it does is it gets the properties
associated with the specified document type and then pivots the values so you end
up with a table of data that looks like this:
&lt;/p&gt;
&lt;table border="0" cellspacing="0" cellpadding="2"&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th valign="top" width="20"&gt;
Id&lt;/th&gt;
&lt;th valign="top" width="20"&gt;
Property 1&lt;/th&gt;
&lt;th valign="top" width="20"&gt;
Property 2&lt;/th&gt;
&lt;th valign="top" width="20"&gt;
Property 3&lt;/th&gt;
&lt;th valign="top" width="237"&gt;
Property n&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top" width="20"&gt;
123&lt;/td&gt;
&lt;td valign="top" width="20"&gt;
String&lt;/td&gt;
&lt;td valign="top" width="20"&gt;
Int&lt;/td&gt;
&lt;td valign="top" width="20"&gt;
Date&lt;/td&gt;
&lt;td valign="top" width="237"&gt;
xxx&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;How to use the script
&lt;/h2&gt;
&lt;p&gt;
All you need to do is set the parameter "@ContentTypeId" to the document type you
want (as in my &lt;a href="http://blogs.thesitedoctor.co.uk/tim/2010/11/08/Download+Umbraco+Content+Properties+Into+A+Crosstab+Table.aspx" target="_blank"&gt;previous
post&lt;/a&gt; you can get this by checking out the link on the document type).
&lt;/p&gt;
&lt;p&gt;
Once you set the id, just run the script and voila there's the data.
&lt;/p&gt;
&lt;p&gt;
If you run the code and get "Command(s) completed successfully" then you've not set
the id right so double check and try again.
&lt;/p&gt;
&lt;h2&gt;The Script
&lt;/h2&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:40c53f65-8da0-43c3-ba9d-5f15451a170e" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush: sql;"&gt;DECLARE @cols NVARCHAR(max), @ContentTypeId int
SET @ContentTypeId = 1074

SELECT  @cols = STUFF(( 
	SELECT DISTINCT TOP 100 PERCENT
        '],[' 
        + CONVERT(varchar, Name + ' (' + CONVERT(varchar, id) + ')', 255)
    FROM
		dbo.cmsPropertyType
	WHERE
		contentTypeId = @ContentTypeId
    ORDER BY
        '],[' 
        + CONVERT(varchar, Name + ' (' + CONVERT(varchar, id) + ')', 255)
    FOR XML PATH('')
), 1, 2, '') + ']'
--SELECT  @cols

DECLARE @query NVARCHAR(max)
SET @query = N'SELECT Id, ' + @cols + '
FROM
  (
		SELECT
			CONVERT(varchar, t.Name + '' ('' + CONVERT(varchar, t.id) + '')'', 255) As [PropId],
			contentNodeId As [Id],
			ISNULL(dataNvarchar, ISNULL(CONVERT(varchar, dataDate), ISNULL(CONVERT(varchar, dataInt), dataNtext))) As [Value]
		FROM
			dbo.cmsPropertyType t LEFT JOIN dbo.cmsPropertyData d ON t.id = d.propertytypeid
		WHERE
			contentTypeId = ' + CONVERT(varchar, @ContentTypeId) + ' 
) p
PIVOT
(
	MAX(Value) 
	FOR PropId IN ( '+ @cols +' )
) AS pvt
ORDER BY Id ASC'

--PRINT(@query)
EXECUTE(@query)&lt;/pre&gt;
&lt;/div&gt;
&lt;img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=3c783a9f-6450-4b6b-a372-5bb8c9ca109f" /&gt;</description>
      <comments>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,3c783a9f-6450-4b6b-a372-5bb8c9ca109f.aspx</comments>
      <category>SQL</category>
      <category>SQL Server</category>
      <category>The Site Doctor</category>
      <category>Umbraco</category>
      <category>Web Development</category>
    </item>
    <item>
      <trackback:ping>http://blogs.thesitedoctor.co.uk/test/Trackback.aspx?guid=b9a65412-9eeb-411a-b5b3-174acfd3be95</trackback:ping>
      <pingback:server>http://blogs.thesitedoctor.co.uk/test/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,b9a65412-9eeb-411a-b5b3-174acfd3be95.aspx</pingback:target>
      <dc:creator>Tim</dc:creator>
      <wfw:comment>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,b9a65412-9eeb-411a-b5b3-174acfd3be95.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.thesitedoctor.co.uk/test/SyndicationService.asmx/GetEntryCommentsRss?guid=b9a65412-9eeb-411a-b5b3-174acfd3be95</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Have you ever needed to get a download of your Umbraco content nodes in a cross-tab
query e.g. download contact form data from Doc2Form? Using Umbraco's Contour product
makes this a breeze but what about older systems? Thankfully, it's not actually that
difficult.
</p>
        <p>
We have a contact us form on one of our sites which uses an old version of Doc2Form
which emails the customer details of the enquiry. One benefit is it also saves it
to the recycle bin as a document with the name: "RE: SYSTEM DATA: umbraco master root".
With that in mind, we can use SQL Server's PIVOT functionality to pull the data out
in a nicely formatted manner.
</p>
        <p>
Firstly you'll need to know the id's of the document type's properties, there are
numerous ways to do this:
</p>
        <h4>1. Just look at the cmsPropertyData table for a couple of content nodes (I could
spot the ones I was after fairly easily)
</h4>
        <h4> 
</h4>
        <h4>2. Query the cmsPropertyType table:
</h4>
        <p>
Find the contentTypeId of the document type -you can do this by hovering your mouse
over the document type in the tree and checking out the status bar (you can see the
contentTypeId in brackets in the bottom left -mine here is 1074):
</p>
        <p>
          <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://blogs.thesitedoctor.co.uk/tim/images/Download-Doc2Form-submissions-into-a-cro_E327/image.png" width="380" height="193" />
        </p>
        <p>
Once you have the contentTypeId of the document type, you can then get the ids of
all the properties you're after by replacing "xxx" with your property id in the following
script:
</p>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:71eda8ba-092a-44b9-b9fc-6a45ae1d9b07" class="wlWriterEditableSmartContent">
          <pre class="brush: sql;">SELECT * FROM dbo.cmsPropertyType WHERE contentTypeId = xxx</pre>
        </div>
        <h4>3. Get it from the source of the document type editor
</h4>
        <p>
An alternative way is to examine the HTML of the Document Type editor. If you view
the source on the "Generic Properties" tab and scroll to the section you're interested
in (there'll be a h2 with the same name) you will find a ul that has the class of
"genericPropertyList".
</p>
        <p>
Each li of that ul will have the relevant id as part of it's id e.g. for a section
called "Enquiry Form" the id will be: "EnquiryFormContents_49" where "49" is the id
we're interested in. You can see mine (49, 50, 51 and 52 below):
</p>
        <p>
          <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://blogs.thesitedoctor.co.uk/tim/images/Download-Doc2Form-submissions-into-a-cro_E327/image_3.png" width="704" height="186" />
        </p>
        <p>
Once you have these ids to hand (mine were 49, 50, 51 and 52) you just need to update
the code below and run against your Umbraco database:
</p>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:2f63fc8a-d1ea-42b9-b6ef-f5a410c9b989" class="wlWriterEditableSmartContent">
          <pre class="brush: sql;">SELECT
	contentNodeId As [Id], 
	[49] As [Name], 
	[50] As [Telephone], 
	[51] As [Email Address], 
	[52] As [Notes]
FROM
(
	SELECT contentNodeId, propertytypeid, ISNULL(dataNvarchar, dataNtext) As [Value]
	FROM dbo.cmsPropertyData
) As src
PIVOT (
	MAX(Value) 
	FOR propertytypeid in ([49], [50], [51], [52])
) aS pvt
WHERE [50] IS NOT NULL OR [51] IS NOT NULL
ORDER BY contentNodeId</pre>
        </div>
        <p>
 
</p>
        <p>
That will then produce some lovely formatted data for you, my example above produced:
</p>
        <table border="0" cellspacing="0" cellpadding="2">
          <thead>
            <tr>
              <th valign="top" width="100">
Id</th>
              <th valign="top" width="100">
Name</th>
              <th valign="top" width="100">
Telephone</th>
              <th valign="top" width="100">
Email Address</th>
              <th valign="top" width="100">
Notes</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td valign="top" width="100">
1154</td>
              <td valign="top" width="100">
Example</td>
              <td valign="top" width="100">
01234567890</td>
              <td valign="top" width="100">
                <a href="mailto:test@test.com">test@test.com</a>
              </td>
              <td valign="top" width="100">
Please contact me as soon as possible about your great site, thanks.</td>
            </tr>
          </tbody>
        </table>
        <p>
 
</p>
        <p>
It's also possible to automate this entire script so you don't need to find out the
property ids, I'll post that separately.
</p>
        <img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=b9a65412-9eeb-411a-b5b3-174acfd3be95" />
      </body>
      <title>Download Umbraco content properties into a crosstab table</title>
      <guid isPermaLink="false">http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,b9a65412-9eeb-411a-b5b3-174acfd3be95.aspx</guid>
      <link>http://blogs.thesitedoctor.co.uk/test/2010/11/08/DownloadUmbracoContentPropertiesIntoACrosstabTable.aspx</link>
      <pubDate>Mon, 08 Nov 2010 16:37:19 GMT</pubDate>
      <description>&lt;p&gt;
Have you ever needed to get a download of your Umbraco content nodes in a cross-tab
query e.g. download contact form data from Doc2Form? Using Umbraco's Contour product
makes this a breeze but what about older systems? Thankfully, it's not actually that
difficult.
&lt;/p&gt;
&lt;p&gt;
We have a contact us form on one of our sites which uses an old version of Doc2Form
which emails the customer details of the enquiry. One benefit is it also saves it
to the recycle bin as a document with the name: "RE: SYSTEM DATA: umbraco master root".
With that in mind, we can use SQL Server's PIVOT functionality to pull the data out
in a nicely formatted manner.
&lt;/p&gt;
&lt;p&gt;
Firstly you'll need to know the id's of the document type's properties, there are
numerous ways to do this:
&lt;/p&gt;
&lt;h4&gt;1. Just look at the cmsPropertyData table for a couple of content nodes (I could
spot the ones I was after fairly easily)
&lt;/h4&gt;
&lt;h4&gt;&amp;#160;
&lt;/h4&gt;
&lt;h4&gt;2. Query the cmsPropertyType table:
&lt;/h4&gt;
&lt;p&gt;
Find the contentTypeId of the document type -you can do this by hovering your mouse
over the document type in the tree and checking out the status bar (you can see the
contentTypeId in brackets in the bottom left -mine here is 1074):
&lt;/p&gt;
&lt;p&gt;
&lt;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://blogs.thesitedoctor.co.uk/tim/images/Download-Doc2Form-submissions-into-a-cro_E327/image.png" width="380" height="193" /&gt;
&lt;/p&gt;
&lt;p&gt;
Once you have the contentTypeId of the document type, you can then get the ids of
all the properties you're after by replacing "xxx" with your property id in the following
script:
&lt;/p&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:71eda8ba-092a-44b9-b9fc-6a45ae1d9b07" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush: sql;"&gt;SELECT * FROM dbo.cmsPropertyType WHERE contentTypeId = xxx&lt;/pre&gt;
&lt;/div&gt;
&lt;h4&gt;3. Get it from the source of the document type editor
&lt;/h4&gt;
&lt;p&gt;
An alternative way is to examine the HTML of the Document Type editor. If you view
the source on the "Generic Properties" tab and scroll to the section you're interested
in (there'll be a h2 with the same name) you will find a ul that has the class of
"genericPropertyList".
&lt;/p&gt;
&lt;p&gt;
Each li of that ul will have the relevant id as part of it's id e.g. for a section
called "Enquiry Form" the id will be: "EnquiryFormContents_49" where "49" is the id
we're interested in. You can see mine (49, 50, 51 and 52 below):
&lt;/p&gt;
&lt;p&gt;
&lt;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://blogs.thesitedoctor.co.uk/tim/images/Download-Doc2Form-submissions-into-a-cro_E327/image_3.png" width="704" height="186" /&gt;
&lt;/p&gt;
&lt;p&gt;
Once you have these ids to hand (mine were 49, 50, 51 and 52) you just need to update
the code below and run against your Umbraco database:
&lt;/p&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:2f63fc8a-d1ea-42b9-b6ef-f5a410c9b989" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush: sql;"&gt;SELECT
	contentNodeId As [Id], 
	[49] As [Name], 
	[50] As [Telephone], 
	[51] As [Email Address], 
	[52] As [Notes]
FROM
(
	SELECT contentNodeId, propertytypeid, ISNULL(dataNvarchar, dataNtext) As [Value]
	FROM dbo.cmsPropertyData
) As src
PIVOT (
	MAX(Value) 
	FOR propertytypeid in ([49], [50], [51], [52])
) aS pvt
WHERE [50] IS NOT NULL OR [51] IS NOT NULL
ORDER BY contentNodeId&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
That will then produce some lovely formatted data for you, my example above produced:
&lt;/p&gt;
&lt;table border="0" cellspacing="0" cellpadding="2"&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th valign="top" width="100"&gt;
Id&lt;/th&gt;
&lt;th valign="top" width="100"&gt;
Name&lt;/th&gt;
&lt;th valign="top" width="100"&gt;
Telephone&lt;/th&gt;
&lt;th valign="top" width="100"&gt;
Email Address&lt;/th&gt;
&lt;th valign="top" width="100"&gt;
Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top" width="100"&gt;
1154&lt;/td&gt;
&lt;td valign="top" width="100"&gt;
Example&lt;/td&gt;
&lt;td valign="top" width="100"&gt;
01234567890&lt;/td&gt;
&lt;td valign="top" width="100"&gt;
&lt;a href="mailto:test@test.com"&gt;test@test.com&lt;/a&gt;&lt;/td&gt;
&lt;td valign="top" width="100"&gt;
Please contact me as soon as possible about your great site, thanks.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
It's also possible to automate this entire script so you don't need to find out the
property ids, I'll post that separately.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=b9a65412-9eeb-411a-b5b3-174acfd3be95" /&gt;</description>
      <comments>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,b9a65412-9eeb-411a-b5b3-174acfd3be95.aspx</comments>
      <category>Development</category>
      <category>SQL</category>
      <category>SQL Server</category>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://blogs.thesitedoctor.co.uk/test/Trackback.aspx?guid=f136b7cb-f755-4011-83f2-a1e2192fd666</trackback:ping>
      <pingback:server>http://blogs.thesitedoctor.co.uk/test/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,f136b7cb-f755-4011-83f2-a1e2192fd666.aspx</pingback:target>
      <dc:creator>Tim</dc:creator>
      <wfw:comment>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,f136b7cb-f755-4011-83f2-a1e2192fd666.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.thesitedoctor.co.uk/test/SyndicationService.asmx/GetEntryCommentsRss?guid=f136b7cb-f755-4011-83f2-a1e2192fd666</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px" title="header[1]" border="0" alt="header[1]" align="right" src="http://blogs.thesitedoctor.co.uk/tim/images/64eb161c0baa_93C0/header1.jpg" width="240" height="320" />Probably
one of the most common features of an ecommerce systems is to "retrieve my details"
when logging in -after all that's why you create an account with the seller isn't
it?
</p>
        <p>
Out of the box, <a title="e-commerce package for Umbraco" href="http://www.ucommerce.dk" target="_blank">uCommerce</a> has
XSLT to retrieve the customer's last x addresses but one thing it didn't do was automatically
re-assign the customer's details when logging in using the built in Umbraco membership
code so we need to work around it ourselves -don't worry, it's not too hard (all the
code is below for you).
</p>
        <h2>Background
</h2>
        <p>
All customer addresses are stored in the uCommerce_Address table automatically, there
should be one unique address per customer however if you're on an earlier release
you may find you have several copies of the same address for each customer -this is
a bug that's been sorted in v1.0.5.0 so upgrade if you can.
</p>
        <p>
Now you'd be forgiven for thinking that you can just select the address from the uCommerce_Address
table and then assign the id to the BillingAddressId property of your purchase order
however if you do that, you'll find you get the error:
</p>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:d9065df3-b3b8-496d-a9a1-63b491ac4cd1" class="wlWriterEditableSmartContent">
          <pre class="brush: text;">The UPDATE statement conflicted with the FOREIGN KEY constraint "FK_uCommerce_PurchaseOrder_uCommerce_OrderAddress". 
The conflict occurred in database "CommsReadyCMS", table "dbo.uCommerce_OrderAddress", column 'OrderAddressId'.
The statement has been terminated.</pre>
        </div>
        <p>
 
</p>
        <p>
You'll get this because there is also a second table involved -uCommerce_OrderAddress.
uCommerce_OrderAddress stores the actual address used throughout the order process
incase the customer changes an address in the future, the order will always have the
correct address.
</p>
        <h2>The Solution
</h2>
        <p>
Working around this isn't actually too difficult as mentioned before. The easiest
solution is to create a new User Control in Visual Studio (I'll call mine login.ascx)
and hook into the LoggedIn event. Once logged in, get the Umbraco member and from
that, get the customer's billing address.
</p>
        <p>
There's one caveat that I found with uCommerce and that's the way it gets the address.
At the moment, there is a function on customer "GetAddress", this is great however
if you check out the code it calls, it actually gets the customer's first address
from the database -rather than the last address used. I don't think this is a bug
as in most cases the first address you enter is your main address. I'll blog separately
about managing a default address within the members section.
</p>
        <p>
The code below however retrieves the most recently added address from the database
</p>
        <h3>Login.ascx
</h3>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:d68c8cf3-8452-49f9-b0bb-8289818fa29a" class="wlWriterEditableSmartContent">
          <pre class="brush: html;">&lt;asp:literal runat="server" ID="litLoggedIn" /&gt;
&lt;asp:literal runat="server" ID="litLoggedOut" /&gt;
&lt;asp:Login runat="server" id="lgnForm" CssClass="checkout-details" 
	DisplayRememberMe="false" TitleText="" OnLoggedIn="lgnForm_LoggedIn"
	UserNameLabelText="Email Address" /&gt;</pre>
        </div>
        <p>
 
</p>
        <h3>Login.ascx.cs
</h3>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:3dd0ffef-512f-4f41-908f-26b340668e45" class="wlWriterEditableSmartContent">
          <pre class="brush: c#;">protected void lgnForm_LoggedIn(object sender, EventArgs e)
{
    //If the user has a basket, wire up the shipping address with their last order details
    var basket = SiteContext.Current.OrderContext.GetBasket(true);
    if (basket != null)
    {
        //Get the customers current order
        var po = basket.PurchaseOrder;
        //Look for a shipping address
        var add = po.GetBillingAddress();
        //We only need to assign the address if there isn't already one assigned to this order
        if (add == null)
        {
            //Get the customer who's just logged in
            var mem = Membership.GetUser(lgnForm.UserName);
            //To be safe check that we have a member
            if (mem != null)
            {
                //Find the customer
                var customer = Customer.ForUmbracoMember(Convert.ToInt32(mem.ProviderUserKey));
                if (customer != null)
                {
                    //Get the customer's most recent address
                    var previousAddress = customer.Addresses.ToList().LastOrDefault(a =&gt; a.AddressName == "Billing");
                    //If you want to get the customer's first address just uncomment this line
                    //var previousAddress = customer.GetAddress("Billing");

                    //Populate the billing address with the address)
                    if (previousAddress != null)
                    {
                        OrderAddress address = new OrderAddress
                                {
                                    FirstName = previousAddress.FirstName,
                                    LastName = previousAddress.LastName,
                                    EmailAddress = previousAddress.EmailAddress,
                                    PhoneNumber = previousAddress.PhoneNumber,
                                    MobilePhoneNumber = previousAddress.MobilePhoneNumber,
                                    CompanyName = previousAddress.CompanyName,
                                    Line1 = previousAddress.Line1,
                                    Line2 = previousAddress.Line2,
                                    PostalCode = previousAddress.PostalCode,
                                    City = previousAddress.City,
                                    State = previousAddress.State,
                                    Attention = previousAddress.Attention,
                                    CountryId = previousAddress.CountryId,
                                    AddressName = "Billing",
                                    OrderId = new int?(po.OrderId)
                                };
                        //Store the address in the database
                        address.Save();
                        //Assign the address to the purchase order
                        po.BillingAddressId = new int?(address.OrderAddressId);
                        //Save the purchase order (shopping cart)
                        po.Save();
                    }
                }
            }
        }
    }
}
</pre>
        </div>
        <img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=f136b7cb-f755-4011-83f2-a1e2192fd666" />
      </body>
      <title>Retrieve the customer’s last address when logging into uCommerce</title>
      <guid isPermaLink="false">http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,f136b7cb-f755-4011-83f2-a1e2192fd666.aspx</guid>
      <link>http://blogs.thesitedoctor.co.uk/test/2010/10/26/RetrieveTheCustomersLastAddressWhenLoggingIntoUCommerce.aspx</link>
      <pubDate>Tue, 26 Oct 2010 10:31:55 GMT</pubDate>
      <description>&lt;p&gt;
&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px" title="header[1]" border="0" alt="header[1]" align="right" src="http://blogs.thesitedoctor.co.uk/tim/images/64eb161c0baa_93C0/header1.jpg" width="240" height="320" /&gt;Probably
one of the most common features of an ecommerce systems is to "retrieve my details"
when logging in -after all that's why you create an account with the seller isn't
it?
&lt;/p&gt;
&lt;p&gt;
Out of the box, &lt;a title="e-commerce package for Umbraco" href="http://www.ucommerce.dk" target="_blank"&gt;uCommerce&lt;/a&gt; has
XSLT to retrieve the customer's last x addresses but one thing it didn't do was automatically
re-assign the customer's details when logging in using the built in Umbraco membership
code so we need to work around it ourselves -don't worry, it's not too hard (all the
code is below for you).
&lt;/p&gt;
&lt;h2&gt;Background
&lt;/h2&gt;
&lt;p&gt;
All customer addresses are stored in the uCommerce_Address table automatically, there
should be one unique address per customer however if you're on an earlier release
you may find you have several copies of the same address for each customer -this is
a bug that's been sorted in v1.0.5.0 so upgrade if you can.
&lt;/p&gt;
&lt;p&gt;
Now you'd be forgiven for thinking that you can just select the address from the uCommerce_Address
table and then assign the id to the BillingAddressId property of your purchase order
however if you do that, you'll find you get the error:
&lt;/p&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:d9065df3-b3b8-496d-a9a1-63b491ac4cd1" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush: text;"&gt;The UPDATE statement conflicted with the FOREIGN KEY constraint "FK_uCommerce_PurchaseOrder_uCommerce_OrderAddress". 
The conflict occurred in database "CommsReadyCMS", table "dbo.uCommerce_OrderAddress", column 'OrderAddressId'.
The statement has been terminated.&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
You'll get this because there is also a second table involved -uCommerce_OrderAddress.
uCommerce_OrderAddress stores the actual address used throughout the order process
incase the customer changes an address in the future, the order will always have the
correct address.
&lt;/p&gt;
&lt;h2&gt;The Solution
&lt;/h2&gt;
&lt;p&gt;
Working around this isn't actually too difficult as mentioned before. The easiest
solution is to create a new User Control in Visual Studio (I'll call mine login.ascx)
and hook into the LoggedIn event. Once logged in, get the Umbraco member and from
that, get the customer's billing address.
&lt;/p&gt;
&lt;p&gt;
There's one caveat that I found with uCommerce and that's the way it gets the address.
At the moment, there is a function on customer "GetAddress", this is great however
if you check out the code it calls, it actually gets the customer's first address
from the database -rather than the last address used. I don't think this is a bug
as in most cases the first address you enter is your main address. I'll blog separately
about managing a default address within the members section.
&lt;/p&gt;
&lt;p&gt;
The code below however retrieves the most recently added address from the database
&lt;/p&gt;
&lt;h3&gt;Login.ascx
&lt;/h3&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:d68c8cf3-8452-49f9-b0bb-8289818fa29a" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush: html;"&gt;&amp;lt;asp:literal runat="server" ID="litLoggedIn" /&amp;gt;
&amp;lt;asp:literal runat="server" ID="litLoggedOut" /&amp;gt;
&amp;lt;asp:Login runat="server" id="lgnForm" CssClass="checkout-details" 
	DisplayRememberMe="false" TitleText="" OnLoggedIn="lgnForm_LoggedIn"
	UserNameLabelText="Email Address" /&amp;gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;h3&gt;Login.ascx.cs
&lt;/h3&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:3dd0ffef-512f-4f41-908f-26b340668e45" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush: c#;"&gt;protected void lgnForm_LoggedIn(object sender, EventArgs e)
{
    //If the user has a basket, wire up the shipping address with their last order details
    var basket = SiteContext.Current.OrderContext.GetBasket(true);
    if (basket != null)
    {
        //Get the customers current order
        var po = basket.PurchaseOrder;
        //Look for a shipping address
        var add = po.GetBillingAddress();
        //We only need to assign the address if there isn't already one assigned to this order
        if (add == null)
        {
            //Get the customer who's just logged in
            var mem = Membership.GetUser(lgnForm.UserName);
            //To be safe check that we have a member
            if (mem != null)
            {
                //Find the customer
                var customer = Customer.ForUmbracoMember(Convert.ToInt32(mem.ProviderUserKey));
                if (customer != null)
                {
                    //Get the customer's most recent address
                    var previousAddress = customer.Addresses.ToList().LastOrDefault(a =&amp;gt; a.AddressName == "Billing");
                    //If you want to get the customer's first address just uncomment this line
                    //var previousAddress = customer.GetAddress("Billing");

                    //Populate the billing address with the address)
                    if (previousAddress != null)
                    {
                        OrderAddress address = new OrderAddress
                                {
                                    FirstName = previousAddress.FirstName,
                                    LastName = previousAddress.LastName,
                                    EmailAddress = previousAddress.EmailAddress,
                                    PhoneNumber = previousAddress.PhoneNumber,
                                    MobilePhoneNumber = previousAddress.MobilePhoneNumber,
                                    CompanyName = previousAddress.CompanyName,
                                    Line1 = previousAddress.Line1,
                                    Line2 = previousAddress.Line2,
                                    PostalCode = previousAddress.PostalCode,
                                    City = previousAddress.City,
                                    State = previousAddress.State,
                                    Attention = previousAddress.Attention,
                                    CountryId = previousAddress.CountryId,
                                    AddressName = "Billing",
                                    OrderId = new int?(po.OrderId)
                                };
                        //Store the address in the database
                        address.Save();
                        //Assign the address to the purchase order
                        po.BillingAddressId = new int?(address.OrderAddressId);
                        //Save the purchase order (shopping cart)
                        po.Save();
                    }
                }
            }
        }
    }
}
&lt;/pre&gt;
&lt;/div&gt;
&lt;img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=f136b7cb-f755-4011-83f2-a1e2192fd666" /&gt;</description>
      <comments>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,f136b7cb-f755-4011-83f2-a1e2192fd666.aspx</comments>
      <category>ASP.Net</category>
      <category>C#</category>
      <category>eCommerce</category>
      <category>The Site Doctor</category>
      <category>uCommerce</category>
      <category>Umbraco</category>
      <category>Web Development</category>
    </item>
    <item>
      <trackback:ping>http://blogs.thesitedoctor.co.uk/test/Trackback.aspx?guid=24a92c7d-a542-453a-ba32-20d44e192d8a</trackback:ping>
      <pingback:server>http://blogs.thesitedoctor.co.uk/test/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,24a92c7d-a542-453a-ba32-20d44e192d8a.aspx</pingback:target>
      <dc:creator>Tim</dc:creator>
      <wfw:comment>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,24a92c7d-a542-453a-ba32-20d44e192d8a.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.thesitedoctor.co.uk/test/SyndicationService.asmx/GetEntryCommentsRss?guid=24a92c7d-a542-453a-ba32-20d44e192d8a</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
After my last <a title="e-commerce package for Umbraco" href="http://www.ucommerce.dk" target="_blank">UCommerce</a> post
on <a href="http://blogs.thesitedoctor.co.uk/tim/2010/10/01/Deleting+Test+Orders+And+Baskets+From+UCommerce.aspx" target="_blank">how
to delete test orders and baskets from UCommerce</a>, Søren suggested I extended the
delete all baskets code to take into account when it was created. As my last code
was relating to deleting test orders/baskets (and so would want to get rid of them
all), I decided to post this one separately.
</p>
        <h2>Delete all baskets older than x days
</h2>
        <p>
To use this, all you need to do is change the @addedBefore parameter to whatever date/time
you want (or just adjust the –7 which represents seven days in the past.
</p>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:45241e23-0c18-443a-941a-ce974b893ca9" class="wlWriterEditableSmartContent">
          <pre class="brush: sql;">--Delete all carts purchaseorders and associated data within x days
DECLARE @addedBefore smalldatetime
--By default the script deletes everything older than 7 days
SET @addedBefore = DATEADD(dd, -7, GETDATE())

BEGIN TRAN

UPDATE uCommerce_PurchaseOrder SET BillingAddressId = NULL WHERE OrderNumber IS NULL AND CreatedDate &lt;= @addedBefore
DELETE a FROM uCommerce_Shipment a INNER JOIN uCommerce_PurchaseOrder b ON a.OrderId = b.OrderId WHERE b.OrderNumber IS NULL AND b.CreatedDate &lt;= @addedBefore
DELETE a FROM uCommerce_OrderAddress a INNER JOIN uCommerce_PurchaseOrder b ON a.OrderId = b.OrderId WHERE b.OrderNumber IS NULL AND b.CreatedDate &lt;= @addedBefore
DELETE a FROM uCommerce_OrderProperty a INNER JOIN uCommerce_PurchaseOrder b ON a.OrderId = b.OrderId WHERE b.OrderNumber IS NULL AND b.CreatedDate &lt;= @addedBefore
DELETE a FROM uCommerce_OrderLine a INNER JOIN uCommerce_PurchaseOrder b ON a.OrderId = b.OrderId WHERE b.OrderNumber IS NULL AND b.CreatedDate &lt;= @addedBefore
DELETE a FROM uCommerce_Payment a INNER JOIN uCommerce_PurchaseOrder b ON a.OrderId = b.OrderId WHERE b.OrderNumber IS NULL AND b.CreatedDate &lt;= @addedBefore
DELETE a FROM uCommerce_OrderStatusAudit a INNER JOIN uCommerce_PurchaseOrder b ON a.OrderId = b.OrderId WHERE b.OrderNumber IS NULL AND b.CreatedDate &lt;= @addedBefore
DELETE FROM uCommerce_PurchaseOrder WHERE OrderNumber IS NULL AND CreatedDate &lt;= @addedBefore

--Uncomment this
--COMMIT TRAN

--And comment out this
ROLLBACK TRAN</pre>
        </div>
        <img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=24a92c7d-a542-453a-ba32-20d44e192d8a" />
      </body>
      <title>Delete all UCommerce baskets older than x days</title>
      <guid isPermaLink="false">http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,24a92c7d-a542-453a-ba32-20d44e192d8a.aspx</guid>
      <link>http://blogs.thesitedoctor.co.uk/test/2010/10/04/DeleteAllUCommerceBasketsOlderThanXDays.aspx</link>
      <pubDate>Mon, 04 Oct 2010 09:14:31 GMT</pubDate>
      <description>&lt;p&gt;
After my last &lt;a title="e-commerce package for Umbraco" href="http://www.ucommerce.dk" target="_blank"&gt;UCommerce&lt;/a&gt; post
on &lt;a href="http://blogs.thesitedoctor.co.uk/tim/2010/10/01/Deleting+Test+Orders+And+Baskets+From+UCommerce.aspx" target="_blank"&gt;how
to delete test orders and baskets from UCommerce&lt;/a&gt;, Søren suggested I extended the
delete all baskets code to take into account when it was created. As my last code
was relating to deleting test orders/baskets (and so would want to get rid of them
all), I decided to post this one separately.
&lt;/p&gt;
&lt;h2&gt;Delete all baskets older than x days
&lt;/h2&gt;
&lt;p&gt;
To use this, all you need to do is change the @addedBefore parameter to whatever date/time
you want (or just adjust the –7 which represents seven days in the past.
&lt;/p&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:45241e23-0c18-443a-941a-ce974b893ca9" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush: sql;"&gt;--Delete all carts purchaseorders and associated data within x days
DECLARE @addedBefore smalldatetime
--By default the script deletes everything older than 7 days
SET @addedBefore = DATEADD(dd, -7, GETDATE())

BEGIN TRAN

UPDATE uCommerce_PurchaseOrder SET BillingAddressId = NULL WHERE OrderNumber IS NULL AND CreatedDate &amp;lt;= @addedBefore
DELETE a FROM uCommerce_Shipment a INNER JOIN uCommerce_PurchaseOrder b ON a.OrderId = b.OrderId WHERE b.OrderNumber IS NULL AND b.CreatedDate &amp;lt;= @addedBefore
DELETE a FROM uCommerce_OrderAddress a INNER JOIN uCommerce_PurchaseOrder b ON a.OrderId = b.OrderId WHERE b.OrderNumber IS NULL AND b.CreatedDate &amp;lt;= @addedBefore
DELETE a FROM uCommerce_OrderProperty a INNER JOIN uCommerce_PurchaseOrder b ON a.OrderId = b.OrderId WHERE b.OrderNumber IS NULL AND b.CreatedDate &amp;lt;= @addedBefore
DELETE a FROM uCommerce_OrderLine a INNER JOIN uCommerce_PurchaseOrder b ON a.OrderId = b.OrderId WHERE b.OrderNumber IS NULL AND b.CreatedDate &amp;lt;= @addedBefore
DELETE a FROM uCommerce_Payment a INNER JOIN uCommerce_PurchaseOrder b ON a.OrderId = b.OrderId WHERE b.OrderNumber IS NULL AND b.CreatedDate &amp;lt;= @addedBefore
DELETE a FROM uCommerce_OrderStatusAudit a INNER JOIN uCommerce_PurchaseOrder b ON a.OrderId = b.OrderId WHERE b.OrderNumber IS NULL AND b.CreatedDate &amp;lt;= @addedBefore
DELETE FROM uCommerce_PurchaseOrder WHERE OrderNumber IS NULL AND CreatedDate &amp;lt;= @addedBefore

--Uncomment this
--COMMIT TRAN

--And comment out this
ROLLBACK TRAN&lt;/pre&gt;
&lt;/div&gt;
&lt;img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=24a92c7d-a542-453a-ba32-20d44e192d8a" /&gt;</description>
      <comments>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,24a92c7d-a542-453a-ba32-20d44e192d8a.aspx</comments>
      <category>Development</category>
      <category>eCommerce</category>
      <category>SQL</category>
      <category>SQL Server</category>
      <category>uCommerce</category>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://blogs.thesitedoctor.co.uk/test/Trackback.aspx?guid=fcd3400c-32cd-4b96-819f-ce4adf0cab19</trackback:ping>
      <pingback:server>http://blogs.thesitedoctor.co.uk/test/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,fcd3400c-32cd-4b96-819f-ce4adf0cab19.aspx</pingback:target>
      <dc:creator>Tim</dc:creator>
      <wfw:comment>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,fcd3400c-32cd-4b96-819f-ce4adf0cab19.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.thesitedoctor.co.uk/test/SyndicationService.asmx/GetEntryCommentsRss?guid=fcd3400c-32cd-4b96-819f-ce4adf0cab19</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Although Søren has posted a helpful post on how to <a href="http://www.publicvoid.dk/DeletingPurchaseOrdersAndBasketsFromTheDatabaseInUCommerce.aspx" target="_blank">delete
entire purchase orders from the database here</a>, we needed something a little less
“all or nothing” so put the below together.
</p>
        <h2>Delete a specific order id
</h2>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:c810ee8f-ccc4-4cc1-a251-bd161573c8f7" class="wlWriterEditableSmartContent">
          <pre class="brush: sql;">--Delete purchaseorders and associated data based on order id
DECLARE @OrderNumber nvarchar(50)
SET @OrderNumber = 'TEST-40'

BEGIN TRAN

UPDATE uCommerce_PurchaseOrder SET BillingAddressId = NULL WHERE OrderNumber = @OrderNumber
DELETE a FROM uCommerce_Shipment a INNER JOIN uCommerce_PurchaseOrder b ON a.OrderId = b.OrderId WHERE b.OrderNumber = @OrderNumber
DELETE a FROM uCommerce_OrderAddress a INNER JOIN uCommerce_PurchaseOrder b ON a.OrderId = b.OrderId WHERE b.OrderNumber = @OrderNumber
DELETE a FROM uCommerce_OrderProperty a INNER JOIN uCommerce_PurchaseOrder b ON a.OrderId = b.OrderId WHERE b.OrderNumber = @OrderNumber
DELETE a FROM uCommerce_OrderLine a INNER JOIN uCommerce_PurchaseOrder b ON a.OrderId = b.OrderId WHERE b.OrderNumber = @OrderNumber
DELETE a FROM uCommerce_Payment a INNER JOIN uCommerce_PurchaseOrder b ON a.OrderId = b.OrderId WHERE b.OrderNumber = @OrderNumber
DELETE a FROM uCommerce_OrderStatusAudit a INNER JOIN uCommerce_PurchaseOrder b ON a.OrderId = b.OrderId WHERE b.OrderNumber = @OrderNumber
DELETE FROM uCommerce_PurchaseOrder WHERE OrderNumber = @OrderNumber

--TODO: Expand this so it checks for other orders
--DELETE a FROM uCommerce_Address a INNER JOIN uCommerce_PurchaseOrder b ON a.OrderId = b.OrderId WHERE b.OrderNumber = @OrderNumber
--DELETE a FROM uCommerce_Customer a INNER JOIN uCommerce_PurchaseOrder b ON a.OrderId = b.OrderId WHERE b.OrderNumber = @OrderNumber

--Uncomment this
--COMMIT TRAN

--And comment out this
ROLLBACK TRAN</pre>
        </div>
        <br />
        <p>
 
</p>
        <p>
 
</p>
        <h2>Delete all baskets
</h2>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:9b400326-be37-4795-bd43-3a5fd26fa77d" class="wlWriterEditableSmartContent">
          <pre class="brush: sql;">--Delete all carts purchaseorders and associated data

BEGIN TRAN

UPDATE uCommerce_PurchaseOrder SET BillingAddressId = NULL WHERE OrderNumber IS NULL
DELETE a FROM uCommerce_Shipment a INNER JOIN uCommerce_PurchaseOrder b ON a.OrderId = b.OrderId WHERE b.OrderNumber IS NULL
DELETE a FROM uCommerce_OrderAddress a INNER JOIN uCommerce_PurchaseOrder b ON a.OrderId = b.OrderId WHERE b.OrderNumber IS NULL
DELETE a FROM uCommerce_OrderProperty a INNER JOIN uCommerce_PurchaseOrder b ON a.OrderId = b.OrderId WHERE b.OrderNumber IS NULL
DELETE a FROM uCommerce_OrderLine a INNER JOIN uCommerce_PurchaseOrder b ON a.OrderId = b.OrderId WHERE b.OrderNumber IS NULL
DELETE a FROM uCommerce_Payment a INNER JOIN uCommerce_PurchaseOrder b ON a.OrderId = b.OrderId WHERE b.OrderNumber IS NULL
DELETE a FROM uCommerce_OrderStatusAudit a INNER JOIN uCommerce_PurchaseOrder b ON a.OrderId = b.OrderId WHERE b.OrderNumber IS NULL
DELETE FROM uCommerce_PurchaseOrder WHERE OrderNumber IS NULL

--TODO: Expand this so it checks for other orders
--DELETE a FROM uCommerce_Address a INNER JOIN uCommerce_PurchaseOrder b ON a.OrderId = b.OrderId WHERE b.NULL = @NULL
--DELETE a FROM uCommerce_Customer a INNER JOIN uCommerce_PurchaseOrder b ON a.OrderId = b.OrderId WHERE b.NULL = @NULL


--Uncomment this
--COMMIT TRAN

--And comment out this
ROLLBACK TRAN</pre>
        </div>
        <br />
        <p>
 
</p>
        <p>
          <strong>Update:</strong> At the request of Søren, I’ve altered the delete all baskets
post so it allows you to delete all baskets older than a given date, see: <a href="http://blogs.thesitedoctor.co.uk/tim/2010/10/04/Delete+All+UCommerce+Baskets+Older+Than+X+Days.aspx" target="_blank">Delete
all UCommerce baskets older than x days</a></p>
        <img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=fcd3400c-32cd-4b96-819f-ce4adf0cab19" />
      </body>
      <title>Deleting test orders and baskets from uCommerce</title>
      <guid isPermaLink="false">http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,fcd3400c-32cd-4b96-819f-ce4adf0cab19.aspx</guid>
      <link>http://blogs.thesitedoctor.co.uk/test/2010/10/01/DeletingTestOrdersAndBasketsFromUCommerce.aspx</link>
      <pubDate>Fri, 01 Oct 2010 11:53:43 GMT</pubDate>
      <description>&lt;p&gt;
Although Søren has posted a helpful post on how to &lt;a href="http://www.publicvoid.dk/DeletingPurchaseOrdersAndBasketsFromTheDatabaseInUCommerce.aspx" target="_blank"&gt;delete
entire purchase orders from the database here&lt;/a&gt;, we needed something a little less
“all or nothing” so put the below together.
&lt;/p&gt;
&lt;h2&gt;Delete a specific order id
&lt;/h2&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:c810ee8f-ccc4-4cc1-a251-bd161573c8f7" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush: sql;"&gt;--Delete purchaseorders and associated data based on order id
DECLARE @OrderNumber nvarchar(50)
SET @OrderNumber = 'TEST-40'

BEGIN TRAN

UPDATE uCommerce_PurchaseOrder SET BillingAddressId = NULL WHERE OrderNumber = @OrderNumber
DELETE a FROM uCommerce_Shipment a INNER JOIN uCommerce_PurchaseOrder b ON a.OrderId = b.OrderId WHERE b.OrderNumber = @OrderNumber
DELETE a FROM uCommerce_OrderAddress a INNER JOIN uCommerce_PurchaseOrder b ON a.OrderId = b.OrderId WHERE b.OrderNumber = @OrderNumber
DELETE a FROM uCommerce_OrderProperty a INNER JOIN uCommerce_PurchaseOrder b ON a.OrderId = b.OrderId WHERE b.OrderNumber = @OrderNumber
DELETE a FROM uCommerce_OrderLine a INNER JOIN uCommerce_PurchaseOrder b ON a.OrderId = b.OrderId WHERE b.OrderNumber = @OrderNumber
DELETE a FROM uCommerce_Payment a INNER JOIN uCommerce_PurchaseOrder b ON a.OrderId = b.OrderId WHERE b.OrderNumber = @OrderNumber
DELETE a FROM uCommerce_OrderStatusAudit a INNER JOIN uCommerce_PurchaseOrder b ON a.OrderId = b.OrderId WHERE b.OrderNumber = @OrderNumber
DELETE FROM uCommerce_PurchaseOrder WHERE OrderNumber = @OrderNumber

--TODO: Expand this so it checks for other orders
--DELETE a FROM uCommerce_Address a INNER JOIN uCommerce_PurchaseOrder b ON a.OrderId = b.OrderId WHERE b.OrderNumber = @OrderNumber
--DELETE a FROM uCommerce_Customer a INNER JOIN uCommerce_PurchaseOrder b ON a.OrderId = b.OrderId WHERE b.OrderNumber = @OrderNumber

--Uncomment this
--COMMIT TRAN

--And comment out this
ROLLBACK TRAN&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;h2&gt;Delete all baskets
&lt;/h2&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:9b400326-be37-4795-bd43-3a5fd26fa77d" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush: sql;"&gt;--Delete all carts purchaseorders and associated data

BEGIN TRAN

UPDATE uCommerce_PurchaseOrder SET BillingAddressId = NULL WHERE OrderNumber IS NULL
DELETE a FROM uCommerce_Shipment a INNER JOIN uCommerce_PurchaseOrder b ON a.OrderId = b.OrderId WHERE b.OrderNumber IS NULL
DELETE a FROM uCommerce_OrderAddress a INNER JOIN uCommerce_PurchaseOrder b ON a.OrderId = b.OrderId WHERE b.OrderNumber IS NULL
DELETE a FROM uCommerce_OrderProperty a INNER JOIN uCommerce_PurchaseOrder b ON a.OrderId = b.OrderId WHERE b.OrderNumber IS NULL
DELETE a FROM uCommerce_OrderLine a INNER JOIN uCommerce_PurchaseOrder b ON a.OrderId = b.OrderId WHERE b.OrderNumber IS NULL
DELETE a FROM uCommerce_Payment a INNER JOIN uCommerce_PurchaseOrder b ON a.OrderId = b.OrderId WHERE b.OrderNumber IS NULL
DELETE a FROM uCommerce_OrderStatusAudit a INNER JOIN uCommerce_PurchaseOrder b ON a.OrderId = b.OrderId WHERE b.OrderNumber IS NULL
DELETE FROM uCommerce_PurchaseOrder WHERE OrderNumber IS NULL

--TODO: Expand this so it checks for other orders
--DELETE a FROM uCommerce_Address a INNER JOIN uCommerce_PurchaseOrder b ON a.OrderId = b.OrderId WHERE b.NULL = @NULL
--DELETE a FROM uCommerce_Customer a INNER JOIN uCommerce_PurchaseOrder b ON a.OrderId = b.OrderId WHERE b.NULL = @NULL


--Uncomment this
--COMMIT TRAN

--And comment out this
ROLLBACK TRAN&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Update:&lt;/strong&gt; At the request of Søren, I’ve altered the delete all baskets
post so it allows you to delete all baskets older than a given date, see: &lt;a href="http://blogs.thesitedoctor.co.uk/tim/2010/10/04/Delete+All+UCommerce+Baskets+Older+Than+X+Days.aspx" target="_blank"&gt;Delete
all UCommerce baskets older than x days&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=fcd3400c-32cd-4b96-819f-ce4adf0cab19" /&gt;</description>
      <comments>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,fcd3400c-32cd-4b96-819f-ce4adf0cab19.aspx</comments>
      <category>Development</category>
      <category>eCommerce</category>
      <category>SQL</category>
      <category>SQL Server</category>
      <category>uCommerce</category>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://blogs.thesitedoctor.co.uk/test/Trackback.aspx?guid=431f46cd-283c-4fc8-b38c-4bb5de06fdc8</trackback:ping>
      <pingback:server>http://blogs.thesitedoctor.co.uk/test/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,431f46cd-283c-4fc8-b38c-4bb5de06fdc8.aspx</pingback:target>
      <dc:creator>Tim</dc:creator>
      <wfw:comment>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,431f46cd-283c-4fc8-b38c-4bb5de06fdc8.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.thesitedoctor.co.uk/test/SyndicationService.asmx/GetEntryCommentsRss?guid=431f46cd-283c-4fc8-b38c-4bb5de06fdc8</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <img style="border-bottom: 0px; border-left: 0px; margin: 0px 0px 10px 10px; display: inline; border-top: 0px; border-right: 0px" class="wlDisabledImage" title="ucommerce-logo-symbol[1]" border="0" alt="ucommerce-logo-symbol[1]" align="right" src="http://blogs.thesitedoctor.co.uk/tim/images/GettingstartedwithuCommerce_C43D/ucommercelogosymbol1.png" width="260" height="260" />I
thought seeing as <a title="e-commerce package for Umbraco" href="http://www.ucommerce.dk" target="_blank">uCommerce</a> is
now an actual product I would start to overview an install/configuration of <a title="e-commerce package for Umbraco" href="http://www.ucommerce.dk" target="_blank">uCommerce</a> assuming
no prior knowledge of <a title="e-commerce package for Umbraco" href="http://www.ucommerce.dk" target="_blank">uCommerce</a>.
Firstly, let me start of by saying that once you've got your head around uCommerce
and some of it's complexities, you'll find it a fantastic product that makes creating
a new ecommerce website as easy as setting up a standard Umbraco website. It is still
missing a few features, but you can easily work around these with a bit of custom
XSLT/C#.
</p>
        <p>
Ok, back to setting up your first uCommerce website. I've grouped these into what
I feel are logical sections but if I've missed something, please let me know.
</p>
        <h2>1. Install the uCommerce Package
</h2>
        <p>
If you've not already done so, go to the <a href="http://ucommerce.dk/en/get-it-now/download.aspx">uCommerce
Download page</a> and download the uCommerce package (at time of writing, I'm using
1.0.4.2) and then download the uCommerce Store package (currently 1.0.1.2).
</p>
        <p>
Install the uCommerce package as you do any other package in Umbraco. Once installed
you'll be able to install the store package.
</p>
        <p>
Assuming all your permissions on your Umbraco install are correct, refresh your browser
and you should have a new section "Commerce". If they're not right, you'll
be told to add a few web.config settings.
</p>
        <h2>2. Wire up the catalog
</h2>
        <p>
This is the step that I didn’t “do” when we first got started and it turns out it’s
one of the most important steps as it joins the uCommerce catalog to the front end.
</p>
        <ol>
          <li>
Go to your Umbraco "Content" section 
</li>
          <li>
Right click on the page you would like to be the store's "home" page (in
the example store, this would be "Shop") 
</li>
          <li>
Click "Manage hostnames" (see figure below) 
<br /><img alt="Manage Hostnames Context Menu" src="http://blogs.thesitedoctor.co.uk/tim/images/1-ManageHostnames.png" width="235" height="304" /></li>
          <li>
Enter your hostname (the domain name the site runs on) in the "Domain" box
and then choose the default language for the website 
<br /><img alt="Manage Hostnames screen" src="http://blogs.thesitedoctor.co.uk/tim/images/1-ManageHostnames2.png" width="539" height="457" /></li>
          <li>
Click "Add new Domain" and then "Close this window" 
</li>
          <li>
Click the "Commerce" section button (in the bottom left) 
</li>
          <li>
Click the little arrow to the left of "Product Catalog" 
</li>
          <li>
Left click the relevant catalog (if you've installed the store package this will be
"uCommerce") 
</li>
          <li>
Select your new domain from the "Host name" drop down list 
<br /><img alt="Manage Hostnames screen" src="http://blogs.thesitedoctor.co.uk/tim/images/2-AssignHostnames.png" width="541" height="127" /></li>
          <li>
Click the save disk button in the top left 
<br /></li>
        </ol>
        <h2>3. Setup Your Product Definitions
</h2>
        <p>
A “Product Definition” is uCommerce’s concept of document types, it allows you to
add additional information to the product. If you’re using the uCommerce starter store,
you’ll get a couple of product definitions out of the box –software and support. At
the moment, you can't add additional properties through the uCommerce back end (i.e.
if you wanted to add additional information such as Meta Keywords/Descriptions etc
-I'll cover how we got around this in a later post) but there are a number of default
the category/product properties (I've put their XML reference in brackets where relevant):
</p>
        <h3>uCommerce Category Properties
</h3>
        <ul>
          <li>
Image (@image) 
</li>
          <li>
Display Name (@displayName) 
</li>
          <li>
Description (@description) 
</li>
        </ul>
        <p>
The default XML looks like this:
</p>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:a578f360-4bab-4a8d-878a-665fb6791381" class="wlWriterEditableSmartContent">
          <pre class="brush: xml;">&lt;category parentCategoryId="" parentCategoryName="" index="0" id="67" name="Software" displayName="Software" displayOnSite="True" description="" image="" /&gt;</pre>
        </div>
        <h3>uCommerce Product Properties
</h3>
        <ul>
          <li>
SKU (@sku) 
</li>
          <li>
Internal name 
</li>
          <li>
Display on web site (@<span class="brush: xml;">displayOnSite</span>) 
</li>
          <li>
Allow ordering (@<span class="brush: xml;">allowOrdering</span>) 
</li>
          <li>
Thumbnail (@<span class="brush: xml;">thumbnailImage</span>) 
</li>
          <li>
Primary image (@<span class="brush: xml;">primaryImage</span>) 
</li>
          <li>
Display name (@<span class="brush: xml;">displayName</span>) 
</li>
          <li>
Short description (@<span class="brush: xml;">shortDescription</span>) 
</li>
          <li>
Long description (@<span class="brush: xml;">longDescription</span>) 
</li>
        </ul>
        <p>
The default XML looks like this (the variants are not standard but are there because
they're setup as part of the store package):
</p>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:8384e736-156c-4085-9c18-c79db697c4be" class="wlWriterEditableSmartContent">
          <pre class="brush: xml;">&lt;product index="0" sku="100-000-001" displayName="uCommerce 1.0 RTM" shortDescription="uCommerce is a full featured e-commerce platform with content management features powered by Umbraco. Everything you need to build a killer e-commerce solution for your clients!" longDescription="uCommerce is fully integrated with the content management system Umbraco, which provides not only the frontend renderendering enabling you to create beautifully designed stores, but also the back office capabilities where you configure and cuztomize the store to your liking.&amp;#xD;&amp;#xA;&amp;#xD;&amp;#xA;uCommerce_ foundations provide the basis for an e-commerce solution. Each foundation addresses a specific need for providing a full e-commerce solution to your clients. foundations in the box include a Catalog Foundation, a Transactions Foundation, and an Analytics Foundation.&amp;#xD;&amp;#xA;&amp;#xD;&amp;#xA;Each of the foundations within uCommerce_ are fully configurable right in Umbraco. No need to switch between a multitude of tools to manage your stores. It's all available as you would expect in one convenient location." thumbnailImage="1097" primaryImage="1097" allowOrdering="True" isVariant="False" displayOnSite="True" hasVariants="True" price="3495.0000" currency="EUR"&gt;
  &lt;variants&gt;
    &lt;product index="0" sku="100-000-001" displayName="Developer Edition" shortDescription="" longDescription="" thumbnailImage="0" primaryImage="0" allowOrdering="False" isVariant="True" displayOnSite="False" hasVariants="False" variantSku="001" price="0.0000" currency="EUR" Downloadable="on" License="Dev" /&gt;
    &lt;product index="1" sku="100-000-001" displayName="30 Days Evaluation" shortDescription="" longDescription="" thumbnailImage="0" primaryImage="0" allowOrdering="False" isVariant="True" displayOnSite="False" hasVariants="False" variantSku="002" price="3495.0000" currency="EUR" Downloadable="on" License="Eval" /&gt;
    &lt;product index="2" sku="100-000-001" displayName="Go-Live" shortDescription="" longDescription="" thumbnailImage="0" primaryImage="0" allowOrdering="False" isVariant="True" displayOnSite="False" hasVariants="False" variantSku="003" price="3495.0000" currency="EUR" Downloadable="on" License="Live" /&gt;
  &lt;/variants&gt;
&lt;/product&gt;</pre>
        </div>
        <p>
Adding additional product properties is simple.
</p>
        <ol>
          <li>
Click the "Commerce" section button 
</li>
          <li>
Navigate to: Settings --&gt; Catalog --&gt; Product Definitions 
</li>
          <li>
Choose the product definition you would like to edit (or create a new one in the same
way that you would with Umbraco document types) 
</li>
          <li>
Right click the product definition you need to add extra properties to and click "Create" 
</li>
          <li>
Type in a name for your new property i.e. Size 
</li>
          <li>
Choose the Data Type for the property (if you need something that's not listed see
"Creating your own Data Type" below): 
<ul><li>
ShortText -A textbox 
</li><li>
LongText -A text area 
</li><li>
Number -Beleive it or not, a numeric value 
</li><li>
Boolean -A checkbox 
</li><li>
Image -A media selector 
</li></ul></li>
          <li>
Click the "Create" button 
</li>
          <li>
You can now choose a few additional options for the new property including how it
should be shown to the user and whether it's Multilingual. 
<ul><li>
Name -the text used as the label in the uCommerce product editor (it's also the name
of the attribute on the XML that will contain it's value) 
</li><li>
Data Type -the type of control to render in the uCommerce product editor 
</li><li>
Multilingual -whether the control should be shown on the "Common" tab of
the uCommerce product editor or the language specific tab 
</li><li>
Display On Web Site -A flag that's sent out in the XML so you can decide whether or
not to show it on the website 
</li><li>
Variant Property -Whether this should appear as a table column heading under the "Variants"
tab (I'll go into variants more in a later post) 
<br /><strong>Note:</strong> Do not set Multilingual and Variant property to both true as
at the moment, it won't be shown in the uCommerce product editor -you've been warned! 
</li><li>
Render in Editor -Whether the control should be shown in the uCommerce product editor
screen or hidden from the administrator (i.e. for data you want to use internally
only and should be editable) 
</li></ul></li>
          <li>
Finally you'll need to enter in a Display Name for the various languages. This is
what's shown to the user if you dynamically pull through the various properties on
the product details page. 
</li>
        </ol>
        <h2>4. Creating Your Own Data Type
</h2>
        <p>
Now, you may be thinking that using that set of data types is a little limiting for
something like "Size" or "Colour" and you might want to display
something a little more flexible to the user -such as a drop down list. This is easy
enough:
</p>
        <ol>
          <li>
Right click the "Data Types" node 
</li>
          <li>
Enter a name i.e. "Size" 
</li>
          <li>
Choose the definition for the Data Type (for size we will use "Enum") 
</li>
          <li>
Save and Refresh the "Data Types" node 
</li>
          <li>
Right click your new Data Type and click Create 
</li>
          <li>
Enter your Option's value i.e. "Small" 
</li>
          <li>
Repeat 5-6 until all your options are set i.e. add "Medium" and "Large" 
</li>
        </ol>
        <p>
          <strong>Note:</strong> At the moment, the enum values cannot be re-ordered through
the UI so make sure you add them in the order you want them in the editor!
</p>
        <h2>5. Load Your Catalog
</h2>
        <p>
Once you've finished creating your various product types, it's time to create your
catalog. Creating categories and products within uCommerce is as simple as creating
pages in Umbraco. Using the same right click menu concept you can create nested categories
as deep as your catalog requires. You can add products and categories at any level
by choosing either the "Category" or "Product" radio button and
choosing your product type.
</p>
        <h2>6. You're Done!
</h2>
        <p>
Assuming you've followed the steps above, you should now have a (fairly basic) store
setup. Go to your site's homepage and click the "uCommerce" menu item and
voila, your categories and products should be listed.
</p>
        <p>
Not getting the categories you were expecting? Perform the helpful xsl “copy-of” trick
within either the "RootCategories[XSLT].xslt" file or "Category[XSLT].xslt"
file:
</p>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:cb6e146f-4afc-4025-8b37-a6e647a6b248" class="wlWriterEditableSmartContent">
          <pre class="brush: xml;">&lt;pre&gt;&lt;xsl:copy-of select="$categories" /&gt;&lt;/pre&gt;</pre>
        </div>
        <p>
and then have a look at the output:
</p>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:b812a9c5-51a5-404b-8b41-aee3b4d05fa3" class="wlWriterEditableSmartContent">
          <pre class="brush: xml;">&lt;errors&gt;&lt;error&gt;No product catalog group found supporting the current URL.&lt;/error&gt;&lt;/errors&gt;</pre>
        </div>
        <p>
If you're getting the above error, currently (and this may be a misunderstanding/changed
later) you have to have the catalog and catalogue group names the same –in the example
site, they’re both “uCommerce”.
</p>
        <p>
As I think the concept store offered with Software/Support isn't particularly real-world,
I'm going to work on creating a basic store that you can use to better understand
uCommerce and it's intricacies.
</p>
        <p>
Check back soon as I'll be posting an overview of the checkout process, the various
XSLT files and integrating payment gateways into uCommerce (initially SagePay, PayPoint,
WorldPay and PayPal). 
</p>
        <img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=431f46cd-283c-4fc8-b38c-4bb5de06fdc8" />
      </body>
      <title>Getting started with uCommerce</title>
      <guid isPermaLink="false">http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,431f46cd-283c-4fc8-b38c-4bb5de06fdc8.aspx</guid>
      <link>http://blogs.thesitedoctor.co.uk/test/2010/08/17/GettingStartedWithUCommerce.aspx</link>
      <pubDate>Tue, 17 Aug 2010 16:49:45 GMT</pubDate>
      <description>&lt;p&gt;
&lt;img style="border-bottom: 0px; border-left: 0px; margin: 0px 0px 10px 10px; display: inline; border-top: 0px; border-right: 0px" class="wlDisabledImage" title="ucommerce-logo-symbol[1]" border="0" alt="ucommerce-logo-symbol[1]" align="right" src="http://blogs.thesitedoctor.co.uk/tim/images/GettingstartedwithuCommerce_C43D/ucommercelogosymbol1.png" width="260" height="260" /&gt;I
thought seeing as &lt;a title="e-commerce package for Umbraco" href="http://www.ucommerce.dk" target="_blank"&gt;uCommerce&lt;/a&gt; is
now an actual product I would start to overview an install/configuration of &lt;a title="e-commerce package for Umbraco" href="http://www.ucommerce.dk" target="_blank"&gt;uCommerce&lt;/a&gt; assuming
no prior knowledge of &lt;a title="e-commerce package for Umbraco" href="http://www.ucommerce.dk" target="_blank"&gt;uCommerce&lt;/a&gt;.
Firstly, let me start of by saying that once you've got your head around uCommerce
and some of it's complexities, you'll find it a fantastic product that makes creating
a new ecommerce website as easy as setting up a standard Umbraco website. It is still
missing a few features, but you can easily work around these with a bit of custom
XSLT/C#.
&lt;/p&gt;
&lt;p&gt;
Ok, back to setting up your first uCommerce website. I've grouped these into what
I feel are logical sections but if I've missed something, please let me know.
&lt;/p&gt;
&lt;h2&gt;1. Install the uCommerce Package
&lt;/h2&gt;
&lt;p&gt;
If you've not already done so, go to the &lt;a href="http://ucommerce.dk/en/get-it-now/download.aspx"&gt;uCommerce
Download page&lt;/a&gt; and download the uCommerce package (at time of writing, I'm using
1.0.4.2) and then download the uCommerce Store package (currently 1.0.1.2).
&lt;/p&gt;
&lt;p&gt;
Install the uCommerce package as you do any other package in Umbraco. Once installed
you'll be able to install the store package.
&lt;/p&gt;
&lt;p&gt;
Assuming all your permissions on your Umbraco install are correct, refresh your browser
and you should have a new section &amp;quot;Commerce&amp;quot;. If they're not right, you'll
be told to add a few web.config settings.
&lt;/p&gt;
&lt;h2&gt;2. Wire up the catalog
&lt;/h2&gt;
&lt;p&gt;
This is the step that I didn’t “do” when we first got started and it turns out it’s
one of the most important steps as it joins the uCommerce catalog to the front end.
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Go to your Umbraco &amp;quot;Content&amp;quot; section 
&lt;/li&gt;
&lt;li&gt;
Right click on the page you would like to be the store's &amp;quot;home&amp;quot; page (in
the example store, this would be &amp;quot;Shop&amp;quot;) 
&lt;/li&gt;
&lt;li&gt;
Click &amp;quot;Manage hostnames&amp;quot; (see figure below) 
&lt;br /&gt;
&lt;img alt="Manage Hostnames Context Menu" src="http://blogs.thesitedoctor.co.uk/tim/images/1-ManageHostnames.png" width="235" height="304" /&gt; 
&lt;/li&gt;
&lt;li&gt;
Enter your hostname (the domain name the site runs on) in the &amp;quot;Domain&amp;quot; box
and then choose the default language for the website 
&lt;br /&gt;
&lt;img alt="Manage Hostnames screen" src="http://blogs.thesitedoctor.co.uk/tim/images/1-ManageHostnames2.png" width="539" height="457" /&gt; 
&lt;/li&gt;
&lt;li&gt;
Click &amp;quot;Add new Domain&amp;quot; and then &amp;quot;Close this window&amp;quot; 
&lt;/li&gt;
&lt;li&gt;
Click the &amp;quot;Commerce&amp;quot; section button (in the bottom left) 
&lt;/li&gt;
&lt;li&gt;
Click the little arrow to the left of &amp;quot;Product Catalog&amp;quot; 
&lt;/li&gt;
&lt;li&gt;
Left click the relevant catalog (if you've installed the store package this will be
&amp;quot;uCommerce&amp;quot;) 
&lt;/li&gt;
&lt;li&gt;
Select your new domain from the &amp;quot;Host name&amp;quot; drop down list 
&lt;br /&gt;
&lt;img alt="Manage Hostnames screen" src="http://blogs.thesitedoctor.co.uk/tim/images/2-AssignHostnames.png" width="541" height="127" /&gt; 
&lt;/li&gt;
&lt;li&gt;
Click the save disk button in the top left 
&lt;br /&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;3. Setup Your Product Definitions
&lt;/h2&gt;
&lt;p&gt;
A “Product Definition” is uCommerce’s concept of document types, it allows you to
add additional information to the product. If you’re using the uCommerce starter store,
you’ll get a couple of product definitions out of the box –software and support. At
the moment, you can't add additional properties through the uCommerce back end (i.e.
if you wanted to add additional information such as Meta Keywords/Descriptions etc
-I'll cover how we got around this in a later post) but there are a number of default
the category/product properties (I've put their XML reference in brackets where relevant):
&lt;/p&gt;
&lt;h3&gt;uCommerce Category Properties
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
Image (@image) 
&lt;/li&gt;
&lt;li&gt;
Display Name (@displayName) 
&lt;/li&gt;
&lt;li&gt;
Description (@description) 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
The default XML looks like this:
&lt;/p&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:a578f360-4bab-4a8d-878a-665fb6791381" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush: xml;"&gt;&amp;lt;category parentCategoryId="" parentCategoryName="" index="0" id="67" name="Software" displayName="Software" displayOnSite="True" description="" image="" /&amp;gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;h3&gt;uCommerce Product Properties
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
SKU (@sku) 
&lt;/li&gt;
&lt;li&gt;
Internal name 
&lt;/li&gt;
&lt;li&gt;
Display on web site (@&lt;span class="brush: xml;"&gt;displayOnSite&lt;/span&gt;) 
&lt;/li&gt;
&lt;li&gt;
Allow ordering (@&lt;span class="brush: xml;"&gt;allowOrdering&lt;/span&gt;) 
&lt;/li&gt;
&lt;li&gt;
Thumbnail (@&lt;span class="brush: xml;"&gt;thumbnailImage&lt;/span&gt;) 
&lt;/li&gt;
&lt;li&gt;
Primary image (@&lt;span class="brush: xml;"&gt;primaryImage&lt;/span&gt;) 
&lt;/li&gt;
&lt;li&gt;
Display name (@&lt;span class="brush: xml;"&gt;displayName&lt;/span&gt;) 
&lt;/li&gt;
&lt;li&gt;
Short description (@&lt;span class="brush: xml;"&gt;shortDescription&lt;/span&gt;) 
&lt;/li&gt;
&lt;li&gt;
Long description (@&lt;span class="brush: xml;"&gt;longDescription&lt;/span&gt;) 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
The default XML looks like this (the variants are not standard but are there because
they're setup as part of the store package):
&lt;/p&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:8384e736-156c-4085-9c18-c79db697c4be" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush: xml;"&gt;&amp;lt;product index="0" sku="100-000-001" displayName="uCommerce 1.0 RTM" shortDescription="uCommerce is a full featured e-commerce platform with content management features powered by Umbraco. Everything you need to build a killer e-commerce solution for your clients!" longDescription="uCommerce is fully integrated with the content management system Umbraco, which provides not only the frontend renderendering enabling you to create beautifully designed stores, but also the back office capabilities where you configure and cuztomize the store to your liking.&amp;amp;#xD;&amp;amp;#xA;&amp;amp;#xD;&amp;amp;#xA;uCommerce_ foundations provide the basis for an e-commerce solution. Each foundation addresses a specific need for providing a full e-commerce solution to your clients. foundations in the box include a Catalog Foundation, a Transactions Foundation, and an Analytics Foundation.&amp;amp;#xD;&amp;amp;#xA;&amp;amp;#xD;&amp;amp;#xA;Each of the foundations within uCommerce_ are fully configurable right in Umbraco. No need to switch between a multitude of tools to manage your stores. It's all available as you would expect in one convenient location." thumbnailImage="1097" primaryImage="1097" allowOrdering="True" isVariant="False" displayOnSite="True" hasVariants="True" price="3495.0000" currency="EUR"&amp;gt;
  &amp;lt;variants&amp;gt;
    &amp;lt;product index="0" sku="100-000-001" displayName="Developer Edition" shortDescription="" longDescription="" thumbnailImage="0" primaryImage="0" allowOrdering="False" isVariant="True" displayOnSite="False" hasVariants="False" variantSku="001" price="0.0000" currency="EUR" Downloadable="on" License="Dev" /&amp;gt;
    &amp;lt;product index="1" sku="100-000-001" displayName="30 Days Evaluation" shortDescription="" longDescription="" thumbnailImage="0" primaryImage="0" allowOrdering="False" isVariant="True" displayOnSite="False" hasVariants="False" variantSku="002" price="3495.0000" currency="EUR" Downloadable="on" License="Eval" /&amp;gt;
    &amp;lt;product index="2" sku="100-000-001" displayName="Go-Live" shortDescription="" longDescription="" thumbnailImage="0" primaryImage="0" allowOrdering="False" isVariant="True" displayOnSite="False" hasVariants="False" variantSku="003" price="3495.0000" currency="EUR" Downloadable="on" License="Live" /&amp;gt;
  &amp;lt;/variants&amp;gt;
&amp;lt;/product&amp;gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
Adding additional product properties is simple.
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Click the &amp;quot;Commerce&amp;quot; section button 
&lt;/li&gt;
&lt;li&gt;
Navigate to: Settings --&amp;gt; Catalog --&amp;gt; Product Definitions 
&lt;/li&gt;
&lt;li&gt;
Choose the product definition you would like to edit (or create a new one in the same
way that you would with Umbraco document types) 
&lt;/li&gt;
&lt;li&gt;
Right click the product definition you need to add extra properties to and click &amp;quot;Create&amp;quot; 
&lt;/li&gt;
&lt;li&gt;
Type in a name for your new property i.e. Size 
&lt;/li&gt;
&lt;li&gt;
Choose the Data Type for the property (if you need something that's not listed see
&amp;quot;Creating your own Data Type&amp;quot; below): 
&lt;ul&gt;
&lt;li&gt;
ShortText -A textbox 
&lt;/li&gt;
&lt;li&gt;
LongText -A text area 
&lt;/li&gt;
&lt;li&gt;
Number -Beleive it or not, a numeric value 
&lt;/li&gt;
&lt;li&gt;
Boolean -A checkbox 
&lt;/li&gt;
&lt;li&gt;
Image -A media selector 
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
Click the &amp;quot;Create&amp;quot; button 
&lt;/li&gt;
&lt;li&gt;
You can now choose a few additional options for the new property including how it
should be shown to the user and whether it's Multilingual. 
&lt;ul&gt;
&lt;li&gt;
Name -the text used as the label in the uCommerce product editor (it's also the name
of the attribute on the XML that will contain it's value) 
&lt;/li&gt;
&lt;li&gt;
Data Type -the type of control to render in the uCommerce product editor 
&lt;/li&gt;
&lt;li&gt;
Multilingual -whether the control should be shown on the &amp;quot;Common&amp;quot; tab of
the uCommerce product editor or the language specific tab 
&lt;/li&gt;
&lt;li&gt;
Display On Web Site -A flag that's sent out in the XML so you can decide whether or
not to show it on the website 
&lt;/li&gt;
&lt;li&gt;
Variant Property -Whether this should appear as a table column heading under the &amp;quot;Variants&amp;quot;
tab (I'll go into variants more in a later post) 
&lt;br /&gt;
&lt;strong&gt;Note:&lt;/strong&gt; Do not set Multilingual and Variant property to both true as
at the moment, it won't be shown in the uCommerce product editor -you've been warned! 
&lt;/li&gt;
&lt;li&gt;
Render in Editor -Whether the control should be shown in the uCommerce product editor
screen or hidden from the administrator (i.e. for data you want to use internally
only and should be editable) 
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
Finally you'll need to enter in a Display Name for the various languages. This is
what's shown to the user if you dynamically pull through the various properties on
the product details page. 
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;4. Creating Your Own Data Type
&lt;/h2&gt;
&lt;p&gt;
Now, you may be thinking that using that set of data types is a little limiting for
something like &amp;quot;Size&amp;quot; or &amp;quot;Colour&amp;quot; and you might want to display
something a little more flexible to the user -such as a drop down list. This is easy
enough:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Right click the &amp;quot;Data Types&amp;quot; node 
&lt;/li&gt;
&lt;li&gt;
Enter a name i.e. &amp;quot;Size&amp;quot; 
&lt;/li&gt;
&lt;li&gt;
Choose the definition for the Data Type (for size we will use &amp;quot;Enum&amp;quot;) 
&lt;/li&gt;
&lt;li&gt;
Save and Refresh the &amp;quot;Data Types&amp;quot; node 
&lt;/li&gt;
&lt;li&gt;
Right click your new Data Type and click Create 
&lt;/li&gt;
&lt;li&gt;
Enter your Option's value i.e. &amp;quot;Small&amp;quot; 
&lt;/li&gt;
&lt;li&gt;
Repeat 5-6 until all your options are set i.e. add &amp;quot;Medium&amp;quot; and &amp;quot;Large&amp;quot; 
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
&lt;strong&gt;Note:&lt;/strong&gt; At the moment, the enum values cannot be re-ordered through
the UI so make sure you add them in the order you want them in the editor!
&lt;/p&gt;
&lt;h2&gt;5. Load Your Catalog
&lt;/h2&gt;
&lt;p&gt;
Once you've finished creating your various product types, it's time to create your
catalog. Creating categories and products within uCommerce is as simple as creating
pages in Umbraco. Using the same right click menu concept you can create nested categories
as deep as your catalog requires. You can add products and categories at any level
by choosing either the &amp;quot;Category&amp;quot; or &amp;quot;Product&amp;quot; radio button and
choosing your product type.
&lt;/p&gt;
&lt;h2&gt;6. You're Done!
&lt;/h2&gt;
&lt;p&gt;
Assuming you've followed the steps above, you should now have a (fairly basic) store
setup. Go to your site's homepage and click the &amp;quot;uCommerce&amp;quot; menu item and
voila, your categories and products should be listed.
&lt;/p&gt;
&lt;p&gt;
Not getting the categories you were expecting? Perform the helpful xsl “copy-of” trick
within either the &amp;quot;RootCategories[XSLT].xslt&amp;quot; file or &amp;quot;Category[XSLT].xslt&amp;quot;
file:
&lt;/p&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:cb6e146f-4afc-4025-8b37-a6e647a6b248" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush: xml;"&gt;&amp;lt;pre&amp;gt;&amp;lt;xsl:copy-of select="$categories" /&amp;gt;&amp;lt;/pre&amp;gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
and then have a look at the output:
&lt;/p&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:b812a9c5-51a5-404b-8b41-aee3b4d05fa3" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush: xml;"&gt;&amp;lt;errors&amp;gt;&amp;lt;error&amp;gt;No product catalog group found supporting the current URL.&amp;lt;/error&amp;gt;&amp;lt;/errors&amp;gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
If you're getting the above error, currently (and this may be a misunderstanding/changed
later) you have to have the catalog and catalogue group names the same –in the example
site, they’re both “uCommerce”.
&lt;/p&gt;
&lt;p&gt;
As I think the concept store offered with Software/Support isn't particularly real-world,
I'm going to work on creating a basic store that you can use to better understand
uCommerce and it's intricacies.
&lt;/p&gt;
&lt;p&gt;
Check back soon as I'll be posting an overview of the checkout process, the various
XSLT files and integrating payment gateways into uCommerce (initially SagePay, PayPoint,
WorldPay and PayPal). 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=431f46cd-283c-4fc8-b38c-4bb5de06fdc8" /&gt;</description>
      <comments>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,431f46cd-283c-4fc8-b38c-4bb5de06fdc8.aspx</comments>
      <category>ASP.Net</category>
      <category>eCommerce</category>
      <category>uCommerce</category>
      <category>Umbraco</category>
      <category>Web Development</category>
    </item>
    <item>
      <trackback:ping>http://blogs.thesitedoctor.co.uk/test/Trackback.aspx?guid=646bc72f-3ad7-42c4-904b-dc18c1eff695</trackback:ping>
      <pingback:server>http://blogs.thesitedoctor.co.uk/test/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,646bc72f-3ad7-42c4-904b-dc18c1eff695.aspx</pingback:target>
      <dc:creator>Tim</dc:creator>
      <wfw:comment>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,646bc72f-3ad7-42c4-904b-dc18c1eff695.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.thesitedoctor.co.uk/test/SyndicationService.asmx/GetEntryCommentsRss?guid=646bc72f-3ad7-42c4-904b-dc18c1eff695</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="powershell2xa4[1]" border="0" alt="powershell2xa4[1]" align="right" src="http://blogs.thesitedoctor.co.uk/tim/images/SetUmbracoFolderPermissionswithPowershel_C08E/powershell2xa41.jpg" width="260" height="208" /> If
you're not configuring Umbraco through a web installer, you've had your installs in
place for years and never checked the permissions or whoever set the permissions up
was lazy and gave IIS write access to the entire folder, there will come a time when
you want to restrict modify access to just those user(s) who should have access.
</p>
        <p>
You can find a (pretty) complete <a href="http://umbraco.org/documentation/books/important-files-and-folder-structure/permissions">list
of the files/folders that the Umbraco install should have access to here</a> but assigning
them across 101 different installs is a 
<abbr title="Pain In The Ass">
PITA
</abbr>
. Thanks to a <a href="http://www.powershell.nu/2009/02/13/set-folder-permissions-using-a-powershell-script/">helpful
PowerShell script to set folder permissions from PowerShell.nu</a> you can easily
automate the process.
</p>
        <p>
For those of you not familiar with PowerShell (like me) complete instructions are
below. For the rest, here's the command: 
</p>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:6204aace-8f3a-49eb-928d-e0c33f5a299b" class="wlWriterEditableSmartContent">
          <pre class="brush: powershell;">Get-ChildItem -path ##PATH TO YOUR INSTALL## 
| Where { $_.name -eq "Bin" -or $_.name -eq "Config" -or $_.name -eq "Css" -or $_.name -eq "Data" -or $_.name -eq "Masterpages" -or $_.name -eq "Media" -or $_.name -eq "Scripts" -or $_.name -eq "Umbraco" -or $_.name -eq "Umbraco_client" -or $_.name -eq "UserControls" -or $_.name -eq "Xslt" } 
| ForEach {./SetFolderPermission.ps1 -path $_.Fullname -Access "NETWORK SERVICE" -Permission Modify}
</pre>
        </div>
        <p>
 
</p>
        <p>
          <strong>Instructions:</strong>
        </p>
        <ol>
          <li>
Save the <a href="http://blogs.thesitedoctor.co.uk/tim/files/setfolderpermission.ps1.txt">SetFolderPermission.ps1
script</a> to your server 
</li>
          <li>
Open your PowerShell console (I think it's installed by default if not, you can <a href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx">download
PowerShell here</a>) 
</li>
          <li>
Copy the above PowerShell command into notepad 
</li>
          <li>
Update "##PATH TO YOUR INSTALL##" to your Umbraco install 
</li>
          <li>
If your IIS install doesn't use NETWORK SERVICE as the default user, update it to
your user 
</li>
          <li>
Make sure it's all on a single line 
</li>
          <li>
Copy/Paste/Run in PowerShell 
</li>
        </ol>
        <p>
          <strong>Bonus</strong>
        </p>
        <p>
If you're uber lazy and just have a web folder of Umbraco installs you can set the
path to the folder of Umbraco installs and use:
</p>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:759a61db-2bc9-456c-9e1b-240acdea1c26" class="wlWriterEditableSmartContent">
          <pre class="brush: text;">Get-ChildItem -path ##PATH TO YOUR FOLDER## -recurse
| Where { $_.name -eq "Bin" -or $_.name -eq "Config" -or $_.name -eq "Css" -or $_.name -eq "Data" -or $_.name -eq "Masterpages" -or $_.name -eq "Media" -or $_.name -eq "Scripts" -or $_.name -eq "Umbraco" -or $_.name -eq "Umbraco_client" -or $_.name -eq "UserControls" -or $_.name -eq "Xslt" } 
| ForEach {./SetFolderPermission.ps1 -path $_.Fullname -Access "NETWORK SERVICE" -Permission Modify}
</pre>
        </div>
        <p>
 
</p>
        <p>
I've not tried this mind you and can't recommend it but hey, it's there if you want
it ;)
</p>
        <img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=646bc72f-3ad7-42c4-904b-dc18c1eff695" />
      </body>
      <title>Set Umbraco Folder Permissions with Powershell</title>
      <guid isPermaLink="false">http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,646bc72f-3ad7-42c4-904b-dc18c1eff695.aspx</guid>
      <link>http://blogs.thesitedoctor.co.uk/test/2010/06/17/SetUmbracoFolderPermissionsWithPowershell.aspx</link>
      <pubDate>Thu, 17 Jun 2010 13:47:22 GMT</pubDate>
      <description>&lt;p&gt;
&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="powershell2xa4[1]" border="0" alt="powershell2xa4[1]" align="right" src="http://blogs.thesitedoctor.co.uk/tim/images/SetUmbracoFolderPermissionswithPowershel_C08E/powershell2xa41.jpg" width="260" height="208" /&gt; If
you're not configuring Umbraco through a web installer, you've had your installs in
place for years and never checked the permissions or whoever set the permissions up
was lazy and gave IIS write access to the entire folder, there will come a time when
you want to restrict modify access to just those user(s) who should have access.
&lt;/p&gt;
&lt;p&gt;
You can find a (pretty) complete &lt;a href="http://umbraco.org/documentation/books/important-files-and-folder-structure/permissions"&gt;list
of the files/folders that the Umbraco install should have access to here&lt;/a&gt; but assigning
them across 101 different installs is a 
&lt;abbr title="Pain In The Ass"&gt;
PITA
&lt;/abbr&gt;
. Thanks to a &lt;a href="http://www.powershell.nu/2009/02/13/set-folder-permissions-using-a-powershell-script/"&gt;helpful
PowerShell script to set folder permissions from PowerShell.nu&lt;/a&gt; you can easily
automate the process.
&lt;/p&gt;
&lt;p&gt;
For those of you not familiar with PowerShell (like me) complete instructions are
below. For the rest, here's the command: 
&lt;/p&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:6204aace-8f3a-49eb-928d-e0c33f5a299b" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush: powershell;"&gt;Get-ChildItem -path ##PATH TO YOUR INSTALL## 
| Where { $_.name -eq "Bin" -or $_.name -eq "Config" -or $_.name -eq "Css" -or $_.name -eq "Data" -or $_.name -eq "Masterpages" -or $_.name -eq "Media" -or $_.name -eq "Scripts" -or $_.name -eq "Umbraco" -or $_.name -eq "Umbraco_client" -or $_.name -eq "UserControls" -or $_.name -eq "Xslt" } 
| ForEach {./SetFolderPermission.ps1 -path $_.Fullname -Access "NETWORK SERVICE" -Permission Modify}
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Instructions:&lt;/strong&gt;
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Save the &lt;a href="http://blogs.thesitedoctor.co.uk/tim/files/setfolderpermission.ps1.txt"&gt;SetFolderPermission.ps1
script&lt;/a&gt; to your server 
&lt;/li&gt;
&lt;li&gt;
Open your PowerShell console (I think it's installed by default if not, you can &lt;a href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx"&gt;download
PowerShell here&lt;/a&gt;) 
&lt;/li&gt;
&lt;li&gt;
Copy the above PowerShell command into notepad 
&lt;/li&gt;
&lt;li&gt;
Update "##PATH TO YOUR INSTALL##" to your Umbraco install 
&lt;/li&gt;
&lt;li&gt;
If your IIS install doesn't use NETWORK SERVICE as the default user, update it to
your user 
&lt;/li&gt;
&lt;li&gt;
Make sure it's all on a single line 
&lt;/li&gt;
&lt;li&gt;
Copy/Paste/Run in PowerShell 
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
&lt;strong&gt;Bonus&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
If you're uber lazy and just have a web folder of Umbraco installs you can set the
path to the folder of Umbraco installs and use:
&lt;/p&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:759a61db-2bc9-456c-9e1b-240acdea1c26" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush: text;"&gt;Get-ChildItem -path ##PATH TO YOUR FOLDER## -recurse
| Where { $_.name -eq "Bin" -or $_.name -eq "Config" -or $_.name -eq "Css" -or $_.name -eq "Data" -or $_.name -eq "Masterpages" -or $_.name -eq "Media" -or $_.name -eq "Scripts" -or $_.name -eq "Umbraco" -or $_.name -eq "Umbraco_client" -or $_.name -eq "UserControls" -or $_.name -eq "Xslt" } 
| ForEach {./SetFolderPermission.ps1 -path $_.Fullname -Access "NETWORK SERVICE" -Permission Modify}
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
I've not tried this mind you and can't recommend it but hey, it's there if you want
it ;)
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=646bc72f-3ad7-42c4-904b-dc18c1eff695" /&gt;</description>
      <comments>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,646bc72f-3ad7-42c4-904b-dc18c1eff695.aspx</comments>
      <category>ASP.Net</category>
      <category>Hosting</category>
      <category>IIS</category>
      <category>PowerShell</category>
      <category>Server Maintenance</category>
      <category>Server Management</category>
      <category>Umbraco</category>
      <category>Web Development</category>
    </item>
    <item>
      <trackback:ping>http://blogs.thesitedoctor.co.uk/test/Trackback.aspx?guid=5ee53dd8-9ad4-4eb2-9771-80d90fa5b79a</trackback:ping>
      <pingback:server>http://blogs.thesitedoctor.co.uk/test/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,5ee53dd8-9ad4-4eb2-9771-80d90fa5b79a.aspx</pingback:target>
      <dc:creator>Tim</dc:creator>
      <wfw:comment>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,5ee53dd8-9ad4-4eb2-9771-80d90fa5b79a.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.thesitedoctor.co.uk/test/SyndicationService.asmx/GetEntryCommentsRss?guid=5ee53dd8-9ad4-4eb2-9771-80d90fa5b79a</wfw:commentRss>
      <slash:comments>4</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
A while ago I posted a quick one question questionnaire to gauge how much people were
charging for the "average" Umbraco install. This was partially to settle an internal
debate but also for an post I've not had time to post yet so in the meantime I'll
post the results.
</p>
        <p>
Having a quick look at the results you'll see that 64% of the people that answered
(around 100) charge £2,500 or less for a "standard" install with a whopping 96% of
people charging less than £10,000. I'll explain how this can be used for pricing your
Umbraco packages soon!
</p>
        <span id="preserve2064e043928a44f99bab180a9d52b3fa" class="wlWriterPreserve">
          <script src="http://spreadsheets.google.com/gpub?url=http%3A%2F%2Fi333u1dvihprfqnlo1om7p0tagd98dfc.spreadsheets.gmodules.com%2Fgadgets%2Fifr%3Fup__table_query_url%3Dhttp%253A%252F%252Fspreadsheets.google.com%252Ftq%253Frange%253DA1%25253AB4%2526headers%253D0%2526key%253D0AluIiYWH3c9tdDkzWGZVVTBXZ0tmbkRlLUdPeWItb1E%2526gid%253D1%2526pub%253D1%26up__table_query_refresh_interval%3D0%26up__tq_orientation%3Dc%26up_ct%3DDoughnut3D%26up_c%3D%26up_sc%3D%26up_bani%3D1%26up_bvon%3D1%26up_blon%3D1%26up_bton%3D1%26up_bsap%3D1%26up_bspt%3D1%26up_bsl%3D1%26up__pr%3D%26up__psd%3Dnull%26up_pfx%3D%26up_sfx%3D%26up_bfn%3D0%26up_bsv%3D0%26up_d%3D0%26up__ptc%3Dnull%26up_f%3DVerdana%26up_fs%3D9%26up_setsl%3D0%26url%3Dhttp%253A%252F%252Ffusioncharts.googlecode.com%252Fsvn%252Ftrunk%252FFusionChartsPie.xml&amp;height=345&amp;width=592">
          </script>
          <div style="padding-bottom: 0px !important; padding-left: 0px !important; width: 592px !important; padding-right: 0px !important; padding-top: 0px !important">
            <iframe style="border-bottom: #bbb 1px solid; border-left: #bbb 1px solid; border-top: #bbb 1px solid; border-right: #bbb 1px solid" height="345" marginheight="0" src="http://i333u1dvihprfqnlo1om7p0tagd98dfc.spreadsheets.gmodules.com/gadgets/ifr?up__table_query_url=http%3A%2F%2Fspreadsheets.google.com%2Ftq%3Frange%3DA1%253AB4%26headers%3D0%26key%3D0AluIiYWH3c9tdDkzWGZVVTBXZ0tmbkRlLUdPeWItb1E%26gid%3D1%26pub%3D1&amp;up__table_query_refresh_interval=0&amp;up__tq_orientation=c&amp;up_ct=Doughnut3D&amp;up_c&amp;up_sc&amp;up_bani=1&amp;up_bvon=1&amp;up_blon=1&amp;up_bton=1&amp;up_bsap=1&amp;up_bspt=1&amp;up_bsl=1&amp;up__pr&amp;up__psd=null&amp;up_pfx&amp;up_sfx&amp;up_bfn=0&amp;up_bsv=0&amp;up_d=0&amp;up__ptc=null&amp;up_f=Verdana&amp;up_fs=9&amp;up_setsl=0&amp;url=http%3A%2F%2Ffusioncharts.googlecode.com%2Fsvn%2Ftrunk%2FFusionChartsPie.xml" frameborder="no" width="592" marginwidth="0" scrolling="no">
            </iframe>
            <div style="text-align: right !important; background-color: #fff !important; width: 594px !important">
              <a style="border-bottom-style: none !important; padding-bottom: 0px !important; border-right-style: none !important; padding-left: 0px !important; padding-right: 0px !important; border-top-style: none !important; border-left-style: none !important; text-decoration: none !important; padding-top: 0px !important" href="http://docs.google.com/support/bin/answer.py?answer=99488&amp;topic=15165" target="_blank">
                <img style="padding-bottom: 0px !important; border-right-width: 0px; margin: 0px; padding-left: 0px !important; padding-right: 0px !important; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px !important" alt="" src="http://www.google.com/images/spreadsheets/gadgets/smallLogo.gif" />
              </a>
            </div>
          </div>
        </span>
        <img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=5ee53dd8-9ad4-4eb2-9771-80d90fa5b79a" />
      </body>
      <title>The Umbraco 1 question questionnaire results</title>
      <guid isPermaLink="false">http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,5ee53dd8-9ad4-4eb2-9771-80d90fa5b79a.aspx</guid>
      <link>http://blogs.thesitedoctor.co.uk/test/2010/04/14/TheUmbraco1QuestionQuestionnaireResults.aspx</link>
      <pubDate>Wed, 14 Apr 2010 18:18:47 GMT</pubDate>
      <description>&lt;p&gt;
A while ago I posted a quick one question questionnaire to gauge how much people were
charging for the "average" Umbraco install. This was partially to settle an internal
debate but also for an post I've not had time to post yet so in the meantime I'll
post the results.
&lt;/p&gt;
&lt;p&gt;
Having a quick look at the results you'll see that 64% of the people that answered
(around 100) charge £2,500 or less for a "standard" install with a whopping 96% of
people charging less than £10,000. I'll explain how this can be used for pricing your
Umbraco packages soon!
&lt;/p&gt;
&lt;span id="preserve2064e043928a44f99bab180a9d52b3fa" class="wlWriterPreserve"&gt;&lt;script src="http://spreadsheets.google.com/gpub?url=http%3A%2F%2Fi333u1dvihprfqnlo1om7p0tagd98dfc.spreadsheets.gmodules.com%2Fgadgets%2Fifr%3Fup__table_query_url%3Dhttp%253A%252F%252Fspreadsheets.google.com%252Ftq%253Frange%253DA1%25253AB4%2526headers%253D0%2526key%253D0AluIiYWH3c9tdDkzWGZVVTBXZ0tmbkRlLUdPeWItb1E%2526gid%253D1%2526pub%253D1%26up__table_query_refresh_interval%3D0%26up__tq_orientation%3Dc%26up_ct%3DDoughnut3D%26up_c%3D%26up_sc%3D%26up_bani%3D1%26up_bvon%3D1%26up_blon%3D1%26up_bton%3D1%26up_bsap%3D1%26up_bspt%3D1%26up_bsl%3D1%26up__pr%3D%26up__psd%3Dnull%26up_pfx%3D%26up_sfx%3D%26up_bfn%3D0%26up_bsv%3D0%26up_d%3D0%26up__ptc%3Dnull%26up_f%3DVerdana%26up_fs%3D9%26up_setsl%3D0%26url%3Dhttp%253A%252F%252Ffusioncharts.googlecode.com%252Fsvn%252Ftrunk%252FFusionChartsPie.xml&amp;amp;height=345&amp;amp;width=592"&gt;&lt;/script&gt;
&lt;div style="padding-bottom: 0px !important; padding-left: 0px !important; width: 592px !important; padding-right: 0px !important; padding-top: 0px !important"&gt;
&lt;iframe style="border-bottom: #bbb 1px solid; border-left: #bbb 1px solid; border-top: #bbb 1px solid; border-right: #bbb 1px solid" height="345" marginheight="0" src="http://i333u1dvihprfqnlo1om7p0tagd98dfc.spreadsheets.gmodules.com/gadgets/ifr?up__table_query_url=http%3A%2F%2Fspreadsheets.google.com%2Ftq%3Frange%3DA1%253AB4%26headers%3D0%26key%3D0AluIiYWH3c9tdDkzWGZVVTBXZ0tmbkRlLUdPeWItb1E%26gid%3D1%26pub%3D1&amp;amp;up__table_query_refresh_interval=0&amp;amp;up__tq_orientation=c&amp;amp;up_ct=Doughnut3D&amp;amp;up_c&amp;amp;up_sc&amp;amp;up_bani=1&amp;amp;up_bvon=1&amp;amp;up_blon=1&amp;amp;up_bton=1&amp;amp;up_bsap=1&amp;amp;up_bspt=1&amp;amp;up_bsl=1&amp;amp;up__pr&amp;amp;up__psd=null&amp;amp;up_pfx&amp;amp;up_sfx&amp;amp;up_bfn=0&amp;amp;up_bsv=0&amp;amp;up_d=0&amp;amp;up__ptc=null&amp;amp;up_f=Verdana&amp;amp;up_fs=9&amp;amp;up_setsl=0&amp;amp;url=http%3A%2F%2Ffusioncharts.googlecode.com%2Fsvn%2Ftrunk%2FFusionChartsPie.xml" frameborder="no" width="592" marginwidth="0" scrolling="no"&gt;
&lt;/iframe&gt;
&lt;div style="text-align: right !important; background-color: #fff !important; width: 594px !important"&gt;&lt;a style="border-bottom-style: none !important; padding-bottom: 0px !important; border-right-style: none !important; padding-left: 0px !important; padding-right: 0px !important; border-top-style: none !important; border-left-style: none !important; text-decoration: none !important; padding-top: 0px !important" href="http://docs.google.com/support/bin/answer.py?answer=99488&amp;amp;topic=15165" target="_blank"&gt;&lt;img style="padding-bottom: 0px !important; border-right-width: 0px; margin: 0px; padding-left: 0px !important; padding-right: 0px !important; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px !important" alt="" src="http://www.google.com/images/spreadsheets/gadgets/smallLogo.gif" /&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=5ee53dd8-9ad4-4eb2-9771-80d90fa5b79a" /&gt;</description>
      <comments>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,5ee53dd8-9ad4-4eb2-9771-80d90fa5b79a.aspx</comments>
      <category>Business</category>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://blogs.thesitedoctor.co.uk/test/Trackback.aspx?guid=409b9297-7d3e-4698-83cd-376d34bc553b</trackback:ping>
      <pingback:server>http://blogs.thesitedoctor.co.uk/test/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,409b9297-7d3e-4698-83cd-376d34bc553b.aspx</pingback:target>
      <dc:creator>Tim</dc:creator>
      <wfw:comment>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,409b9297-7d3e-4698-83cd-376d34bc553b.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.thesitedoctor.co.uk/test/SyndicationService.asmx/GetEntryCommentsRss?guid=409b9297-7d3e-4698-83cd-376d34bc553b</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
It's taken some time to get here and there's still more to add as I think this is
a pretty big topic but I thought I'd get started. I wanted to keep the session more
focused on the selling points of Umbraco and how people pitch Umbraco to the clients
than selling techniques which on the whole we managed to do.
</p>
        <p>
The first thing I stressed was that I wasn't going to teach you how to sell or selling
techniques as I've never found that hard selling works -though I'm not saying it doesn't,
I just prefer to educate the client into the most suitable solution (even if that
isn't us).
</p>
        <p>
There were a number of questions that were raised and I'll answer what I can here,
if you were at the session and I've missed something, please let me know and I'll
get it added:
</p>
        <ol>
          <li>
What are the key selling points of Umbraco 
</li>
          <li>
How do you pitch Umbraco 
</li>
          <li>
Do you tell clients it's open source (or use that as a sales point)? 
</li>
          <li>
How do you price Umbraco 
</li>
          <li>
Once you've won, what do you ask your client 
</li>
          <li>
How do you support Umbraco 
</li>
          <li>
How do you get around the question of "What happens if you get hit by a bus?" 
</li>
        </ol>
        <h2>What are the key selling points of Umbraco
</h2>
        <p>
A couple of the attendees came up with better 30second sales pitches so I'm sure they'll
post those up shortly but here's a few I remember:
</p>
        <ul>
          <li>
It's easy to use -you don't need any previous computer experience 
</li>
          <li>
You can edit any page's content yourself at any time 
</li>
          <li>
It's highly flexible and lightweight 
</li>
          <li>
It's search engine friendly 
</li>
          <li>
It's open source (this really can be a selling point at the right time) 
</li>
        </ul>
        <h2>Do you tell clients it's open source (or use that as a sales point)?
</h2>
        <p>
We do and we don't. Again it really comes down to who you're pitching Umbraco to.
Where the client has had issues with developers not releasing source etc then it's
clearly a selling point. 
</p>
        <p>
Generally we do tend to explain to clients that we will base their website on an open
source project that we then build on and customise further to suit their needs and
that by using best practice methodologies, any developer can in theory pick up the
system and continue to develop it (even if they have no experience of Umbraco).
</p>
        <h2>How do you price Umbraco
</h2>
        <p>
This question was asked in a couple of different ways throughout the session and it's
a topic in itself (see the article I wrote a while ago about pricing your work).
</p>
        <p>
If you look at Umbraco in the right way you'll see that it's actually rather easy
to price as there are a few components that you can sell either individually or together:
</p>
        <ul>
          <li>
Installation and configuration 
</li>
          <li>
Customisation 
</li>
          <li>
Hosting 
</li>
          <li>
Support 
</li>
        </ul>
        <p>
All you need to do is work out a minimum cost for each component and then that will
give you a core system cost. 
</p>
        <p>
Once you have your core Umbraco costs (don't forget to factor in your license costs)
you can then alter the costs accordingly for your client -and this has to be on a
case-by-case basis.  
</p>
        <h2>How do you pitch Umbraco
</h2>
        <p>
This is easy, there are so many selling points to Umbraco that regardless of what
the client is looking for, as long as it's CMS based, Umbraco will have some benefit
you can overview to the client.
</p>
        <p>
When pitching Umbraco, we have found educating the user as to the benefits and what
the client should be looking for in other systems. If you do this, then the majority
of the time, the rest of the competition falls by the wayside.
</p>
        <p>
If the client is a large corporate it's always worth mentioning that it offers much
of the functionality that SharePoint does but with little of the cost (or setup pain!).
</p>
        <h2>Once you've won the contract, what do you ask your client
</h2>
        <p>
The first thing to do is to get all the information you need to complete your contract
(or at least tell your client what you'll need and when). You should know what you'll
need already but we tend to ask for:
</p>
        <ul>
          <li>
Design inspiration (websites the client does and doesn't like -and why) 
</li>
          <li>
Logos and other source imagery 
</li>
          <li>
Text for the website (you'd be best to load the initial content during training but
get the client to think about it while you're developing or you'll never get there!) 
</li>
        </ul>
        <p>
Next, you'll need to make sure your paperwork is in order. Once you have agreed the
general premise of your contract, it's important that you confirm all deliverables
(what you'll be doing for the client) in a work order with the client. This avoids
an ambiguity on what you'll be delivering and when. This doesn't need to be pages
of text (though sometimes it needs to be) but avoids disagreements later.
</p>
        <p>
You should <strong>always</strong> request signed work order and deposit (we request
a minimum of 20% regardless of project spend) at a minimum before starting any work.
</p>
        <p>
Once you have the signed work order (you sign one for the client to keep and keep
one yourself), you can start thinking about the project. If it'll take longer than
a week to deliver, I recommend you provide the client with rough timescales, this
will have the added benefit of helping you focus your mind.
</p>
        <h2>How do you support Umbraco
</h2>
        <p>
This is something that Paul Sterling addressed through another session and if he doesn't
write up his notes I'll make a few notes in another post.
</p>
        <h2>How do you get around the question of "What happens if you get hit by a bus?"
</h2>
        <p>
Although this was asked a couple of times throughout the session, I avoided answering
it a little due to a conflict of interest. For the past few months we've been working
hard on a new system called <a title="Crisis Cover - Protecting your business against the unforeseen" href="http://www.crisiscover.co.uk/">Crisis
Cover</a> which has been designed to help you with this exact question.
</p>
        <p>
          <a title="Crisis Cover - Protecting your business against the unforeseen" href="http://www.crisiscover.co.uk/">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="apple-touch-icon[1]" border="0" alt="apple-touch-icon[1]" align="left" src="http://blogs.thesitedoctor.co.uk/tim/content/binary/WindowsLiveWriter/CodeGarden09OpenSpaceMinutesSpace1Howtos_130B7/apple-touch-icon%5B1%5D_c94f9aed-e4e5-4f09-b0d5-b691d2e1c62d.png" width="61" height="61" /> Crisis
Cover</a> monitors you to ensure that you're still around and if you don't respond
to a number of alerts, it will contact your clients informing there's something wrong. 
</p>
        <p>
I'll post more information about <a title="Crisis Cover - Protecting your business against the unforeseen" href="http://www.crisiscover.co.uk/">Crisis
Cover</a>, but if you're interested in getting involved with the beta, leave me your
email and I'll get one sent out.
</p>
        <h2>In Closing
</h2>
        <p>
There is a lot of information about selling and business in general in my previous
post "<a href="http://blogs.thesitedoctor.co.uk/tim/2007/01/29/Business+Startup+Advice.aspx">Business
start-up advice</a>" which if you're starting out, I really recommend you reading
as it should give you a really good start (and includes example Service Level Agreements,
Contracts and other useful documents).
</p>
        <img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=409b9297-7d3e-4698-83cd-376d34bc553b" />
      </body>
      <title>CodeGarden 09 Open Space Minutes - Space 1: How to sell Umbraco</title>
      <guid isPermaLink="false">http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,409b9297-7d3e-4698-83cd-376d34bc553b.aspx</guid>
      <link>http://blogs.thesitedoctor.co.uk/test/2009/07/27/CodeGarden09OpenSpaceMinutesSpace1HowToSellUmbraco.aspx</link>
      <pubDate>Mon, 27 Jul 2009 21:53:28 GMT</pubDate>
      <description>&lt;p&gt;
It's taken some time to get here and there's still more to add as I think this is
a pretty big topic but I thought I'd get started. I wanted to keep the session more
focused on the selling points of Umbraco and how people pitch Umbraco to the clients
than selling techniques which on the whole we managed to do.
&lt;/p&gt;
&lt;p&gt;
The first thing I stressed was that I wasn't going to teach you how to sell or selling
techniques as I've never found that hard selling works -though I'm not saying it doesn't,
I just prefer to educate the client into the most suitable solution (even if that
isn't us).
&lt;/p&gt;
&lt;p&gt;
There were a number of questions that were raised and I'll answer what I can here,
if you were at the session and I've missed something, please let me know and I'll
get it added:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
What are the key selling points of Umbraco 
&lt;/li&gt;
&lt;li&gt;
How do you pitch Umbraco 
&lt;/li&gt;
&lt;li&gt;
Do you tell clients it's open source (or use that as a sales point)? 
&lt;/li&gt;
&lt;li&gt;
How do you price Umbraco 
&lt;/li&gt;
&lt;li&gt;
Once you've won, what do you ask your client 
&lt;/li&gt;
&lt;li&gt;
How do you support Umbraco 
&lt;/li&gt;
&lt;li&gt;
How do you get around the question of "What happens if you get hit by a bus?" 
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;What are the key selling points of Umbraco
&lt;/h2&gt;
&lt;p&gt;
A couple of the attendees came up with better 30second sales pitches so I'm sure they'll
post those up shortly but here's a few I remember:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
It's easy to use -you don't need any previous computer experience 
&lt;/li&gt;
&lt;li&gt;
You can edit any page's content yourself at any time 
&lt;/li&gt;
&lt;li&gt;
It's highly flexible and lightweight 
&lt;/li&gt;
&lt;li&gt;
It's search engine friendly 
&lt;/li&gt;
&lt;li&gt;
It's open source (this really can be a selling point at the right time) 
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Do you tell clients it's open source (or use that as a sales point)?
&lt;/h2&gt;
&lt;p&gt;
We do and we don't. Again it really comes down to who you're pitching Umbraco to.
Where the client has had issues with developers not releasing source etc then it's
clearly a selling point. 
&lt;/p&gt;
&lt;p&gt;
Generally we do tend to explain to clients that we will base their website on an open
source project that we then build on and customise further to suit their needs and
that by using best practice methodologies, any developer can in theory pick up the
system and continue to develop it (even if they have no experience of Umbraco).
&lt;/p&gt;
&lt;h2&gt;How do you price Umbraco
&lt;/h2&gt;
&lt;p&gt;
This question was asked in a couple of different ways throughout the session and it's
a topic in itself (see the article I wrote a while ago about pricing your work).
&lt;/p&gt;
&lt;p&gt;
If you look at Umbraco in the right way you'll see that it's actually rather easy
to price as there are a few components that you can sell either individually or together:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Installation and configuration 
&lt;/li&gt;
&lt;li&gt;
Customisation 
&lt;/li&gt;
&lt;li&gt;
Hosting 
&lt;/li&gt;
&lt;li&gt;
Support 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
All you need to do is work out a minimum cost for each component and then that will
give you a core system cost. 
&lt;/p&gt;
&lt;p&gt;
Once you have your core Umbraco costs (don't forget to factor in your license costs)
you can then alter the costs accordingly for your client -and this has to be on a
case-by-case basis.&amp;#160; 
&lt;/p&gt;
&lt;h2&gt;How do you pitch Umbraco
&lt;/h2&gt;
&lt;p&gt;
This is easy, there are so many selling points to Umbraco that regardless of what
the client is looking for, as long as it's CMS based, Umbraco will have some benefit
you can overview to the client.
&lt;/p&gt;
&lt;p&gt;
When pitching Umbraco, we have found educating the user as to the benefits and what
the client should be looking for in other systems. If you do this, then the majority
of the time, the rest of the competition falls by the wayside.
&lt;/p&gt;
&lt;p&gt;
If the client is a large corporate it's always worth mentioning that it offers much
of the functionality that SharePoint does but with little of the cost (or setup pain!).
&lt;/p&gt;
&lt;h2&gt;Once you've won the contract, what do you ask your client
&lt;/h2&gt;
&lt;p&gt;
The first thing to do is to get all the information you need to complete your contract
(or at least tell your client what you'll need and when). You should know what you'll
need already but we tend to ask for:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Design inspiration (websites the client does and doesn't like -and why) 
&lt;/li&gt;
&lt;li&gt;
Logos and other source imagery 
&lt;/li&gt;
&lt;li&gt;
Text for the website (you'd be best to load the initial content during training but
get the client to think about it while you're developing or you'll never get there!) 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Next, you'll need to make sure your paperwork is in order. Once you have agreed the
general premise of your contract, it's important that you confirm all deliverables
(what you'll be doing for the client) in a work order with the client. This avoids
an ambiguity on what you'll be delivering and when. This doesn't need to be pages
of text (though sometimes it needs to be) but avoids disagreements later.
&lt;/p&gt;
&lt;p&gt;
You should &lt;strong&gt;always&lt;/strong&gt; request signed work order and deposit (we request
a minimum of 20% regardless of project spend) at a minimum before starting any work.
&lt;/p&gt;
&lt;p&gt;
Once you have the signed work order (you sign one for the client to keep and keep
one yourself), you can start thinking about the project. If it'll take longer than
a week to deliver, I recommend you provide the client with rough timescales, this
will have the added benefit of helping you focus your mind.
&lt;/p&gt;
&lt;h2&gt;How do you support Umbraco
&lt;/h2&gt;
&lt;p&gt;
This is something that Paul Sterling addressed through another session and if he doesn't
write up his notes I'll make a few notes in another post.
&lt;/p&gt;
&lt;h2&gt;How do you get around the question of "What happens if you get hit by a bus?"
&lt;/h2&gt;
&lt;p&gt;
Although this was asked a couple of times throughout the session, I avoided answering
it a little due to a conflict of interest. For the past few months we've been working
hard on a new system called &lt;a title="Crisis Cover - Protecting your business against the unforeseen" href="http://www.crisiscover.co.uk/"&gt;Crisis
Cover&lt;/a&gt; which has been designed to help you with this exact question.
&lt;/p&gt;
&lt;p&gt;
&lt;a title="Crisis Cover - Protecting your business against the unforeseen" href="http://www.crisiscover.co.uk/"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="apple-touch-icon[1]" border="0" alt="apple-touch-icon[1]" align="left" src="http://blogs.thesitedoctor.co.uk/tim/content/binary/WindowsLiveWriter/CodeGarden09OpenSpaceMinutesSpace1Howtos_130B7/apple-touch-icon%5B1%5D_c94f9aed-e4e5-4f09-b0d5-b691d2e1c62d.png" width="61" height="61" /&gt; Crisis
Cover&lt;/a&gt; monitors you to ensure that you're still around and if you don't respond
to a number of alerts, it will contact your clients informing there's something wrong. 
&lt;/p&gt;
&lt;p&gt;
I'll post more information about &lt;a title="Crisis Cover - Protecting your business against the unforeseen" href="http://www.crisiscover.co.uk/"&gt;Crisis
Cover&lt;/a&gt;, but if you're interested in getting involved with the beta, leave me your
email and I'll get one sent out.
&lt;/p&gt;
&lt;h2&gt;In Closing
&lt;/h2&gt;
&lt;p&gt;
There is a lot of information about selling and business in general in my previous
post "&lt;a href="http://blogs.thesitedoctor.co.uk/tim/2007/01/29/Business+Startup+Advice.aspx"&gt;Business
start-up advice&lt;/a&gt;" which if you're starting out, I really recommend you reading
as it should give you a really good start (and includes example Service Level Agreements,
Contracts and other useful documents).
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=409b9297-7d3e-4698-83cd-376d34bc553b" /&gt;</description>
      <comments>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,409b9297-7d3e-4698-83cd-376d34bc553b.aspx</comments>
      <category>Business</category>
      <category>Business/Business Start-up Advice</category>
      <category>Business/Client</category>
      <category>Business/Expanding Your Business</category>
      <category>Marketing</category>
      <category>The Site Doctor</category>
      <category>Umbraco</category>
      <category>Umbraco/CodeGarden/2009</category>
      <category>Web Development</category>
    </item>
    <item>
      <trackback:ping>http://blogs.thesitedoctor.co.uk/test/Trackback.aspx?guid=bd1cc28f-f7b4-4f09-b096-6091ccfa43d7</trackback:ping>
      <pingback:server>http://blogs.thesitedoctor.co.uk/test/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,bd1cc28f-f7b4-4f09-b096-6091ccfa43d7.aspx</pingback:target>
      <dc:creator>Tim</dc:creator>
      <wfw:comment>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,bd1cc28f-f7b4-4f09-b096-6091ccfa43d7.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.thesitedoctor.co.uk/test/SyndicationService.asmx/GetEntryCommentsRss?guid=bd1cc28f-f7b4-4f09-b096-6091ccfa43d7</wfw:commentRss>
      <slash:comments>4</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Those of you lucky enough to go to CodeGarden '09 you'll know the format of the Open
Space already but for those of you who didn't, Open Space is the time that the attendees
are invited to talk about something they're interested in so I proposed two:
</p>
        <ol>
          <li>
Space 1: Selling Umbraco 
</li>
          <li>
Space 2: Exception handing and error reporting in Umbraco (and other .net websites/applications) 
</li>
        </ol>
        <p>
I'll write up the Selling Umbraco talk shortly but I wanted to put a few resources
together for it first so decided to write this one up first.
</p>
        <p>
First of all we had a brief chat about how everyone handles errors in their applications
and the various error handling options available. We discussed three options:
</p>
        <ol>
          <li>
            <a href="http://blogs.thesitedoctor.co.uk/tim/2009/02/27/Advanced+Error+Reporting+In+Umbraco+DasBlog+And+Other+ASPNet+Sites.aspx">Error
Handler v2.0</a>
          </li>
          <li>
            <a href="http://code.google.com/p/elmah/">ELMAH</a>
          </li>
          <li>
            <a href="http://www.exceptioneer.com/">Exceptioneer</a>
          </li>
        </ol>
        <p>
I've only had a brief look at <a href="http://code.google.com/p/elmah/">ELMAH</a> and
found at the time it was a little too much in the way of RSS feeds etc and I just
want an email alert, that said, Lee Kelleher has written a good article about <a href="http://blog.leekelleher.com/2009/04/23/integrating-elmah-with-umbraco/">integrating
ELMAH with Umbraco here</a> and I've written another article about <a href="http://blogs.thesitedoctor.co.uk/tim/2009/02/27/Advanced+Error+Reporting+In+Umbraco+DasBlog+And+Other+ASPNet+Sites.aspx">integrating
Error Handler v2.0 into Umbraco here</a> so I'll overview how to integrate <a href="http://www.exceptioneer.com/">Exceptioneer</a> into
Umbraco here instead.
</p>
        <p>
Wiring up <a href="http://www.exceptioneer.com/">Exceptioneer</a> with your site couldn't
be easier, the best bit is that they do all the hard work for you with their "Integrate"
section of the site but to give you a quick snapshot of how easy it is, first of all, <a href="https://www.exceptioneer.com/Site/Downloads.aspx">download
the dll</a> and pop it into your bin folder. Then edit your web.config:
</p>
        <pre class="code">
          <code class="brush: xml; toolbar: false; auto-links: false;">&lt;?xml
version="1.0"?&gt; &lt;configuration&gt; &lt;configSections&gt; &lt;section name="Exceptioneer"
type="Exceptioneer.WebClient.ClientModuleConfiguration, Exceptioneer.WebClient" requirePermission="true"
/&gt; &lt;/configSections&gt; &lt;!-- This is where you get to specify your API Key
and Application Name --&gt; &lt;Exceptioneer ApiKey="XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
ApplicationName="YOUR APPLICATION NAME" /&gt; &lt;!-- If you're using IIS 6.0 or Visual
Studio's built in web server you'll need to add this bit --&gt; &lt;system.web&gt;
&lt;httpModules&gt; &lt;add name="Exceptioneer" type="Exceptioneer.WebClient.ClientModule,
Exceptioneer.WebClient" /&gt; &lt;/httpModules&gt; &lt;!-- If you want to use the
JavaScript handling then add the Http Handler as so --&gt; &lt;httpHandlers&gt; &lt;add
path="ExceptioneerJavaScript.axd" verb="GET,POST" type="Exceptioneer.WebClient.JavaScriptHandler,
Exceptioneer.WebClient" /&gt; &lt;/httpHandlers&gt; &lt;/system.web&gt; &lt;!-- If
you're using IIS 7.0 you'll need to add this bit too --&gt; &lt;system.webServer&gt;
&lt;validation validateIntegratedModeConfiguration="false"/&gt; &lt;modules&gt; &lt;add
name="Exceptioneer" preCondition="managedHandler" type="Exceptioneer.WebClient.ClientModule,
Exceptioneer.WebClient" /&gt; &lt;/modules&gt; &lt;handlers&gt; &lt;add name="ExceptioneerJavaScript"
path="ExceptioneerJavaScript.axd" verb="GET,POST" type="Exceptioneer.WebClient.JavaScriptHandler,
Exceptioneer.WebClient" /&gt; &lt;/handlers&gt; &lt;/system.webServer&gt; &lt;/configuration&gt;</code>
        </pre>
        <p>
Now, one of the coolest things about <a href="http://www.exceptioneer.com/">Exceptioneer</a> is
that you can now also debug JavaScript errors! To debug the javascript errors, just
include this script in your templates:
</p>
        <pre class="brush: xml; toolbar: false; auto-links: false;" name="code">&lt;script src="/ExceptioneerJavaScript.axd?Reporter=true" type="text/javascript"&gt;&lt;/script&gt;</pre>
        <p>
That's it, you're done. Easy eh? If you want to know more about what it can do, Phil's
put together this "lovely" <a href="https://www.exceptioneer.com/Public/Demonstration.aspx">video
overview</a>. Exceptioneer have done a great comparison of the main features of <a href="https://www.exceptioneer.com/Public/ExceptioneerAndELMAH.aspx">comparison
Exceptioneer and ELMAH here</a>, the downside though is <a href="http://www.exceptioneer.com/">Exceptioneer</a> is
still in beta. 
</p>
        <p>
Remember, regardless of how good you think your code is, you should always integrate
some form of error handling in your website even if it is just an email to alert you
to the fact. 
</p>
        <img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=bd1cc28f-f7b4-4f09-b096-6091ccfa43d7" />
      </body>
      <title>CodeGarden 09 Open Space Minutes -Space 2: Exception Handling in Umbraco</title>
      <guid isPermaLink="false">http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,bd1cc28f-f7b4-4f09-b096-6091ccfa43d7.aspx</guid>
      <link>http://blogs.thesitedoctor.co.uk/test/2009/07/09/CodeGarden09OpenSpaceMinutesSpace2ExceptionHandlingInUmbraco.aspx</link>
      <pubDate>Thu, 09 Jul 2009 00:23:38 GMT</pubDate>
      <description>&lt;p&gt;
Those of you lucky enough to go to CodeGarden '09 you'll know the format of the Open
Space already but for those of you who didn't, Open Space is the time that the attendees
are invited to talk about something they're interested in so I proposed two:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Space 1: Selling Umbraco 
&lt;li&gt;
Space 2: Exception handing and error reporting in Umbraco (and other .net websites/applications) 
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
I'll write up the Selling Umbraco talk shortly but I wanted to put a few resources
together for it first so decided to write this one up first.
&lt;/p&gt;
&lt;p&gt;
First of all we had a brief chat about how everyone handles errors in their applications
and the various error handling options available. We discussed three options:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;a href="http://blogs.thesitedoctor.co.uk/tim/2009/02/27/Advanced+Error+Reporting+In+Umbraco+DasBlog+And+Other+ASPNet+Sites.aspx"&gt;Error
Handler v2.0&lt;/a&gt; 
&lt;li&gt;
&lt;a href="http://code.google.com/p/elmah/"&gt;ELMAH&lt;/a&gt; 
&lt;li&gt;
&lt;a href="http://www.exceptioneer.com/"&gt;Exceptioneer&lt;/a&gt; 
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
I've only had a brief look at &lt;a href="http://code.google.com/p/elmah/"&gt;ELMAH&lt;/a&gt; and
found at the time it was a little too much in the way of RSS feeds etc and I just
want an email alert, that said, Lee Kelleher has written a good article about &lt;a href="http://blog.leekelleher.com/2009/04/23/integrating-elmah-with-umbraco/"&gt;integrating
ELMAH with Umbraco here&lt;/a&gt; and I've written another article about &lt;a href="http://blogs.thesitedoctor.co.uk/tim/2009/02/27/Advanced+Error+Reporting+In+Umbraco+DasBlog+And+Other+ASPNet+Sites.aspx"&gt;integrating
Error Handler v2.0 into Umbraco here&lt;/a&gt; so I'll overview how to integrate &lt;a href="http://www.exceptioneer.com/"&gt;Exceptioneer&lt;/a&gt; into
Umbraco here instead.
&lt;/p&gt;
&lt;p&gt;
Wiring up &lt;a href="http://www.exceptioneer.com/"&gt;Exceptioneer&lt;/a&gt; with your site couldn't
be easier, the best bit is that they do all the hard work for you with their "Integrate"
section of the site but to give you a quick snapshot of how easy it is, first of all, &lt;a href="https://www.exceptioneer.com/Site/Downloads.aspx"&gt;download
the dll&lt;/a&gt; and pop it into your bin folder. Then edit your web.config:
&lt;/p&gt;
&lt;pre class="code"&gt;
&lt;code class="brush: xml; toolbar: false; auto-links: false;"&gt;&amp;lt;?xml
version="1.0"?&amp;gt; &amp;lt;configuration&amp;gt; &amp;lt;configSections&amp;gt; &amp;lt;section name="Exceptioneer"
type="Exceptioneer.WebClient.ClientModuleConfiguration, Exceptioneer.WebClient" requirePermission="true"
/&amp;gt; &amp;lt;/configSections&amp;gt; &amp;lt;!-- This is where you get to specify your API Key
and Application Name --&amp;gt; &amp;lt;Exceptioneer ApiKey="XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
ApplicationName="YOUR APPLICATION NAME" /&amp;gt; &amp;lt;!-- If you're using IIS 6.0 or Visual
Studio's built in web server you'll need to add this bit --&amp;gt; &amp;lt;system.web&amp;gt;
&amp;lt;httpModules&amp;gt; &amp;lt;add name="Exceptioneer" type="Exceptioneer.WebClient.ClientModule,
Exceptioneer.WebClient" /&amp;gt; &amp;lt;/httpModules&amp;gt; &amp;lt;!-- If you want to use the
JavaScript handling then add the Http Handler as so --&amp;gt; &amp;lt;httpHandlers&amp;gt; &amp;lt;add
path="ExceptioneerJavaScript.axd" verb="GET,POST" type="Exceptioneer.WebClient.JavaScriptHandler,
Exceptioneer.WebClient" /&amp;gt; &amp;lt;/httpHandlers&amp;gt; &amp;lt;/system.web&amp;gt; &amp;lt;!-- If
you're using IIS 7.0 you'll need to add this bit too --&amp;gt; &amp;lt;system.webServer&amp;gt;
&amp;lt;validation validateIntegratedModeConfiguration="false"/&amp;gt; &amp;lt;modules&amp;gt; &amp;lt;add
name="Exceptioneer" preCondition="managedHandler" type="Exceptioneer.WebClient.ClientModule,
Exceptioneer.WebClient" /&amp;gt; &amp;lt;/modules&amp;gt; &amp;lt;handlers&amp;gt; &amp;lt;add name="ExceptioneerJavaScript"
path="ExceptioneerJavaScript.axd" verb="GET,POST" type="Exceptioneer.WebClient.JavaScriptHandler,
Exceptioneer.WebClient" /&amp;gt; &amp;lt;/handlers&amp;gt; &amp;lt;/system.webServer&amp;gt; &amp;lt;/configuration&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
Now, one of the coolest things about &lt;a href="http://www.exceptioneer.com/"&gt;Exceptioneer&lt;/a&gt; is
that you can now also debug JavaScript errors! To debug the javascript errors, just
include this script in your templates:
&lt;/p&gt;
&lt;pre class="brush: xml; toolbar: false; auto-links: false;" name="code"&gt;&amp;lt;script src="/ExceptioneerJavaScript.axd?Reporter=true" type="text/javascript"&amp;gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;
&lt;p&gt;
That's it, you're done. Easy eh? If you want to know more about what it can do, Phil's
put together this "lovely" &lt;a href="https://www.exceptioneer.com/Public/Demonstration.aspx"&gt;video
overview&lt;/a&gt;. Exceptioneer have done a great comparison of the main features of &lt;a href="https://www.exceptioneer.com/Public/ExceptioneerAndELMAH.aspx"&gt;comparison
Exceptioneer and ELMAH here&lt;/a&gt;, the downside though is &lt;a href="http://www.exceptioneer.com/"&gt;Exceptioneer&lt;/a&gt; is
still in beta. 
&lt;/p&gt;
&lt;p&gt;
Remember, regardless of how good you think your code is, you should always integrate
some form of error handling in your website even if it is just an email to alert you
to the fact. 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=bd1cc28f-f7b4-4f09-b096-6091ccfa43d7" /&gt;</description>
      <comments>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,bd1cc28f-f7b4-4f09-b096-6091ccfa43d7.aspx</comments>
      <category>ASP.Net</category>
      <category>ASP.Net/Error Reporting</category>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://blogs.thesitedoctor.co.uk/test/Trackback.aspx?guid=cf6f0226-db49-460d-8de9-7ab3075d6e84</trackback:ping>
      <pingback:server>http://blogs.thesitedoctor.co.uk/test/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,cf6f0226-db49-460d-8de9-7ab3075d6e84.aspx</pingback:target>
      <dc:creator>Tim</dc:creator>
      <wfw:comment>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,cf6f0226-db49-460d-8de9-7ab3075d6e84.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.thesitedoctor.co.uk/test/SyndicationService.asmx/GetEntryCommentsRss?guid=cf6f0226-db49-460d-8de9-7ab3075d6e84</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <h2>The Error
</h2>
        <p>
For those of you who have tried to rename your Umbraco installation directory to something
other than the default /umbraco/ you'll have found that TreeInit.aspx throws a JavaScript
error along the lines of:
</p>
        <p>
Message: Object expected 
<br />
Line: 1 
<br />
Char: 4236 
<br />
Code: 0 
<br />
URI: http://www.yourdomain.co.uk/youradmindirector/js/xloadtree.js
</p>
        <p>
As this only really affects the refresh of the tree/close of a couple of dialogues
I've not bothered fixing it but basically the issue is outlined well here: <a href="http://tinyurl.com/cx9atv">http://tinyurl.com/cx9atv</a></p>
        <h2>The Fix
</h2>
        <p>
If you're using extension less URLs already then it's easy as pie to sort:
</p>
        <ol>
          <li>
Open your UrlRewriting config file (/config/UrlRewriting.config) 
</li>
          <li>
Add this above "&lt;/rewrites&gt;": 
</li>
        </ol>
        <div class="code">
          <div style="display: none">
            <img onclick="showHideCodeDiv('633765388075525066_1', false)" align="top" src="http://blogs.sitedoc.co.uk/img/sc/PlusNoLines.gif" />
            <b>
              <span style="color: #00008b">&lt;...&gt;</span>
            </b>
          </div>
          <div style="display: block" id="open633765388075525066_1">
            <img onclick="showHideCodeDiv('633765388075525066_1', true)" align="top" src="http://blogs.sitedoc.co.uk/img/sc/minusNoTopLine.gif" />
            <span style="color: #0000ff">&lt;</span>
            <span style="color: #8b0000">add</span>
            <span style="color: #ff0000"> name</span>
            <span style="color: #8b0000">=</span>
            <span style="color: #0000ff">"missingjs"</span>  
<br /><img align="top" src="http://blogs.sitedoc.co.uk/img/sc/I.gif" /><span style="color: #ff0000">   
virtualUrl</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"^~/##
YOUR ADMIN DIRECTORY GOES HERE ##_client/ui/(.*).js"</span>  
<br /><img align="top" src="http://blogs.sitedoc.co.uk/img/sc/I.gif" /><span style="color: #ff0000">   
rewriteUrlParameter</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"ExcludeFromClientQueryString"</span>  
<br /><img align="top" src="http://blogs.sitedoc.co.uk/img/sc/I.gif" /><span style="color: #ff0000">   
destinationUrl</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"~/umbraco_client/ui/$1.js"</span>  
<br /><img align="top" src="http://blogs.sitedoc.co.uk/img/sc/L.gif" /><span style="color: #ff0000">   
ignoreCase</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"true"</span> <span style="color: #8b0000">/</span><span style="color: #0000ff">&gt;</span></div>
        </div>
        <p>
If you've not already using extension less URLs don't panic, that's easy to setup
you can <a href="http://www.urlrewriting.net/160/en/documentation.html">read all about
it here</a>. Alternatively you could just copy the js files from one folder to another
;)
</p>
        <h2>The Why
</h2>
        <p>
I don't know how many people already rename their admin dir from something else but
as Umbraco becomes a more popular choice of 
<abbr title="Content Management System">
CMS
</abbr>
you really should consider hiding the folder (the more popular it becomes, the more
people will become more familiar with the default admin directory of /umbraco/).
</p>
        <p>
Although there hasn't yet been a breach (<abbr title="As Far As I Am Aware">
AFAIAA
</abbr>
) if a vulnerability is found, the first step in prevention is obfuscation -hide your
admin directory! A <a href="http://www.google.co.uk/search?q=username+login+inurl%3Aadmin.asp">quick
Google search</a> will show you how easy some developers have made it for you to <a href="http://www.google.co.uk/search?q=username+login+inurl%3Aadmin.asp">find
their admin sites</a>.
</p>
        <img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=cf6f0226-db49-460d-8de9-7ab3075d6e84" />
      </body>
      <title>Fix missing JavaScript file when you rename the Umbraco admin directory</title>
      <guid isPermaLink="false">http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,cf6f0226-db49-460d-8de9-7ab3075d6e84.aspx</guid>
      <link>http://blogs.thesitedoctor.co.uk/test/2009/04/28/FixMissingJavaScriptFileWhenYouRenameTheUmbracoAdminDirectory.aspx</link>
      <pubDate>Tue, 28 Apr 2009 17:49:48 GMT</pubDate>
      <description>&lt;h2&gt;The Error
&lt;/h2&gt;
&lt;p&gt;
For those of you who have tried to rename your Umbraco installation directory to something
other than the default /umbraco/ you'll have found that TreeInit.aspx throws a JavaScript
error along the lines of:
&lt;/p&gt;
&lt;p&gt;
Message: Object expected 
&lt;br /&gt;
Line: 1 
&lt;br /&gt;
Char: 4236 
&lt;br /&gt;
Code: 0 
&lt;br /&gt;
URI: http://www.yourdomain.co.uk/youradmindirector/js/xloadtree.js
&lt;/p&gt;
&lt;p&gt;
As this only really affects the refresh of the tree/close of a couple of dialogues
I've not bothered fixing it but basically the issue is outlined well here: &lt;a href="http://tinyurl.com/cx9atv"&gt;http://tinyurl.com/cx9atv&lt;/a&gt; 
&lt;/p&gt;
&lt;h2&gt;The Fix
&lt;/h2&gt;
&lt;p&gt;
If you're using extension less URLs already then it's easy as pie to sort:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Open your UrlRewriting config file (/config/UrlRewriting.config) 
&lt;/li&gt;
&lt;li&gt;
Add this above &amp;quot;&amp;lt;/rewrites&amp;gt;&amp;quot;: 
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="code"&gt;
&lt;div style="display: none"&gt;&lt;img onclick="showHideCodeDiv(&amp;#39;633765388075525066_1&amp;#39;, false)" align="top" src="http://blogs.sitedoc.co.uk/img/sc/PlusNoLines.gif" /&gt;&lt;b&gt;&lt;span style="color: #00008b"&gt;&amp;lt;...&amp;gt;&lt;/span&gt;&lt;/b&gt;
&lt;/div&gt;
&lt;div style="display: block" id="open633765388075525066_1"&gt;&lt;img onclick="showHideCodeDiv(&amp;#39;633765388075525066_1&amp;#39;, true)" align="top" src="http://blogs.sitedoc.co.uk/img/sc/minusNoTopLine.gif" /&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;add&lt;/span&gt;&lt;span style="color: #ff0000"&gt; name&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;missingjs&amp;quot;&lt;/span&gt;&amp;#160; 
&lt;br /&gt;
&lt;img align="top" src="http://blogs.sitedoc.co.uk/img/sc/I.gif" /&gt;&lt;span style="color: #ff0000"&gt;&amp;#160;&amp;#160;&amp;#160;
virtualUrl&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;^~/##
YOUR ADMIN DIRECTORY GOES HERE ##_client/ui/(.*).js&amp;quot;&lt;/span&gt;&amp;#160; 
&lt;br /&gt;
&lt;img align="top" src="http://blogs.sitedoc.co.uk/img/sc/I.gif" /&gt;&lt;span style="color: #ff0000"&gt;&amp;#160;&amp;#160;&amp;#160;
rewriteUrlParameter&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;ExcludeFromClientQueryString&amp;quot;&lt;/span&gt;&amp;#160; 
&lt;br /&gt;
&lt;img align="top" src="http://blogs.sitedoc.co.uk/img/sc/I.gif" /&gt;&lt;span style="color: #ff0000"&gt;&amp;#160;&amp;#160;&amp;#160;
destinationUrl&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;~/umbraco_client/ui/$1.js&amp;quot;&lt;/span&gt;&amp;#160; 
&lt;br /&gt;
&lt;img align="top" src="http://blogs.sitedoc.co.uk/img/sc/L.gif" /&gt;&lt;span style="color: #ff0000"&gt;&amp;#160;&amp;#160;&amp;#160;
ignoreCase&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;true&amp;quot;&lt;/span&gt;&amp;#160;&lt;span style="color: #8b0000"&gt;/&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
If you've not already using extension less URLs don't panic, that's easy to setup
you can &lt;a href="http://www.urlrewriting.net/160/en/documentation.html"&gt;read all about
it here&lt;/a&gt;. Alternatively you could just copy the js files from one folder to another
;)
&lt;/p&gt;
&lt;h2&gt;The Why
&lt;/h2&gt;
&lt;p&gt;
I don't know how many people already rename their admin dir from something else but
as Umbraco becomes a more popular choice of 
&lt;abbr title="Content Management System"&gt;
CMS
&lt;/abbr&gt;
you really should consider hiding the folder (the more popular it becomes, the more
people will become more familiar with the default admin directory of /umbraco/).
&lt;/p&gt;
&lt;p&gt;
Although there hasn't yet been a breach (&lt;abbr title="As Far As I Am Aware"&gt;
AFAIAA
&lt;/abbr&gt;
) if a vulnerability is found, the first step in prevention is obfuscation -hide your
admin directory! A &lt;a href="http://www.google.co.uk/search?q=username+login+inurl%3Aadmin.asp"&gt;quick
Google search&lt;/a&gt; will show you how easy some developers have made it for you to &lt;a href="http://www.google.co.uk/search?q=username+login+inurl%3Aadmin.asp"&gt;find
their admin sites&lt;/a&gt;.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=cf6f0226-db49-460d-8de9-7ab3075d6e84" /&gt;</description>
      <comments>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,cf6f0226-db49-460d-8de9-7ab3075d6e84.aspx</comments>
      <category>ASP.Net</category>
      <category>Security</category>
      <category>The Site Doctor</category>
      <category>Umbraco</category>
      <category>Web Development</category>
    </item>
    <item>
      <trackback:ping>http://blogs.thesitedoctor.co.uk/test/Trackback.aspx?guid=c66c1f56-d28a-45a5-98c6-1d8400dc272e</trackback:ping>
      <pingback:server>http://blogs.thesitedoctor.co.uk/test/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,c66c1f56-d28a-45a5-98c6-1d8400dc272e.aspx</pingback:target>
      <dc:creator>Tim</dc:creator>
      <wfw:comment>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,c66c1f56-d28a-45a5-98c6-1d8400dc272e.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.thesitedoctor.co.uk/test/SyndicationService.asmx/GetEntryCommentsRss?guid=c66c1f56-d28a-45a5-98c6-1d8400dc272e</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
If you've been following my blog you'll know that I've been raving about error reporting
within ASP.Net (you can see my <a title="http://blogs.thesitedoctor.co.uk/tim/CategoryView,category,ASPNetErrorReporting.aspx" href="http://blogs.thesitedoctor.co.uk/tim/CategoryView,category,ASPNetErrorReporting">ASP.Net
Error Reporting category</a> for a couple of them if you like) but until now it's
been limited to those sites that you have access to the global.asax file.
</p>
        <p>
One of the irritations I've found with Umbraco and dasBlog is that I don't get notified
of errors as they're just logged to a text file/database somewhere. This is fine if
you run 2 or 3 sites but we manage too many to check them all everyday. Instead we
rely on email error notifications which until today have been a PITA to integrate
into Umbraco.
</p>
        <p>
Today I'd like to introduce to you <a title="http://blogs.thesitedoctor.co.uk/tim/files/ErrorHandling_v2.0.zip" href="http://blogs.thesitedoctor.co.uk/tim/files/ErrorHandling_v2.0.zip">Error
Handling v2.0</a> which instead of relying on the global.asax file for the error hooks,
uses a HttpModule which means you can install it into <strong>any existing/pre-built
application</strong> such as Umbraco and dasBlog.
</p>
        <p>
Adding it into the site is simple, you'll need to install the module into the web.config
file and add the configuration section a sample (cut down) web.config is below:
</p>
        <div class="code">
          <img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" />
          <span style="color: #0000ff">&lt;</span>
          <span style="color: #8b0000">?xml</span>
          <span style="color: #ff0000"> version</span>
          <span style="color: #8b0000">=</span>
          <span style="color: #0000ff">"1.0"</span>
          <span style="color: #8b0000">?</span>
          <span style="color: #0000ff">&gt;</span>  
<br /><img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" /><span style="color: #0000ff">&lt;</span><span style="color: #8b0000">configuration</span><span style="color: #0000ff">&gt;</span>  
<br /><img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" />    <span style="color: #0000ff">&lt;</span><span style="color: #8b0000">configSections</span><span style="color: #0000ff">&gt;</span>  
<br /><img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" />        <span style="color: #0000ff">&lt;</span><span style="color: #8b0000">section</span><span style="color: #ff0000"> name</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"tsdErrorsConfigSection"</span><span style="color: #ff0000"> allowExeDefinition</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"MachineToApplication"</span><span style="color: #ff0000"> restartOnExternalChanges</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"true"</span><span style="color: #ff0000"> type</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"System.Configuration.NameValueFileSectionHandler,
System,</span> <span style="color: #0000ff">Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089"</span> <span style="color: #8b0000">/</span><span style="color: #0000ff">&gt;</span>  
<br /><img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" />    <span style="color: #0000ff">&lt;</span><span style="color: #8b0000">/configSections</span><span style="color: #0000ff">&gt;</span>  
<br /><img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" />  
<br /><img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" />    <span style="color: #0000ff">&lt;</span><span style="color: #8b0000">tsdErrorsConfigSection</span><span style="color: #ff0000"> file</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"ErrorHandling.config"</span><span style="color: #8b0000">/</span><span style="color: #0000ff">&gt;</span>  
<br /><img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" />  
<br /><img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" />    <span style="color: #0000ff">&lt;</span><span style="color: #8b0000">system.net</span><span style="color: #0000ff">&gt;</span>  
<br /><img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" />        <span style="color: #0000ff">&lt;</span><span style="color: #8b0000">mailSettings</span><span style="color: #0000ff">&gt;</span>  
<br /><img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" />            <span style="color: #0000ff">&lt;</span><span style="color: #8b0000">smtp</span><span style="color: #ff0000"> from</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"you@yourdomain.com"&gt;</span>  
<br /><img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" />                <span style="color: #0000ff">&lt;</span><span style="color: #8b0000">network</span><span style="color: #ff0000"> host</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"127.0.0.1"</span><span style="color: #ff0000"> port</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"25"</span> <span style="color: #8b0000">/</span><span style="color: #0000ff">&gt;</span>  
<br /><img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" />            <span style="color: #0000ff">&lt;</span><span style="color: #8b0000">/smtp</span><span style="color: #0000ff">&gt;</span>  
<br /><img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" />        <span style="color: #0000ff">&lt;</span><span style="color: #8b0000">/mailSettings</span><span style="color: #0000ff">&gt;</span>  
<br /><img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" />    <span style="color: #0000ff">&lt;</span><span style="color: #8b0000">/system.net</span><span style="color: #0000ff">&gt;</span>  
<br /><img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" />  
<br /><img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" />    <span style="color: #0000ff">&lt;</span><span style="color: #8b0000">system.web</span><span style="color: #0000ff">&gt;</span>  
<br /><img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" />        <span style="color: #0000ff">&lt;</span><span style="color: #8b0000">httpModules</span><span style="color: #0000ff">&gt;</span>  
<br /><img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" />            <span style="color: #0000ff">&lt;</span><span style="color: #8b0000">add</span><span style="color: #ff0000"> name</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"ErrorModule"</span><span style="color: #ff0000"> type</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"TheSiteDoctor.ErrorHandling.ErrorModule,
TheSiteDoctor.ErrorHandling</span><span style="color: #0000ff">"</span> <span style="color: #8b0000">/</span><span style="color: #0000ff">&gt;</span>  
<br /><img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" />        <span style="color: #0000ff">&lt;</span><span style="color: #8b0000">/httpModules</span><span style="color: #0000ff">&gt;</span>  
<br /><img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" />    <span style="color: #0000ff">&lt;</span><span style="color: #8b0000">/system.web</span><span style="color: #0000ff">&gt;</span>  
<br /><img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" /><br /><div id="closed633713471312892682_23" style="display: none"><img onclick="showHideCodeDiv('633713471312892682_23', false)" alt="" src="http://blogs.sitedoc.co.uk/img/sc/PlusNoLines.gif" align="top" /><b><span style="color: #00008b">&lt;!--...--&gt;</span></b></div><div id="open633713471312892682_23" style="display: block"><img onclick="showHideCodeDiv('633713471312892682_23', true)" alt="" src="http://blogs.sitedoc.co.uk/img/sc/minusNoTopLine.gif" align="top" /><span style="color: #008000">&lt;!--</span>   
<br /><img alt="" src="http://blogs.sitedoc.co.uk/img/sc/I.gif" align="top" /><span style="color: #008000">IIS
7 Settings</span>  
<br /><img alt="" src="http://blogs.sitedoc.co.uk/img/sc/I.gif" align="top" />    <span style="color: #008000">&lt;system.webServer&gt;</span>  
<br /><img alt="" src="http://blogs.sitedoc.co.uk/img/sc/I.gif" align="top" />        <span style="color: #008000">&lt;validation
validateIntegratedModeConfiguration="false" /&gt;</span>  
<br /><img alt="" src="http://blogs.sitedoc.co.uk/img/sc/I.gif" align="top" />        <span style="color: #008000">&lt;modules&gt;</span>  
<br /><img alt="" src="http://blogs.sitedoc.co.uk/img/sc/I.gif" align="top" />            <span style="color: #008000">&lt;add
name="ErrorModule" type="TheSiteDoctor.ErrorHandling.ErrorModule, TheSiteDoctor.ErrorHandling"
/&gt;</span>  
<br /><img alt="" src="http://blogs.sitedoc.co.uk/img/sc/I.gif" align="top" />        <span style="color: #008000">&lt;/modules&gt;</span>  
<br /><img alt="" src="http://blogs.sitedoc.co.uk/img/sc/I.gif" align="top" />    <span style="color: #008000">&lt;/system.webServer&gt;</span>  
<br /><img alt="" src="http://blogs.sitedoc.co.uk/img/sc/L.gif" align="top" /><span style="color: #008000">--&gt;</span></div><img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" /><span style="color: #0000ff">&lt;</span><span style="color: #8b0000">/configuration</span><span style="color: #0000ff">&gt;</span></div>
        <p>
Then you'll need to check all the settings -I recommend storing these in another .config
file for clarities sake. Make sure you've configured your SMTP settings and you should
be good to go.
</p>
        <p>
If you want to test your settings, I've included a test page for you that will check
your settings and show you the defaults if you've not set them. I've got this running
now on a couple of Umbraco and dasBlog installs without an issue.
</p>
        <p>
There's also a useful logging system in it which I'll look to overview in a later
post but if you want to see it, check out the included aspx file.
</p>
        <p>
          <a title="http://blogs.thesitedoctor.co.uk/tim/files/ErrorHandling_v2.0.zip" href="http://blogs.thesitedoctor.co.uk/tim/files/ErrorHandling_v2.0.zip">Download
ErrorHandling_v2.0.zip (25Kb)</a>
        </p>
        <p>
If you do use this code I'd be interested to hear how you get on, I think it requires
a little more refinement un some areas but it's pretty robust.
</p>
        <p>
Enjoy.
</p>
        <img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=c66c1f56-d28a-45a5-98c6-1d8400dc272e" />
      </body>
      <title>Advanced Error Reporting in Umbraco, dasBlog and other ASP.Net sites</title>
      <guid isPermaLink="false">http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,c66c1f56-d28a-45a5-98c6-1d8400dc272e.aspx</guid>
      <link>http://blogs.thesitedoctor.co.uk/test/2009/02/27/AdvancedErrorReportingInUmbracoDasBlogAndOtherASPNetSites.aspx</link>
      <pubDate>Fri, 27 Feb 2009 15:51:13 GMT</pubDate>
      <description>&lt;p&gt;
If you've been following my blog you'll know that I've been raving about error reporting
within ASP.Net (you can see my &lt;a title="http://blogs.thesitedoctor.co.uk/tim/CategoryView,category,ASPNetErrorReporting.aspx" href="http://blogs.thesitedoctor.co.uk/tim/CategoryView,category,ASPNetErrorReporting"&gt;ASP.Net
Error Reporting category&lt;/a&gt; for a couple of them if you like) but until now it's
been limited to those sites that you have access to the global.asax file.
&lt;/p&gt;
&lt;p&gt;
One of the irritations I've found with Umbraco and dasBlog is that I don't get notified
of errors as they're just logged to a text file/database somewhere. This is fine if
you run 2 or 3 sites but we manage too many to check them all everyday. Instead we
rely on email error notifications which until today have been a PITA to integrate
into Umbraco.
&lt;/p&gt;
&lt;p&gt;
Today I'd like to introduce to you &lt;a title="http://blogs.thesitedoctor.co.uk/tim/files/ErrorHandling_v2.0.zip" href="http://blogs.thesitedoctor.co.uk/tim/files/ErrorHandling_v2.0.zip"&gt;Error
Handling v2.0&lt;/a&gt; which instead of relying on the global.asax file for the error hooks,
uses a HttpModule which means you can install it into &lt;strong&gt;any existing/pre-built
application&lt;/strong&gt; such as Umbraco and dasBlog.
&lt;/p&gt;
&lt;p&gt;
Adding it into the site is simple, you'll need to install the module into the web.config
file and add the configuration section a sample (cut down) web.config is below:
&lt;/p&gt;
&lt;div class="code"&gt;&lt;img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" /&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;?xml&lt;/span&gt;&lt;span style="color: #ff0000"&gt; version&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;1.0&amp;quot;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;?&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&amp;#160; 
&lt;br /&gt;
&lt;img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" /&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;configuration&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&amp;#160; 
&lt;br /&gt;
&lt;img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;configSections&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&amp;#160; 
&lt;br /&gt;
&lt;img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;section&lt;/span&gt;&lt;span style="color: #ff0000"&gt; name&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;tsdErrorsConfigSection&amp;quot;&lt;/span&gt;&lt;span style="color: #ff0000"&gt; allowExeDefinition&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;MachineToApplication&amp;quot;&lt;/span&gt;&lt;span style="color: #ff0000"&gt; restartOnExternalChanges&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;true&amp;quot;&lt;/span&gt;&lt;span style="color: #ff0000"&gt; type&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;System.Configuration.NameValueFileSectionHandler,
System,&lt;/span&gt;&amp;#160;&lt;span style="color: #0000ff"&gt;Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089&amp;quot;&lt;/span&gt;&amp;#160;&lt;span style="color: #8b0000"&gt;/&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&amp;#160; 
&lt;br /&gt;
&lt;img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;/configSections&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&amp;#160; 
&lt;br /&gt;
&lt;img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" /&gt;&amp;#160; 
&lt;br /&gt;
&lt;img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;tsdErrorsConfigSection&lt;/span&gt;&lt;span style="color: #ff0000"&gt; file&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;ErrorHandling.config&amp;quot;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;/&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&amp;#160; 
&lt;br /&gt;
&lt;img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" /&gt;&amp;#160; 
&lt;br /&gt;
&lt;img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;system.net&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&amp;#160; 
&lt;br /&gt;
&lt;img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;mailSettings&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&amp;#160; 
&lt;br /&gt;
&lt;img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;smtp&lt;/span&gt;&lt;span style="color: #ff0000"&gt; from&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;you@yourdomain.com&amp;quot;&amp;gt;&lt;/span&gt;&amp;#160; 
&lt;br /&gt;
&lt;img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;network&lt;/span&gt;&lt;span style="color: #ff0000"&gt; host&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;127.0.0.1&amp;quot;&lt;/span&gt;&lt;span style="color: #ff0000"&gt; port&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;25&amp;quot;&lt;/span&gt;&amp;#160;&lt;span style="color: #8b0000"&gt;/&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&amp;#160; 
&lt;br /&gt;
&lt;img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;/smtp&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&amp;#160; 
&lt;br /&gt;
&lt;img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;/mailSettings&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&amp;#160; 
&lt;br /&gt;
&lt;img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;/system.net&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&amp;#160; 
&lt;br /&gt;
&lt;img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" /&gt;&amp;#160; 
&lt;br /&gt;
&lt;img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;system.web&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&amp;#160; 
&lt;br /&gt;
&lt;img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;httpModules&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&amp;#160; 
&lt;br /&gt;
&lt;img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;add&lt;/span&gt;&lt;span style="color: #ff0000"&gt; name&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;ErrorModule&amp;quot;&lt;/span&gt;&lt;span style="color: #ff0000"&gt; type&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;TheSiteDoctor.ErrorHandling.ErrorModule,
TheSiteDoctor.ErrorHandling&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;&lt;/span&gt;&amp;#160;&lt;span style="color: #8b0000"&gt;/&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&amp;#160; 
&lt;br /&gt;
&lt;img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;/httpModules&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&amp;#160; 
&lt;br /&gt;
&lt;img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;/system.web&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&amp;#160; 
&lt;br /&gt;
&lt;img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" /&gt; 
&lt;br /&gt;
&lt;div id="closed633713471312892682_23" style="display: none"&gt;&lt;img onclick="showHideCodeDiv(&amp;#39;633713471312892682_23&amp;#39;, false)" alt="" src="http://blogs.sitedoc.co.uk/img/sc/PlusNoLines.gif" align="top" /&gt;&lt;b&gt;&lt;span style="color: #00008b"&gt;&amp;lt;!--...--&amp;gt;&lt;/span&gt;&lt;/b&gt;
&lt;/div&gt;
&lt;div id="open633713471312892682_23" style="display: block"&gt;&lt;img onclick="showHideCodeDiv(&amp;#39;633713471312892682_23&amp;#39;, true)" alt="" src="http://blogs.sitedoc.co.uk/img/sc/minusNoTopLine.gif" align="top" /&gt;&lt;span style="color: #008000"&gt;&amp;lt;!--&lt;/span&gt;&amp;#160;&amp;#160; 
&lt;br /&gt;
&lt;img alt="" src="http://blogs.sitedoc.co.uk/img/sc/I.gif" align="top" /&gt;&lt;span style="color: #008000"&gt;IIS
7 Settings&lt;/span&gt;&amp;#160; 
&lt;br /&gt;
&lt;img alt="" src="http://blogs.sitedoc.co.uk/img/sc/I.gif" align="top" /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #008000"&gt;&amp;lt;system.webServer&amp;gt;&lt;/span&gt;&amp;#160; 
&lt;br /&gt;
&lt;img alt="" src="http://blogs.sitedoc.co.uk/img/sc/I.gif" align="top" /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #008000"&gt;&amp;lt;validation
validateIntegratedModeConfiguration=&amp;quot;false&amp;quot; /&amp;gt;&lt;/span&gt;&amp;#160; 
&lt;br /&gt;
&lt;img alt="" src="http://blogs.sitedoc.co.uk/img/sc/I.gif" align="top" /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #008000"&gt;&amp;lt;modules&amp;gt;&lt;/span&gt;&amp;#160; 
&lt;br /&gt;
&lt;img alt="" src="http://blogs.sitedoc.co.uk/img/sc/I.gif" align="top" /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #008000"&gt;&amp;lt;add
name=&amp;quot;ErrorModule&amp;quot; type=&amp;quot;TheSiteDoctor.ErrorHandling.ErrorModule, TheSiteDoctor.ErrorHandling&amp;quot;
/&amp;gt;&lt;/span&gt;&amp;#160; 
&lt;br /&gt;
&lt;img alt="" src="http://blogs.sitedoc.co.uk/img/sc/I.gif" align="top" /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #008000"&gt;&amp;lt;/modules&amp;gt;&lt;/span&gt;&amp;#160; 
&lt;br /&gt;
&lt;img alt="" src="http://blogs.sitedoc.co.uk/img/sc/I.gif" align="top" /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #008000"&gt;&amp;lt;/system.webServer&amp;gt;&lt;/span&gt;&amp;#160; 
&lt;br /&gt;
&lt;img alt="" src="http://blogs.sitedoc.co.uk/img/sc/L.gif" align="top" /&gt;&lt;span style="color: #008000"&gt;--&amp;gt;&lt;/span&gt;
&lt;/div&gt;
&lt;img alt="" src="http://blogs.sitedoc.co.uk/img/sc/clear.gif" align="top" /&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;/configuration&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; 
&lt;/div&gt;
&lt;p&gt;
Then you'll need to check all the settings -I recommend storing these in another .config
file for clarities sake. Make sure you've configured your SMTP settings and you should
be good to go.
&lt;/p&gt;
&lt;p&gt;
If you want to test your settings, I've included a test page for you that will check
your settings and show you the defaults if you've not set them. I've got this running
now on a couple of Umbraco and dasBlog installs without an issue.
&lt;/p&gt;
&lt;p&gt;
There's also a useful logging system in it which I'll look to overview in a later
post but if you want to see it, check out the included aspx file.
&lt;/p&gt;
&lt;p&gt;
&lt;a title="http://blogs.thesitedoctor.co.uk/tim/files/ErrorHandling_v2.0.zip" href="http://blogs.thesitedoctor.co.uk/tim/files/ErrorHandling_v2.0.zip"&gt;Download
ErrorHandling_v2.0.zip (25Kb)&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
If you do use this code I'd be interested to hear how you get on, I think it requires
a little more refinement un some areas but it's pretty robust.
&lt;/p&gt;
&lt;p&gt;
Enjoy.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=c66c1f56-d28a-45a5-98c6-1d8400dc272e" /&gt;</description>
      <comments>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,c66c1f56-d28a-45a5-98c6-1d8400dc272e.aspx</comments>
      <category>ASP.Net</category>
      <category>ASP.Net/Error Reporting</category>
      <category>dasBlog</category>
      <category>Umbraco</category>
      <category>Web Development</category>
    </item>
    <item>
      <trackback:ping>http://blogs.thesitedoctor.co.uk/test/Trackback.aspx?guid=1644b1cd-0923-435d-8d69-a2b33cc3e2ef</trackback:ping>
      <pingback:server>http://blogs.thesitedoctor.co.uk/test/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,1644b1cd-0923-435d-8d69-a2b33cc3e2ef.aspx</pingback:target>
      <dc:creator>Tim</dc:creator>
      <wfw:comment>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,1644b1cd-0923-435d-8d69-a2b33cc3e2ef.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.thesitedoctor.co.uk/test/SyndicationService.asmx/GetEntryCommentsRss?guid=1644b1cd-0923-435d-8d69-a2b33cc3e2ef</wfw:commentRss>
      <slash:comments>4</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I thought I'd share this as it's something I've been thinking about trying for a while.
Umbraco is great but sometimes you want the default document selected when creating
a page to be one that isn't the alphabetically first one.
</p>
        <p>
To work around this I tend to prefix the important Umbraco document types with a symbol
(or you could use 1. etc I guess) but if instead you use a space (" ") before the
name of your document type, Umbraco will place it at the top of the list for you.
</p>
        <p>
          <img src="http://blogs.sitedoc.co.uk/tim/img/Order-Umbraco-Document-Types.png" />
        </p>
        <p>
The nice thing to note here is that they obviously trim the name first so it just
appears as "Text Page" rather than " Text Page".
</p>
        <p>
I found this out on our latest site which is just about to go live: <a href="http://www.nhshistopathology.net/?utm_source=The%2BSite%2BDoctor&amp;utm_medium=Blog&amp;utm_campaign=Tim">www.nhshistopathology.net</a> -check
it out and let me know what you think.
</p>
        <p>
Enjoy!
</p>
        <img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=1644b1cd-0923-435d-8d69-a2b33cc3e2ef" />
      </body>
      <title>Umbraco tip of the day &amp;ndash;sort your document types</title>
      <guid isPermaLink="false">http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,1644b1cd-0923-435d-8d69-a2b33cc3e2ef.aspx</guid>
      <link>http://blogs.thesitedoctor.co.uk/test/2009/01/21/UmbracoTipOfTheDayNdashsortYourDocumentTypes.aspx</link>
      <pubDate>Wed, 21 Jan 2009 19:59:39 GMT</pubDate>
      <description>&lt;p&gt;
I thought I'd share this as it's something I've been thinking about trying for a while.
Umbraco is great but sometimes you want the default document selected when creating
a page to be one that isn't the alphabetically first one.
&lt;/p&gt;
&lt;p&gt;
To work around this I tend to prefix the important Umbraco document types with a symbol
(or you could use 1. etc I guess) but if instead you use a space (" ") before the
name of your document type, Umbraco will place it at the top of the list for you.
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://blogs.sitedoc.co.uk/tim/img/Order-Umbraco-Document-Types.png" /&gt;
&lt;/p&gt;
&lt;p&gt;
The nice thing to note here is that they obviously trim the name first so it just
appears as "Text Page" rather than " Text Page".
&lt;/p&gt;
&lt;p&gt;
I found this out on our latest site which is just about to go live: &lt;a href="http://www.nhshistopathology.net/?utm_source=The%2BSite%2BDoctor&amp;amp;utm_medium=Blog&amp;amp;utm_campaign=Tim"&gt;www.nhshistopathology.net&lt;/a&gt; -check
it out and let me know what you think.
&lt;/p&gt;
&lt;p&gt;
Enjoy!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=1644b1cd-0923-435d-8d69-a2b33cc3e2ef" /&gt;</description>
      <comments>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,1644b1cd-0923-435d-8d69-a2b33cc3e2ef.aspx</comments>
      <category>The Site Doctor</category>
      <category>Umbraco</category>
      <category>Web Development</category>
    </item>
    <item>
      <trackback:ping>http://blogs.thesitedoctor.co.uk/test/Trackback.aspx?guid=0e540d45-58b9-4701-a4ca-4917f3bf31fd</trackback:ping>
      <pingback:server>http://blogs.thesitedoctor.co.uk/test/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,0e540d45-58b9-4701-a4ca-4917f3bf31fd.aspx</pingback:target>
      <dc:creator>Tim</dc:creator>
      <wfw:comment>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,0e540d45-58b9-4701-a4ca-4917f3bf31fd.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.thesitedoctor.co.uk/test/SyndicationService.asmx/GetEntryCommentsRss?guid=0e540d45-58b9-4701-a4ca-4917f3bf31fd</wfw:commentRss>
      <slash:comments>9</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
When uploading some new media items for a client today we noticed that if you selected
"Remove" before saving, it doesn't actually remove the file from the FileSystem. Having
a quick look around the forums I saw there are a few posts already pointing this out
so I thought I'd fix it.
</p>
        <p>
This is a little application that simply checks the media items in the database and
then compares it against a folder you select on your machine. If the file is in use
according to the database then it's ignored otherwise it will remove it.
</p>
        <p>
          <img src="http://blogs.sitedoc.co.uk/tim/img/MediaCleaner.png" />
        </p>
        <p>
To use:
</p>
        <ol>
          <li>
Enter your server's login details</li>
          <li>
Click "Test Connection"</li>
          <li>
Select the relevant database from the drop down</li>
          <li>
Check the "Media Folder Name" matches your Umbraco's installation</li>
          <li>
Locate your Media Folder on your computer</li>
          <li>
Click "Check Media Folder" -this will then list all the orphan files</li>
          <li>
If it looks right, click "Delete" -with caution</li>
          <li>
Job done</li>
        </ol>
        <p>
There are a few checks in place to avoid mishap but it's not 100% foolproof as I needed
something rough and ready to sort a couple of installations out. If this is something
that's seen as useful I'll extend it a touch, some ideas I've got already:
</p>
        <ul>
          <li>
Check that the selected media folder matches that of the database</li>
          <li>
Check that the media id's are the same (to avoid wiping another installation)</li>
          <li>
Save config settings for easy re-use</li>
          <li>
Use webservices rather than a direct connection to the database</li>
          <li>
Enable FTP useage</li>
        </ul>
        <p>
          <strong>Please note:</strong> I accept no responsibility if anything was to go horribly
wrong with this. I would backup your folder first just in case!
</p>
        <p>
You can <a title="Clean out your Umbraco media folder" href="http://blogs.sitedoc.co.uk/tim/files/MediaFolderCleaner.zip">download
the MediaFolderCleaner application here</a></p>
        <img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=0e540d45-58b9-4701-a4ca-4917f3bf31fd" />
      </body>
      <title>Clean out unused media items from Umbraco media folder</title>
      <guid isPermaLink="false">http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,0e540d45-58b9-4701-a4ca-4917f3bf31fd.aspx</guid>
      <link>http://blogs.thesitedoctor.co.uk/test/2008/09/03/CleanOutUnusedMediaItemsFromUmbracoMediaFolder.aspx</link>
      <pubDate>Wed, 03 Sep 2008 16:15:14 GMT</pubDate>
      <description>&lt;p&gt;
When uploading some new media items for a client today we noticed that if you selected
"Remove" before saving, it doesn't actually remove the file from the FileSystem. Having
a quick look around the forums I saw there are a few posts already pointing this out
so I thought I'd fix it.
&lt;/p&gt;
&lt;p&gt;
This is a little application that simply checks the media items in the database and
then compares it against a folder you select on your machine. If the file is in use
according to the database then it's ignored otherwise it will remove it.
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://blogs.sitedoc.co.uk/tim/img/MediaCleaner.png" /&gt; 
&lt;/p&gt;
&lt;p&gt;
To use:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Enter your server's login details&lt;/li&gt;
&lt;li&gt;
Click "Test Connection"&lt;/li&gt;
&lt;li&gt;
Select the relevant database from the drop down&lt;/li&gt;
&lt;li&gt;
Check the "Media Folder Name" matches your Umbraco's installation&lt;/li&gt;
&lt;li&gt;
Locate your Media Folder on your computer&lt;/li&gt;
&lt;li&gt;
Click "Check Media Folder" -this will then list all the orphan files&lt;/li&gt;
&lt;li&gt;
If it looks right, click "Delete" -with caution&lt;/li&gt;
&lt;li&gt;
Job done&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
There are a few checks in place to avoid mishap but it's not 100% foolproof as I needed
something rough and ready to sort a couple of installations out. If this is something
that's seen as useful I'll extend it a touch, some ideas I've got already:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Check that the selected media folder matches that of the database&lt;/li&gt;
&lt;li&gt;
Check that the media id's are the same (to avoid wiping another installation)&lt;/li&gt;
&lt;li&gt;
Save config settings for easy re-use&lt;/li&gt;
&lt;li&gt;
Use webservices rather than a direct connection to the database&lt;/li&gt;
&lt;li&gt;
Enable FTP useage&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
&lt;strong&gt;Please note:&lt;/strong&gt; I accept no responsibility if anything was to go horribly
wrong with this. I would backup your folder first just in case!
&lt;/p&gt;
&lt;p&gt;
You can &lt;a title="Clean out your Umbraco media folder" href="http://blogs.sitedoc.co.uk/tim/files/MediaFolderCleaner.zip"&gt;download
the MediaFolderCleaner application here&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=0e540d45-58b9-4701-a4ca-4917f3bf31fd" /&gt;</description>
      <comments>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,0e540d45-58b9-4701-a4ca-4917f3bf31fd.aspx</comments>
      <category>C#</category>
      <category>Development</category>
      <category>The Site Doctor</category>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://blogs.thesitedoctor.co.uk/test/Trackback.aspx?guid=809a68a5-0cb0-4eef-aba0-010a26d79de3</trackback:ping>
      <pingback:server>http://blogs.thesitedoctor.co.uk/test/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,809a68a5-0cb0-4eef-aba0-010a26d79de3.aspx</pingback:target>
      <dc:creator>Tim</dc:creator>
      <wfw:comment>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,809a68a5-0cb0-4eef-aba0-010a26d79de3.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.thesitedoctor.co.uk/test/SyndicationService.asmx/GetEntryCommentsRss?guid=809a68a5-0cb0-4eef-aba0-010a26d79de3</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://forum.umbraco.org/yaf_postsm26275_UK-Umbraco-meet-up.aspx">As requested
on the forum</a>, we've got a map to try and work out where it should be placed, if
you want to come along get yourself added: <a title="http://tinyurl.com/3oaf8x" href="http://tinyurl.com/3oaf8x">http://tinyurl.com/3oaf8x</a></p>
        <p>
          <a href="http://maps.google.com/support/bin/answer.py?hl=en-ch&amp;answer=68480">Instructions
from Google</a>:
</p>
        <h5>
          <a name="placemark">
          </a>Adding and Editing Placemarks
</h5>
        <p>
To add a placemark to your map:
</p>
        <ol>
          <li>
Create or open a map. 
</li>
          <li>
Click <img height="31" alt="Placemark button" src="http://www.google.com/help/hc/images/maps_Bmu.png" width="31" />.
Your cursor changes into a placemark icon with an "X" crosshairs. The crosshairs
indicate where the placemark will fall. 
<br /><img height="67" alt="Placemark icon" src="http://maps.google.com/help/maps/userguide/images/placemark_place.png" width="181" /></li>
          <li>
Move the cursor to the appropriate location. If you want to dismiss this placemark,
press the Escape key. 
</li>
          <li>
Click your mouse button to place your placemark. It should bounce into place. 
</li>
          <li>
Add a title and description. 
</li>
          <li>
You can also change the icon for your placemark by clicking the icon in the top right
corner of the info window. You can also add your own icon. 
</li>
          <li>
Click <strong>OK</strong> to save your placemark. 
</li>
        </ol>
        <h5>To move or edit a placemark:
</h5>
        <ol>
          <li>
Click <strong>Edit</strong> in the left panel. 
</li>
          <li>
Drag and drop the appropriate placemark to the new location. Note that you can only
edit or move placemarks on your maps, not others. 
</li>
          <li>
To edit a placemark's title or description, click on it to open the info window. Edit
the title and description and click <strong>OK</strong>. 
</li>
          <li>
Click <strong>Done</strong> in the left panel when you are finished. 
</li>
        </ol>
        <img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=809a68a5-0cb0-4eef-aba0-010a26d79de3" />
      </body>
      <title>UK Umbraco meet has a map</title>
      <guid isPermaLink="false">http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,809a68a5-0cb0-4eef-aba0-010a26d79de3.aspx</guid>
      <link>http://blogs.thesitedoctor.co.uk/test/2008/06/25/UKUmbracoMeetHasAMap.aspx</link>
      <pubDate>Wed, 25 Jun 2008 09:25:00 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a href="http://forum.umbraco.org/yaf_postsm26275_UK-Umbraco-meet-up.aspx"&gt;As requested
on the forum&lt;/a&gt;, we've got a map to try and work out where it should be placed, if
you want to come along get yourself added: &lt;a title="http://tinyurl.com/3oaf8x" href="http://tinyurl.com/3oaf8x"&gt;http://tinyurl.com/3oaf8x&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://maps.google.com/support/bin/answer.py?hl=en-ch&amp;amp;answer=68480"&gt;Instructions
from Google&lt;/a&gt;:
&lt;/p&gt;
&lt;h5&gt;&lt;a name="placemark"&gt;&lt;/a&gt;Adding and Editing Placemarks
&lt;/h5&gt;
&lt;p&gt;
To add a placemark to your map:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Create or open a map. 
&lt;/li&gt;
&lt;li&gt;
Click &lt;img height="31" alt="Placemark button" src="http://www.google.com/help/hc/images/maps_Bmu.png" width="31" /&gt;.
Your cursor changes into a placemark icon with an &amp;quot;X&amp;quot; crosshairs. The crosshairs
indicate where the placemark will fall. 
&lt;br /&gt;
&lt;img height="67" alt="Placemark icon" src="http://maps.google.com/help/maps/userguide/images/placemark_place.png" width="181" /&gt;
&lt;/li&gt;
&lt;li&gt;
Move the cursor to the appropriate location. If you want to dismiss this placemark,
press the Escape key. 
&lt;/li&gt;
&lt;li&gt;
Click your mouse button to place your placemark. It should bounce into place. 
&lt;/li&gt;
&lt;li&gt;
Add a title and description. 
&lt;/li&gt;
&lt;li&gt;
You can also change the icon for your placemark by clicking the icon in the top right
corner of the info window. You can also add your own icon. 
&lt;/li&gt;
&lt;li&gt;
Click &lt;strong&gt;OK&lt;/strong&gt; to save your placemark. 
&lt;/li&gt;
&lt;/ol&gt;
&lt;h5&gt;To move or edit a placemark:
&lt;/h5&gt;
&lt;ol&gt;
&lt;li&gt;
Click &lt;strong&gt;Edit&lt;/strong&gt; in the left panel. 
&lt;/li&gt;
&lt;li&gt;
Drag and drop the appropriate placemark to the new location. Note that you can only
edit or move placemarks on your maps, not others. 
&lt;/li&gt;
&lt;li&gt;
To edit a placemark's title or description, click on it to open the info window. Edit
the title and description and click &lt;strong&gt;OK&lt;/strong&gt;. 
&lt;/li&gt;
&lt;li&gt;
Click &lt;strong&gt;Done&lt;/strong&gt; in the left panel when you are finished. 
&lt;/li&gt;
&lt;/ol&gt;
&lt;img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=809a68a5-0cb0-4eef-aba0-010a26d79de3" /&gt;</description>
      <comments>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,809a68a5-0cb0-4eef-aba0-010a26d79de3.aspx</comments>
      <category>The Site Doctor</category>
      <category>Umbraco</category>
      <category>Web Development</category>
    </item>
    <item>
      <trackback:ping>http://blogs.thesitedoctor.co.uk/test/Trackback.aspx?guid=be2188ab-448d-432d-a39d-15d4c1361865</trackback:ping>
      <pingback:server>http://blogs.thesitedoctor.co.uk/test/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,be2188ab-448d-432d-a39d-15d4c1361865.aspx</pingback:target>
      <dc:creator>Tim</dc:creator>
      <wfw:comment>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,be2188ab-448d-432d-a39d-15d4c1361865.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.thesitedoctor.co.uk/test/SyndicationService.asmx/GetEntryCommentsRss?guid=be2188ab-448d-432d-a39d-15d4c1361865</wfw:commentRss>
      <slash:comments>4</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <img height="88" src="http://blogs.thesitedoctor.co.uk/tim/img/umbraco_logouk.gif" width="353" />
        </p>
        <p>
In <a href="http://blogs.thesitedoctor.co.uk/tim/2008/06/10/CodeGarden+08+Been+There+Done+That+Got+The+Tshirt.aspx">a
previous post about CodeGarden 08</a>, I asked people to get in touch if they'd be
interested in a UK Umbraco meet up. I've had a fair few people get in touch so I think
it's something worthwhile pursuing further. The nest stage from my 
<abbr title="Point Of View">
POV
</abbr>
is working out the location and potential content of the meet so I thought I'd open
it up to the floor.
</p>
        <p>
With the forthcoming 
<abbr title="DeveloperDeveloperDeveloper! Day">
DDD7
</abbr>
, I thought it might be a ready-built platform that we could use but I agree with <a href="http://weblogs.asp.net/plip/">Phil</a> that 
<abbr title="DeveloperDeveloperDeveloper! Day">
DDD7
</abbr>
may not be a suitable platform for a multitude of reasons.
</p>
        <p>
As I've had people from the South West and Scotland voice an interest, I don't think
it'll suit the majority of people to have it based in London so suggest it is based
in the Midlands -probably Birmingham as it's easy to get to (M6 from the North, M4
from London, M5 from the South -or train!) and there are plenty of places to have
the meet.
</p>
        <p>
In regards the format/content of the meet, does anyone have any suggestions? We could
follow Niels' and Per's open format or we can have a more structured theme? I've not
had too much of a think as to subject matter but some I have come up with so far:
</p>
        <ul>
          <li>
An introduction to Umbraco and what it is (many of the people I've spoken to have
only just started using Umbraco) 
</li>
          <li>
Examples of Umbraco how Umbraco can be used 
</li>
          <li>
More advanced Umbraco functionality (membership etc) 
</li>
          <li>
Getting to grips with XSLT 
</li>
          <li>
How to sell Umbraco to your clients 
</li>
        </ul>
        <p>
So that's where I've got to so far, does anyone have anything to add?
</p>
        <p>
BTW the logo is just a working logo atm, need to have Niels approve it ;)
</p>
        <p>
          <strong>Update:</strong>
          <a title="I have posted a post on the Umbraco forums about a UK Umbraco meet here" href="http://forum.umbraco.org/yaf_postst5340_UK-Umbraco-meet-up.aspx">I
have posted a post on the Umbraco forums about a UK Umbraco meet here</a>
        </p>
        <img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=be2188ab-448d-432d-a39d-15d4c1361865" />
      </body>
      <title>UK Umbraco meet up</title>
      <guid isPermaLink="false">http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,be2188ab-448d-432d-a39d-15d4c1361865.aspx</guid>
      <link>http://blogs.thesitedoctor.co.uk/test/2008/06/20/UKUmbracoMeetUp.aspx</link>
      <pubDate>Fri, 20 Jun 2008 23:17:58 GMT</pubDate>
      <description>&lt;p&gt;
&lt;img height="88" src="http://blogs.thesitedoctor.co.uk/tim/img/umbraco_logouk.gif" width="353" /&gt;
&lt;/p&gt;
&lt;p&gt;
In &lt;a href="http://blogs.thesitedoctor.co.uk/tim/2008/06/10/CodeGarden+08+Been+There+Done+That+Got+The+Tshirt.aspx"&gt;a
previous post about CodeGarden 08&lt;/a&gt;, I asked people to get in touch if they'd be
interested in a UK Umbraco meet up. I've had a fair few people get in touch so I think
it's something worthwhile pursuing further. The nest stage from my 
&lt;abbr title="Point Of View"&gt;
POV
&lt;/abbr&gt;
is working out the location and potential content of the meet so I thought I'd open
it up to the floor.
&lt;/p&gt;
&lt;p&gt;
With the forthcoming 
&lt;abbr title="DeveloperDeveloperDeveloper! Day"&gt;
DDD7
&lt;/abbr&gt;
, I thought it might be a ready-built platform that we could use but I agree with &lt;a href="http://weblogs.asp.net/plip/"&gt;Phil&lt;/a&gt; that 
&lt;abbr title="DeveloperDeveloperDeveloper! Day"&gt;
DDD7
&lt;/abbr&gt;
may not be a suitable platform for a multitude of reasons.
&lt;/p&gt;
&lt;p&gt;
As I've had people from the South West and Scotland voice an interest, I don't think
it'll suit the majority of people to have it based in London so suggest it is based
in the Midlands -probably Birmingham as it's easy to get to (M6 from the North, M4
from London, M5 from the South -or train!) and there are plenty of places to have
the meet.
&lt;/p&gt;
&lt;p&gt;
In regards the format/content of the meet, does anyone have any suggestions? We could
follow Niels' and Per's open format or we can have a more structured theme? I've not
had too much of a think as to subject matter but some I have come up with so far:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
An introduction to Umbraco and what it is (many of the people I've spoken to have
only just started using Umbraco) 
&lt;/li&gt;
&lt;li&gt;
Examples of Umbraco how Umbraco can be used 
&lt;/li&gt;
&lt;li&gt;
More advanced Umbraco functionality (membership etc) 
&lt;/li&gt;
&lt;li&gt;
Getting to grips with XSLT 
&lt;/li&gt;
&lt;li&gt;
How to sell Umbraco to your clients 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
So that's where I've got to so far, does anyone have anything to add?
&lt;/p&gt;
&lt;p&gt;
BTW the logo is just a working logo atm, need to have Niels approve it ;)
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Update:&lt;/strong&gt; &lt;a title="I have posted a post on the Umbraco forums about a UK Umbraco meet here" href="http://forum.umbraco.org/yaf_postst5340_UK-Umbraco-meet-up.aspx"&gt;I
have posted a post on the Umbraco forums about a UK Umbraco meet here&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=be2188ab-448d-432d-a39d-15d4c1361865" /&gt;</description>
      <comments>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,be2188ab-448d-432d-a39d-15d4c1361865.aspx</comments>
      <category>Development</category>
      <category>The Site Doctor</category>
      <category>Umbraco</category>
      <category>Web Development</category>
    </item>
    <item>
      <trackback:ping>http://blogs.thesitedoctor.co.uk/test/Trackback.aspx?guid=9cadaa65-0cd7-4d03-86fb-0b4e0dbd0000</trackback:ping>
      <pingback:server>http://blogs.thesitedoctor.co.uk/test/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,9cadaa65-0cd7-4d03-86fb-0b4e0dbd0000.aspx</pingback:target>
      <dc:creator>Tim</dc:creator>
      <wfw:comment>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,9cadaa65-0cd7-4d03-86fb-0b4e0dbd0000.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.thesitedoctor.co.uk/test/SyndicationService.asmx/GetEntryCommentsRss?guid=9cadaa65-0cd7-4d03-86fb-0b4e0dbd0000</wfw:commentRss>
      <slash:comments>5</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <img src="http://farm4.static.flickr.com/3145/2568393876_4cf35dd65e_m.jpg" align="right" /> So
things have been manic here the past week, for those of you who didn't know, I popped
over to Denmark at the last minute to attend Umbraco's CodeGarden 08. It was great
fun and I have to thank <a href="http://twitter.com/umbraco">Niels Hartvig</a> and <a href="http://twitter.com/perploughansen">Per
Ploug Hansen</a> for putting on a great couple of days.
</p>
        <p>
You can check out <a href="http://www.flickr.com/photos/timgaunt/sets/72157605417056022/">my
photos from the event on Flickr</a> (bear with me, I'm just getting started with Flickr).
</p>
        <p>
I'm sure a fair few people have blogged about the highlights (if you're interested
check <a href="http://www.umbraco.org">www.umbraco.org</a>) but the biggy was announcing
the release of Umbraco v<strike>3.1</strike>4.0 which is pretty exciting news as it
has a ton of feature enhancements and UI improvements. Also, you'll be pleased to
hear that they're making 2008 the year of Umbraco documentation!
</p>
        <p>
Another interesting points from the conference was the pending release of Umbraco.TV
which will feature tutorial videos and insights from the core team on how to use Umbraco
and the Umbraco store which allows you to easily distribute the packages you make
:) All in all some interesting developments.
</p>
        <p>
There were also a fair few English developers at the conference so discussion inevitably
turned to a UK meet (I know there are a fair few designers and developers here that
couldn't justify the expense) so that's something that I'm going to look into setting
up. If this is something you'd be interested in, leave a comment or drop me an email
and we'll see how much interest there is.
</p>
        <p>
To all the rest of you -it was great to meet you, you're all a lovely bunch and I
look forward to meeting you again at CodeGarden 09!
</p>
        <p>
The other thing I've finally clarified (this is for you Simon!) is the <a href="http://blogs.thesitedoctor.co.uk/tim/2008/06/09/When+Do+I+Need+To+Buy+An+Umbraco+License.aspx">Umbraco
licensing rules</a> so if you're unsure on those, check out my post on <a href="http://blogs.thesitedoctor.co.uk/tim/2008/06/09/When+Do+I+Need+To+Buy+An+Umbraco+License.aspx">when
you need to purchase an Umbraco license</a> (the answer is always -or never, it's
up to you!).
</p>
        <img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=9cadaa65-0cd7-4d03-86fb-0b4e0dbd0000" />
      </body>
      <title>CodeGarden 08 -been there, done that, got the t-shirt!</title>
      <guid isPermaLink="false">http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,9cadaa65-0cd7-4d03-86fb-0b4e0dbd0000.aspx</guid>
      <link>http://blogs.thesitedoctor.co.uk/test/2008/06/10/CodeGarden08BeenThereDoneThatGotTheTshirt.aspx</link>
      <pubDate>Tue, 10 Jun 2008 18:18:53 GMT</pubDate>
      <description>&lt;p&gt;
&lt;img src="http://farm4.static.flickr.com/3145/2568393876_4cf35dd65e_m.jpg" align="right" /&gt; So
things have been manic here the past week, for those of you who didn't know, I popped
over to Denmark at the last minute to attend Umbraco's CodeGarden 08. It was great
fun and I have to thank &lt;a href="http://twitter.com/umbraco"&gt;Niels Hartvig&lt;/a&gt; and &lt;a href="http://twitter.com/perploughansen"&gt;Per
Ploug Hansen&lt;/a&gt; for putting on a great couple of days.
&lt;/p&gt;
&lt;p&gt;
You can check out &lt;a href="http://www.flickr.com/photos/timgaunt/sets/72157605417056022/"&gt;my
photos from the event on Flickr&lt;/a&gt; (bear with me, I'm just getting started with Flickr).
&lt;/p&gt;
&lt;p&gt;
I'm sure a fair few people have blogged about the highlights (if you're interested
check &lt;a href="http://www.umbraco.org"&gt;www.umbraco.org&lt;/a&gt;) but the biggy was announcing
the release of Umbraco v&lt;strike&gt;3.1&lt;/strike&gt;4.0 which is pretty exciting news as it
has a ton of feature enhancements and UI improvements. Also, you'll be pleased to
hear that they're making 2008 the year of Umbraco documentation!
&lt;/p&gt;
&lt;p&gt;
Another interesting points from the conference was the pending release of Umbraco.TV
which will feature tutorial videos and insights from the core team on how to use Umbraco
and the Umbraco store which allows you to easily distribute the packages you make
:) All in all some interesting developments.
&lt;/p&gt;
&lt;p&gt;
There were also a fair few English developers at the conference so discussion inevitably
turned to a UK meet (I know there are a fair few designers and developers here that
couldn't justify the expense) so that's something that I'm going to look into setting
up. If this is something you'd be interested in, leave a comment or drop me an email
and we'll see how much interest there is.
&lt;/p&gt;
&lt;p&gt;
To all the rest of you -it was great to meet you, you're all a lovely bunch and I
look forward to meeting you again at CodeGarden 09!
&lt;/p&gt;
&lt;p&gt;
The other thing I've finally clarified (this is for you Simon!) is the &lt;a href="http://blogs.thesitedoctor.co.uk/tim/2008/06/09/When+Do+I+Need+To+Buy+An+Umbraco+License.aspx"&gt;Umbraco
licensing rules&lt;/a&gt; so if you're unsure on those, check out my post on &lt;a href="http://blogs.thesitedoctor.co.uk/tim/2008/06/09/When+Do+I+Need+To+Buy+An+Umbraco+License.aspx"&gt;when
you need to purchase an Umbraco license&lt;/a&gt; (the answer is always -or never, it's
up to you!).
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=9cadaa65-0cd7-4d03-86fb-0b4e0dbd0000" /&gt;</description>
      <comments>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,9cadaa65-0cd7-4d03-86fb-0b4e0dbd0000.aspx</comments>
      <category>Development</category>
      <category>Networking</category>
      <category>The Site Doctor</category>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://blogs.thesitedoctor.co.uk/test/Trackback.aspx?guid=ebf4663a-c070-4571-afd7-7debb6381221</trackback:ping>
      <pingback:server>http://blogs.thesitedoctor.co.uk/test/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,ebf4663a-c070-4571-afd7-7debb6381221.aspx</pingback:target>
      <dc:creator>Tim</dc:creator>
      <wfw:comment>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,ebf4663a-c070-4571-afd7-7debb6381221.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.thesitedoctor.co.uk/test/SyndicationService.asmx/GetEntryCommentsRss?guid=ebf4663a-c070-4571-afd7-7debb6381221</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
This may seem a slightly obvious/silly post but the answer is simple -it's just <a href="http://umbraco.org/products/umbraco-pro/feature-matrix">not
*that* well documented/explained</a>.
</p>
        <p>
In a nutshell there are three scenarios you need to worry about:
</p>
        <ul>
          <li>
Using Umbraco in a <em>non-commercial </em>environment <em>with</em> the branding
(logos etc) intact -<strong>no fee</strong></li>
          <li>
Using Umbraco in a <em>commercial </em>environment <em>with</em> the branding (logos
etc) intact -<strong>no fee</strong></li>
          <li>
Using Umbraco in a <em>commercial </em>environment <em>without</em> the branding (logos
etc) -<strong>fee</strong></li>
        </ul>
        <p>
So there you have it. But to be fair, you should always pay for it if you're using
it in a commercial environment just because it's a great product (and it's good for
your karma!)
</p>
        <img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=ebf4663a-c070-4571-afd7-7debb6381221" />
      </body>
      <title>When do I need to buy an Umbraco license?</title>
      <guid isPermaLink="false">http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,ebf4663a-c070-4571-afd7-7debb6381221.aspx</guid>
      <link>http://blogs.thesitedoctor.co.uk/test/2008/06/09/WhenDoINeedToBuyAnUmbracoLicense.aspx</link>
      <pubDate>Mon, 09 Jun 2008 17:16:00 GMT</pubDate>
      <description>&lt;p&gt;
This may seem a slightly obvious/silly post but the answer is simple -it's just &lt;a href="http://umbraco.org/products/umbraco-pro/feature-matrix"&gt;not
*that* well documented/explained&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
In a nutshell there are three scenarios you need to worry about:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Using Umbraco in a &lt;em&gt;non-commercial &lt;/em&gt;environment &lt;em&gt;with&lt;/em&gt; the branding
(logos etc) intact -&lt;strong&gt;no fee&lt;/strong&gt; 
&lt;/li&gt;
&lt;li&gt;
Using Umbraco in a &lt;em&gt;commercial &lt;/em&gt;environment &lt;em&gt;with&lt;/em&gt; the branding (logos
etc) intact -&lt;strong&gt;no fee&lt;/strong&gt; 
&lt;/li&gt;
&lt;li&gt;
Using Umbraco in a &lt;em&gt;commercial &lt;/em&gt;environment &lt;em&gt;without&lt;/em&gt; the branding (logos
etc) -&lt;strong&gt;fee&lt;/strong&gt; 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
So there you have it. But to be fair, you should always pay for it if you're using
it in a commercial environment just because it's a great product (and it's good for
your karma!)
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=ebf4663a-c070-4571-afd7-7debb6381221" /&gt;</description>
      <comments>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,ebf4663a-c070-4571-afd7-7debb6381221.aspx</comments>
      <category>Development</category>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://blogs.thesitedoctor.co.uk/test/Trackback.aspx?guid=9804ba6a-1cd0-41c3-b55a-0a74eb1e196b</trackback:ping>
      <pingback:server>http://blogs.thesitedoctor.co.uk/test/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,9804ba6a-1cd0-41c3-b55a-0a74eb1e196b.aspx</pingback:target>
      <dc:creator>Tim</dc:creator>
      <wfw:comment>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,9804ba6a-1cd0-41c3-b55a-0a74eb1e196b.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.thesitedoctor.co.uk/test/SyndicationService.asmx/GetEntryCommentsRss?guid=9804ba6a-1cd0-41c3-b55a-0a74eb1e196b</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I've seen a <a href="http://forum.umbraco.org/yaf_postst4730_Customised-TinyMCE-Editor-to-Allow-Heading-Tags-to-be-applied.aspx">couple</a> of <a href="http://forum.umbraco.org/yaf_postst4811_Richtext-Editor-and-Semantic-Markup.aspx">posts</a> recently
about how to apply headings to text within Umbraco and the main suggestion is that
you apply them by hacking about with the StyleSheets that just doesn't sit right with
me.
</p>
        <p>
We use a different method -that is to enable the format drop down list. To me it just
seems cleaner but I get the feeling I'm about to start a big debate. The method we
use was <a href="http://forum.umbraco.org/yaf_postst1971_TinyMce-Format-dropdown-and-html-templatessnippets-workaround.aspx">originally
discussed here</a> but in short <a href="http://blogs.thesitedoctor.co.uk/tim/files/6291-leftinymce.zip">download
this zip file</a> with the updated DLLs in and instructions.
</p>
        <p>
          <a title="http://blogs.thesitedoctor.co.uk/tim/files/6291-leftinymce.zip" href="http://blogs.thesitedoctor.co.uk/tim/files/6291-leftinymce.zip">6291-leftinymce.zip
(241KB)</a>
        </p>
        <img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=9804ba6a-1cd0-41c3-b55a-0a74eb1e196b" />
      </body>
      <title>How to apply Heading Tags in Umbraco</title>
      <guid isPermaLink="false">http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,9804ba6a-1cd0-41c3-b55a-0a74eb1e196b.aspx</guid>
      <link>http://blogs.thesitedoctor.co.uk/test/2008/05/01/HowToApplyHeadingTagsInUmbraco.aspx</link>
      <pubDate>Thu, 01 May 2008 14:21:56 GMT</pubDate>
      <description>&lt;p&gt;
I've seen a &lt;a href="http://forum.umbraco.org/yaf_postst4730_Customised-TinyMCE-Editor-to-Allow-Heading-Tags-to-be-applied.aspx"&gt;couple&lt;/a&gt; of &lt;a href="http://forum.umbraco.org/yaf_postst4811_Richtext-Editor-and-Semantic-Markup.aspx"&gt;posts&lt;/a&gt; recently
about how to apply headings to text within Umbraco and the main suggestion is that
you apply them by hacking about with the StyleSheets that just doesn't sit right with
me.
&lt;/p&gt;
&lt;p&gt;
We use a different method -that is to enable the format drop down list. To me it just
seems cleaner but I get the feeling I'm about to start a big debate. The method we
use was &lt;a href="http://forum.umbraco.org/yaf_postst1971_TinyMce-Format-dropdown-and-html-templatessnippets-workaround.aspx"&gt;originally
discussed here&lt;/a&gt; but in short &lt;a href="http://blogs.thesitedoctor.co.uk/tim/files/6291-leftinymce.zip"&gt;download
this zip file&lt;/a&gt; with the updated DLLs in and instructions.
&lt;/p&gt;
&lt;p&gt;
&lt;a title="http://blogs.thesitedoctor.co.uk/tim/files/6291-leftinymce.zip" href="http://blogs.thesitedoctor.co.uk/tim/files/6291-leftinymce.zip"&gt;6291-leftinymce.zip
(241KB)&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=9804ba6a-1cd0-41c3-b55a-0a74eb1e196b" /&gt;</description>
      <comments>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,9804ba6a-1cd0-41c3-b55a-0a74eb1e196b.aspx</comments>
      <category>ASP.Net</category>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://blogs.thesitedoctor.co.uk/test/Trackback.aspx?guid=1f190396-eaf7-49a2-a3f0-3873df4a0ccd</trackback:ping>
      <pingback:server>http://blogs.thesitedoctor.co.uk/test/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,1f190396-eaf7-49a2-a3f0-3873df4a0ccd.aspx</pingback:target>
      <dc:creator>Tim</dc:creator>
      <wfw:comment>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,1f190396-eaf7-49a2-a3f0-3873df4a0ccd.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.thesitedoctor.co.uk/test/SyndicationService.asmx/GetEntryCommentsRss?guid=1f190396-eaf7-49a2-a3f0-3873df4a0ccd</wfw:commentRss>
      <slash:comments>8</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Following on from a recent post of mine about how to setup <a title="How to allow the user to change the header image in Umbrao" href="http://blogs.thesitedoctor.co.uk/tim/2007/11/27/Changeable+Headers+Using+The+Media+Picker.aspx">changeable
headers using the media picker in Umbraco</a> a new site I have been working on required
something a little extra -they wanted the headers to simply be chosen at random. from
a given media folder.
</p>
        <p>
First, create  a new (blank) XSLT file and add the following:
</p>
        <div class="code">
          <h2>Random header images XSLT
</h2>
          <img src="/img/sc/clear.gif" align="top" />
          <span style="color: #0000ff">&lt;</span>
          <span style="color: #8b0000">?xml</span>
          <span style="color: #ff0000"> version</span>
          <span style="color: #8b0000">=</span>
          <span style="color: #0000ff">"1.0"</span>
          <span style="color: #ff0000"> encoding</span>
          <span style="color: #8b0000">=</span>
          <span style="color: #0000ff">"UTF-8"</span>
          <span style="color: #8b0000">?</span>
          <span style="color: #0000ff">&gt;</span>
          <br />
          <img src="/img/sc/clear.gif" align="top" />
          <span style="color: #0000ff">&lt;!</span>
          <span style="color: #ff00ff">DOCTYPE</span> <span style="color: #ff00ff">xsl:Stylesheet
[ &lt;!ENTITY nbsp " "</span><span style="color: #0000ff">&gt;</span> ]&gt; 
<br /><div id="closed633380864518999494_3" style="display: none"><img onclick="showHideCodeDiv('633380864518999494_3', false)" src="/img/sc/PlusNoLines.gif" align="top" /><b><span style="color: #00008b">&lt;...&gt;</span></b></div><div id="open633380864518999494_3" style="display: block"><img onclick="showHideCodeDiv('633380864518999494_3', true)" src="/img/sc/minusNoTopLine.gif" align="top" /><span style="color: #0000ff">&lt;</span><span style="color: #8b0000">xsl:stylesheet</span>  
<br /><img src="/img/sc/I.gif" align="top" /><span style="color: #ff0000">   
version</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"1.0"</span>  
<br /><img src="/img/sc/I.gif" align="top" /><span style="color: #ff0000">   
xmlns:xsl</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"http://www.w3.org/1999/XSL/Transform"</span>  
<br /><img src="/img/sc/I.gif" align="top" /><span style="color: #ff0000">   
xmlns:msxml</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"urn:schemas-microsoft-com:xslt"</span><br /><img src="/img/sc/I.gif" align="top" /><span style="color: #ff0000">   
xmlns:umbraco</span><span style="color: #8b0000">.library=</span><span style="color: #0000ff">"urn:umbraco.library"</span><br /><img src="/img/sc/I.gif" align="top" /><span style="color: #ff0000">   
xmlns:msxsl</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"urn:schemas-microsoft-com:xslt"</span><br /><img src="/img/sc/I.gif" align="top" /><span style="color: #ff0000">   
xmlns:math</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"urn:schemas-hizi-nl:math"</span><br /><img src="/img/sc/I.gif" align="top" /><span style="color: #ff0000">   
xmlns:Exslt</span><span style="color: #8b0000">.ExsltStrings=</span><span style="color: #0000ff">"urn:Exslt.ExsltStrings"</span><br /><img src="/img/sc/I.gif" align="top" /><span style="color: #ff0000">   
xmlns:Exslt</span><span style="color: #8b0000">.ExsltMath=</span><span style="color: #0000ff">"urn:Exslt.ExsltMath"</span><br /><img src="/img/sc/L.gif" align="top" /><span style="color: #ff0000">   
exclude</span><span style="color: #8b0000">-result-prefixes=</span><span style="color: #0000ff">"msxml
Exslt.ExsltMath Exslt.ExsltStrings math umbraco.library"&gt;</span></div><img src="/img/sc/clear.gif" align="top" /><br /><img src="/img/sc/clear.gif" align="top" /><span style="color: #0000ff">&lt;</span><span style="color: #8b0000">xsl:output</span><span style="color: #ff0000"> method</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"xml"</span><span style="color: #ff0000"> omit</span><span style="color: #8b0000">-xml-declaration=</span><span style="color: #0000ff">"yes"</span><span style="color: #8b0000">/</span><span style="color: #0000ff">&gt;</span><br /><img src="/img/sc/clear.gif" align="top" /><br /><img src="/img/sc/clear.gif" align="top" /><span style="color: #0000ff">&lt;</span><span style="color: #8b0000">xsl:param</span><span style="color: #ff0000"> name</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"currentPage"</span><span style="color: #8b0000">/</span><span style="color: #0000ff">&gt;</span><br /><img src="/img/sc/clear.gif" align="top" /><br /><img src="/img/sc/clear.gif" align="top" /><span style="color: #0000ff">&lt;</span><span style="color: #8b0000">msxml:script</span><span style="color: #ff0000"> language</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"JavaScript"</span><span style="color: #ff0000"> implements</span><span style="color: #8b0000">-prefix=</span><span style="color: #0000ff">"math"</span><span style="color: #0000ff">&gt;</span><br /><img src="/img/sc/clear.gif" align="top" />function random(numDie,numMax,numMin){ 
<br /><img src="/img/sc/clear.gif" align="top" />if (numMin==null){numMin=1;} 
<br /><img src="/img/sc/clear.gif" align="top" />var sum=0; 
<br /><img src="/img/sc/clear.gif" align="top" />for (var index=0;index<b><span style="color: #ff0000">&amp;lt;</span></b>numDie;index++){  
<br /><img src="/img/sc/clear.gif" align="top" />sum+=Math.floor(Math.random()*(numMax-numMin)
+ numMin); 
<br /><img src="/img/sc/clear.gif" align="top" />} 
<br /><img src="/img/sc/clear.gif" align="top" />return "" + sum; 
<br /><img src="/img/sc/clear.gif" align="top" />} 
<br /><img src="/img/sc/clear.gif" align="top" />function floorme(numFloor){ 
<br /><img src="/img/sc/clear.gif" align="top" />return "" + Math.floor(numFloor); 
<br /><img src="/img/sc/clear.gif" align="top" />} 
<br /><img src="/img/sc/clear.gif" align="top" /><span style="color: #0000ff">&lt;</span><span style="color: #8b0000">/msxml:script</span><span style="color: #0000ff">&gt;</span><br /><img src="/img/sc/clear.gif" align="top" /><br /><img src="/img/sc/clear.gif" align="top" /><span style="color: #0000ff">&lt;</span><span style="color: #8b0000">xsl:variable</span><span style="color: #ff0000"> name</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"StartNode"</span><span style="color: #ff0000"> select</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"/macro/StartNode/node/@id"</span> <span style="color: #8b0000">/</span><span style="color: #0000ff">&gt;</span><br /><img src="/img/sc/clear.gif" align="top" /><span style="color: #0000ff">&lt;</span><span style="color: #8b0000">xsl:variable</span><span style="color: #ff0000"> name</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"parent"</span><span style="color: #ff0000"> select</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"umbraco.library:GetMedia($StartNode,
'false')</span><span style="color: #0000ff">"</span> <span style="color: #8b0000">/</span><span style="color: #0000ff">&gt;</span>  
<br /><img src="/img/sc/clear.gif" align="top" /><span style="color: #0000ff">&lt;</span><span style="color: #8b0000">xsl:variable</span><span style="color: #ff0000"> name</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"random"</span><span style="color: #ff0000"> select</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"math:random(1,
count($parent/node)+1,</span> <span style="color: #0000ff">1)"</span><span style="color: #8b0000">/</span><span style="color: #0000ff">&gt;</span><br /><img src="/img/sc/clear.gif" align="top" /><br /><img src="/img/sc/clear.gif" align="top" /><span style="color: #0000ff">&lt;</span><span style="color: #8b0000">xsl:template</span><span style="color: #ff0000"> match</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"/"&gt;</span><br /><img src="/img/sc/clear.gif" align="top" /><br /><img src="/img/sc/clear.gif" align="top" />    <span style="color: #0000ff">&lt;</span><span style="color: #8b0000">xsl:for-each</span><span style="color: #ff0000"> select</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"$parent/node"&gt;</span><br /><img src="/img/sc/clear.gif" align="top" />        <span style="color: #0000ff">&lt;</span><span style="color: #8b0000">xsl:if</span><span style="color: #ff0000"> test</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"position()=$random"&gt;</span><br /><img src="/img/sc/clear.gif" align="top" />            <span style="color: #0000ff">&lt;</span><span style="color: #8b0000">xsl:if</span><span style="color: #ff0000"> test</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"./data
[@alias = 'umbracoExtension'] = 'gif' or ./data [@alias = 'umbracoExtension'] = 'jpg'
or ./data [@alias = 'umbracoExtension'] = 'jpeg' or ./data [@alias = 'umbracoExtension']
= 'png'"&gt;</span><br /><img src="/img/sc/clear.gif" align="top" />                <span style="color: #0000ff">&lt;</span><span style="color: #8b0000">style</span><span style="color: #ff0000"> type</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"text/css"&gt;</span><br /><img src="/img/sc/clear.gif" align="top" />               
#header{ 
<br /><img src="/img/sc/clear.gif" align="top" />                   
background-image: url(<span style="color: #0000ff">&lt;</span><span style="color: #8b0000">xsl:value-of</span><span style="color: #ff0000"> select</span><span style="color: #8b0000">=</span><span style="color: #0000ff">"./data</span> <span style="color: #0000ff">[@alias
= 'umbracoFile']"</span><span style="color: #8b0000">/</span><span style="color: #0000ff">&gt;</span>); 
<br /><img src="/img/sc/clear.gif" align="top" />               
} 
<br /><img src="/img/sc/clear.gif" align="top" />                <span style="color: #0000ff">&lt;</span><span style="color: #8b0000">/style</span><span style="color: #0000ff">&gt;</span><br /><img src="/img/sc/clear.gif" align="top" />            <span style="color: #0000ff">&lt;</span><span style="color: #8b0000">/xsl:if</span><span style="color: #0000ff">&gt;</span><br /><img src="/img/sc/clear.gif" align="top" />        <span style="color: #0000ff">&lt;</span><span style="color: #8b0000">/xsl:if</span><span style="color: #0000ff">&gt;</span><br /><img src="/img/sc/clear.gif" align="top" />    <span style="color: #0000ff">&lt;</span><span style="color: #8b0000">/xsl:for-each</span><span style="color: #0000ff">&gt;</span><br /><img src="/img/sc/clear.gif" align="top" /><span style="color: #0000ff">&lt;</span><span style="color: #8b0000">/xsl:template</span><span style="color: #0000ff">&gt;</span><br /><img src="/img/sc/clear.gif" align="top" /><br /><img src="/img/sc/clear.gif" align="top" /><span style="color: #0000ff">&lt;</span><span style="color: #8b0000">/xsl:stylesheet</span><span style="color: #0000ff">&gt;</span><br /></div>
        <p>
What this does is it uses the StartNode (a media folder) passed in from the macro
to loop through any valid files (in this case jpg/gif/png and pull out the image if
it's valid. I was thinking about replacing the for-each loop and simply using the
index but I'm not sure if there would be any performance improvement except for if
there were a lot of header images in the folder.
</p>
        <p>
You'll then need to create a new macro and add a parameter with the name "StartNode"
and select "mediaCurrent" as the Type. That's it :)
</p>
I'd like to build on this and have a "valid" headers selector which would
use a Multiple Media picker and would allow for banner ads to be selected at random
but that can wait for a client that needs it ;)<img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=1f190396-eaf7-49a2-a3f0-3873df4a0ccd" /></body>
      <title>Random images in Umbraco</title>
      <guid isPermaLink="false">http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,1f190396-eaf7-49a2-a3f0-3873df4a0ccd.aspx</guid>
      <link>http://blogs.thesitedoctor.co.uk/test/2008/02/11/RandomImagesInUmbraco.aspx</link>
      <pubDate>Mon, 11 Feb 2008 15:40:52 GMT</pubDate>
      <description>&lt;p&gt;
Following on from a recent post of mine about how to setup &lt;a title="How to allow the user to change the header image in Umbrao" href="http://blogs.thesitedoctor.co.uk/tim/2007/11/27/Changeable+Headers+Using+The+Media+Picker.aspx"&gt;changeable
headers using the media picker in Umbraco&lt;/a&gt; a new site I have been working on required
something a little extra -they wanted the headers to simply be chosen at random. from
a given media folder.
&lt;/p&gt;
&lt;p&gt;
First, create&amp;#160; a new (blank) XSLT file and add the following:
&lt;/p&gt;
&lt;div class="code"&gt;
&lt;h2&gt;Random header images XSLT
&lt;/h2&gt;
&lt;img src="/img/sc/clear.gif" align="top" /&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;?xml&lt;/span&gt;&lt;span style="color: #ff0000"&gt; version&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;1.0&amp;quot;&lt;/span&gt;&lt;span style="color: #ff0000"&gt; encoding&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;UTF-8&amp;quot;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;?&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; 
&lt;br /&gt;
&lt;img src="/img/sc/clear.gif" align="top" /&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;!&lt;/span&gt;&lt;span style="color: #ff00ff"&gt;DOCTYPE&lt;/span&gt;&amp;#160;&lt;span style="color: #ff00ff"&gt;xsl:Stylesheet
[ &amp;lt;!ENTITY nbsp &amp;quot; &amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; ]&amp;gt; 
&lt;br /&gt;
&lt;div id="closed633380864518999494_3" style="display: none"&gt;&lt;img onclick="showHideCodeDiv(&amp;#39;633380864518999494_3&amp;#39;, false)" src="/img/sc/PlusNoLines.gif" align="top" /&gt;&lt;b&gt;&lt;span style="color: #00008b"&gt;&amp;lt;...&amp;gt;&lt;/span&gt;&lt;/b&gt;
&lt;/div&gt;
&lt;div id="open633380864518999494_3" style="display: block"&gt;&lt;img onclick="showHideCodeDiv(&amp;#39;633380864518999494_3&amp;#39;, true)" src="/img/sc/minusNoTopLine.gif" align="top" /&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;xsl:stylesheet&lt;/span&gt;&amp;#160; 
&lt;br /&gt;
&lt;img src="/img/sc/I.gif" align="top" /&gt;&lt;span style="color: #ff0000"&gt;&amp;#160;&amp;#160;&amp;#160;
version&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;1.0&amp;quot;&lt;/span&gt;&amp;#160; 
&lt;br /&gt;
&lt;img src="/img/sc/I.gif" align="top" /&gt;&lt;span style="color: #ff0000"&gt;&amp;#160;&amp;#160;&amp;#160;
xmlns:xsl&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;http://www.w3.org/1999/XSL/Transform&amp;quot;&lt;/span&gt;&amp;#160; 
&lt;br /&gt;
&lt;img src="/img/sc/I.gif" align="top" /&gt;&lt;span style="color: #ff0000"&gt;&amp;#160;&amp;#160;&amp;#160;
xmlns:msxml&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;urn:schemas-microsoft-com:xslt&amp;quot;&lt;/span&gt; 
&lt;br /&gt;
&lt;img src="/img/sc/I.gif" align="top" /&gt;&lt;span style="color: #ff0000"&gt;&amp;#160;&amp;#160;&amp;#160;
xmlns:umbraco&lt;/span&gt;&lt;span style="color: #8b0000"&gt;.library=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;urn:umbraco.library&amp;quot;&lt;/span&gt; 
&lt;br /&gt;
&lt;img src="/img/sc/I.gif" align="top" /&gt;&lt;span style="color: #ff0000"&gt;&amp;#160;&amp;#160;&amp;#160;
xmlns:msxsl&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;urn:schemas-microsoft-com:xslt&amp;quot;&lt;/span&gt; 
&lt;br /&gt;
&lt;img src="/img/sc/I.gif" align="top" /&gt;&lt;span style="color: #ff0000"&gt;&amp;#160;&amp;#160;&amp;#160;
xmlns:math&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;urn:schemas-hizi-nl:math&amp;quot;&lt;/span&gt; 
&lt;br /&gt;
&lt;img src="/img/sc/I.gif" align="top" /&gt;&lt;span style="color: #ff0000"&gt;&amp;#160;&amp;#160;&amp;#160;
xmlns:Exslt&lt;/span&gt;&lt;span style="color: #8b0000"&gt;.ExsltStrings=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;urn:Exslt.ExsltStrings&amp;quot;&lt;/span&gt; 
&lt;br /&gt;
&lt;img src="/img/sc/I.gif" align="top" /&gt;&lt;span style="color: #ff0000"&gt;&amp;#160;&amp;#160;&amp;#160;
xmlns:Exslt&lt;/span&gt;&lt;span style="color: #8b0000"&gt;.ExsltMath=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;urn:Exslt.ExsltMath&amp;quot;&lt;/span&gt; 
&lt;br /&gt;
&lt;img src="/img/sc/L.gif" align="top" /&gt;&lt;span style="color: #ff0000"&gt;&amp;#160;&amp;#160;&amp;#160;
exclude&lt;/span&gt;&lt;span style="color: #8b0000"&gt;-result-prefixes=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;msxml
Exslt.ExsltMath Exslt.ExsltStrings math umbraco.library&amp;quot;&amp;gt;&lt;/span&gt;
&lt;/div&gt;
&lt;img src="/img/sc/clear.gif" align="top" /&gt; 
&lt;br /&gt;
&lt;img src="/img/sc/clear.gif" align="top" /&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;xsl:output&lt;/span&gt;&lt;span style="color: #ff0000"&gt; method&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;xml&amp;quot;&lt;/span&gt;&lt;span style="color: #ff0000"&gt; omit&lt;/span&gt;&lt;span style="color: #8b0000"&gt;-xml-declaration=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;yes&amp;quot;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;/&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; 
&lt;br /&gt;
&lt;img src="/img/sc/clear.gif" align="top" /&gt; 
&lt;br /&gt;
&lt;img src="/img/sc/clear.gif" align="top" /&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;xsl:param&lt;/span&gt;&lt;span style="color: #ff0000"&gt; name&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;currentPage&amp;quot;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;/&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; 
&lt;br /&gt;
&lt;img src="/img/sc/clear.gif" align="top" /&gt; 
&lt;br /&gt;
&lt;img src="/img/sc/clear.gif" align="top" /&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;msxml:script&lt;/span&gt;&lt;span style="color: #ff0000"&gt; language&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;JavaScript&amp;quot;&lt;/span&gt;&lt;span style="color: #ff0000"&gt; implements&lt;/span&gt;&lt;span style="color: #8b0000"&gt;-prefix=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;math&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; 
&lt;br /&gt;
&lt;img src="/img/sc/clear.gif" align="top" /&gt;function random(numDie,numMax,numMin){ 
&lt;br /&gt;
&lt;img src="/img/sc/clear.gif" align="top" /&gt;if (numMin==null){numMin=1;} 
&lt;br /&gt;
&lt;img src="/img/sc/clear.gif" align="top" /&gt;var sum=0; 
&lt;br /&gt;
&lt;img src="/img/sc/clear.gif" align="top" /&gt;for (var index=0;index&lt;b&gt;&lt;span style="color: #ff0000"&gt;&amp;amp;lt;&lt;/span&gt;&lt;/b&gt;numDie;index++){&amp;#160; 
&lt;br /&gt;
&lt;img src="/img/sc/clear.gif" align="top" /&gt;sum+=Math.floor(Math.random()*(numMax-numMin)
+ numMin); 
&lt;br /&gt;
&lt;img src="/img/sc/clear.gif" align="top" /&gt;} 
&lt;br /&gt;
&lt;img src="/img/sc/clear.gif" align="top" /&gt;return &amp;quot;&amp;quot; + sum; 
&lt;br /&gt;
&lt;img src="/img/sc/clear.gif" align="top" /&gt;} 
&lt;br /&gt;
&lt;img src="/img/sc/clear.gif" align="top" /&gt;function floorme(numFloor){ 
&lt;br /&gt;
&lt;img src="/img/sc/clear.gif" align="top" /&gt;return &amp;quot;&amp;quot; + Math.floor(numFloor); 
&lt;br /&gt;
&lt;img src="/img/sc/clear.gif" align="top" /&gt;} 
&lt;br /&gt;
&lt;img src="/img/sc/clear.gif" align="top" /&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;/msxml:script&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; 
&lt;br /&gt;
&lt;img src="/img/sc/clear.gif" align="top" /&gt; 
&lt;br /&gt;
&lt;img src="/img/sc/clear.gif" align="top" /&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;xsl:variable&lt;/span&gt;&lt;span style="color: #ff0000"&gt; name&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;StartNode&amp;quot;&lt;/span&gt;&lt;span style="color: #ff0000"&gt; select&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;/macro/StartNode/node/@id&amp;quot;&lt;/span&gt;&amp;#160;&lt;span style="color: #8b0000"&gt;/&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; 
&lt;br /&gt;
&lt;img src="/img/sc/clear.gif" align="top" /&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;xsl:variable&lt;/span&gt;&lt;span style="color: #ff0000"&gt; name&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;parent&amp;quot;&lt;/span&gt;&lt;span style="color: #ff0000"&gt; select&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;umbraco.library:GetMedia($StartNode,
'false')&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;&lt;/span&gt;&amp;#160;&lt;span style="color: #8b0000"&gt;/&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&amp;#160; 
&lt;br /&gt;
&lt;img src="/img/sc/clear.gif" align="top" /&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;xsl:variable&lt;/span&gt;&lt;span style="color: #ff0000"&gt; name&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;random&amp;quot;&lt;/span&gt;&lt;span style="color: #ff0000"&gt; select&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;math:random(1,
count($parent/node)+1,&lt;/span&gt;&amp;#160;&lt;span style="color: #0000ff"&gt;1)&amp;quot;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;/&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; 
&lt;br /&gt;
&lt;img src="/img/sc/clear.gif" align="top" /&gt; 
&lt;br /&gt;
&lt;img src="/img/sc/clear.gif" align="top" /&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;xsl:template&lt;/span&gt;&lt;span style="color: #ff0000"&gt; match&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;/&amp;quot;&amp;gt;&lt;/span&gt; 
&lt;br /&gt;
&lt;img src="/img/sc/clear.gif" align="top" /&gt; 
&lt;br /&gt;
&lt;img src="/img/sc/clear.gif" align="top" /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;xsl:for-each&lt;/span&gt;&lt;span style="color: #ff0000"&gt; select&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;$parent/node&amp;quot;&amp;gt;&lt;/span&gt; 
&lt;br /&gt;
&lt;img src="/img/sc/clear.gif" align="top" /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;xsl:if&lt;/span&gt;&lt;span style="color: #ff0000"&gt; test&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;position()=$random&amp;quot;&amp;gt;&lt;/span&gt; 
&lt;br /&gt;
&lt;img src="/img/sc/clear.gif" align="top" /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;xsl:if&lt;/span&gt;&lt;span style="color: #ff0000"&gt; test&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;./data
[@alias = 'umbracoExtension'] = 'gif' or ./data [@alias = 'umbracoExtension'] = 'jpg'
or ./data [@alias = 'umbracoExtension'] = 'jpeg' or ./data [@alias = 'umbracoExtension']
= 'png'&amp;quot;&amp;gt;&lt;/span&gt; 
&lt;br /&gt;
&lt;img src="/img/sc/clear.gif" align="top" /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;style&lt;/span&gt;&lt;span style="color: #ff0000"&gt; type&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;text/css&amp;quot;&amp;gt;&lt;/span&gt; 
&lt;br /&gt;
&lt;img src="/img/sc/clear.gif" align="top" /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;
#header{ 
&lt;br /&gt;
&lt;img src="/img/sc/clear.gif" align="top" /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;
background-image: url(&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;xsl:value-of&lt;/span&gt;&lt;span style="color: #ff0000"&gt; select&lt;/span&gt;&lt;span style="color: #8b0000"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;./data&lt;/span&gt;&amp;#160;&lt;span style="color: #0000ff"&gt;[@alias
= 'umbracoFile']&amp;quot;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;/&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;); 
&lt;br /&gt;
&lt;img src="/img/sc/clear.gif" align="top" /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;
} 
&lt;br /&gt;
&lt;img src="/img/sc/clear.gif" align="top" /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;/style&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; 
&lt;br /&gt;
&lt;img src="/img/sc/clear.gif" align="top" /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;/xsl:if&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; 
&lt;br /&gt;
&lt;img src="/img/sc/clear.gif" align="top" /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;/xsl:if&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; 
&lt;br /&gt;
&lt;img src="/img/sc/clear.gif" align="top" /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;/xsl:for-each&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; 
&lt;br /&gt;
&lt;img src="/img/sc/clear.gif" align="top" /&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;/xsl:template&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; 
&lt;br /&gt;
&lt;img src="/img/sc/clear.gif" align="top" /&gt; 
&lt;br /&gt;
&lt;img src="/img/sc/clear.gif" align="top" /&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #8b0000"&gt;/xsl:stylesheet&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; 
&lt;br /&gt;
&lt;/div&gt;
&lt;p&gt;
What this does is it uses the StartNode (a media folder) passed in from the macro
to loop through any valid files (in this case jpg/gif/png and pull out the image if
it's valid. I was thinking about replacing the for-each loop and simply using the
index but I'm not sure if there would be any performance improvement except for if
there were a lot of header images in the folder.
&lt;/p&gt;
&lt;p&gt;
You'll then need to create a new macro and add a parameter with the name &amp;quot;StartNode&amp;quot;
and select &amp;quot;mediaCurrent&amp;quot; as the Type. That's it :)
&lt;/p&gt;
I'd like to build on this and have a &amp;quot;valid&amp;quot; headers selector which would
use a Multiple Media picker and would allow for banner ads to be selected at random
but that can wait for a client that needs it ;)&lt;img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=1f190396-eaf7-49a2-a3f0-3873df4a0ccd" /&gt;</description>
      <comments>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,1f190396-eaf7-49a2-a3f0-3873df4a0ccd.aspx</comments>
      <category>Umbraco</category>
      <category>Web Development</category>
    </item>
    <item>
      <trackback:ping>http://blogs.thesitedoctor.co.uk/test/Trackback.aspx?guid=d812c9eb-91bf-4384-9840-3e840ee01fd2</trackback:ping>
      <pingback:server>http://blogs.thesitedoctor.co.uk/test/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,d812c9eb-91bf-4384-9840-3e840ee01fd2.aspx</pingback:target>
      <dc:creator>Tim</dc:creator>
      <wfw:comment>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,d812c9eb-91bf-4384-9840-3e840ee01fd2.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.thesitedoctor.co.uk/test/SyndicationService.asmx/GetEntryCommentsRss?guid=d812c9eb-91bf-4384-9840-3e840ee01fd2</wfw:commentRss>
      <slash:comments>8</slash:comments>
      <title>Changeable headers using the media picker</title>
      <guid isPermaLink="false">http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,d812c9eb-91bf-4384-9840-3e840ee01fd2.aspx</guid>
      <link>http://blogs.thesitedoctor.co.uk/test/2007/11/27/ChangeableHeadersUsingTheMediaPicker.aspx</link>
      <pubDate>Tue, 27 Nov 2007 18:26:51 GMT</pubDate>
      <description>&lt;p&gt;
A project we&amp;rsquo;re currently working on needs to have interchangeable header images.
The theory is to set the header image on the parent page and then unless a template
is specified for the page, it should use one of it&amp;rsquo;s ancestor&amp;rsquo;s.
&lt;/p&gt;
&lt;p&gt;
&lt;a title="Umbraco open source ASP.Net CMS" href="http://blogs.thesitedoctor.co.uk/tim/ct.ashx?id=1148f8a0-76f7-4121-a2e0-7cc540a724da&amp;amp;url=http%3a%2f%2fwww.umbraco.org%2f" ?&gt;Umbraco&lt;/a&gt; as
a nice control called a &amp;ldquo;Media Picker&amp;rdquo; which I felt was perfect for the
job as it meant you could easily share header images across the site and it also made
sense from a user perspective to have a &amp;ldquo;Header Images&amp;rdquo; folder to choose
from. The issue from my point of view was how to traverse up the tree until it found
a header image to use. Imagine the following site map:
&lt;/p&gt;
&lt;p&gt;
-Home&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -Products&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-Category&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-Product
details (Custom header image)
&lt;/p&gt;
&lt;p&gt;
If you&amp;rsquo;re on the products/category page it should display the header image from
Home but when you&amp;rsquo;re on the product details page it needs to show the specified
header image.
&lt;/p&gt;
&lt;p&gt;
So how do you do it? It turns out it&amp;rsquo;s (fairly) simple using XSLT. The first
issue I ran into was getting the URL of the media file from the media picker control, &lt;a title="Umbraco open source ASP.Net CMS" href="http://blogs.thesitedoctor.co.uk/tim/ct.ashx?id=1148f8a0-76f7-4121-a2e0-7cc540a724da&amp;amp;url=http%3a%2f%2fwww.umbraco.org%2f" ?&gt;Umbraco&lt;/a&gt; offers
a useful function to do this for you (well almost!). Using the function umbraco.library:GetMedia
you are able to get the details on the file based on the media item id but it includes
everything so you then need to use a little XSLT to select the attribute &amp;ldquo;umbracoFile&amp;rdquo;:
&lt;/p&gt;
&lt;div class="code"&gt;
&lt;span style="color:#0000ff"&gt;umbraco.library:GetMedia(&lt;/span&gt;[XSLT TO SELECT THE FIELD]&lt;span style="color:#0000ff"&gt;,'false')/data&amp;nbsp;[@alias&amp;nbsp;=&amp;nbsp;'umbracoFile']&lt;/span&gt;
&lt;/div&gt;
&lt;p&gt;
That should give you something along the lines of &amp;ldquo;/imgs/somefolder/somefile.jpg&amp;rdquo;
&lt;/p&gt;
&lt;p&gt;
Now how can you traverse up the tree to get the data? Thanks to &lt;a href="http://www.mortenbock.dk/"&gt;Morten
Bock&lt;/a&gt;/&lt;a href="http://neehouse.com/umbraco_cms/"&gt;Casey Neehouse&lt;/a&gt; for helping
me understand this XSLT, but the following code should give you the URL of the nearest
media item in the tree:
&lt;/p&gt;
&lt;div class="code"&gt;
&lt;img src="/img/sc/clear.gif" align="top"&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#8b0000"&gt;?xml&lt;/span&gt;&lt;span style="color:#ff0000"&gt;&amp;nbsp;version&lt;/span&gt;&lt;span style="color:#8b0000"&gt;=&lt;/span&gt;&lt;span style="color:#0000ff"&gt;"1.0"&lt;/span&gt;&lt;span style="color:#ff0000"&gt;&amp;nbsp;encoding&lt;/span&gt;&lt;span style="color:#8b0000"&gt;=&lt;/span&gt;&lt;span style="color:#0000ff"&gt;"UTF-8"&lt;/span&gt;&lt;span style="color:#8b0000"&gt;?&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;br&gt;
&lt;img src="/img/sc/clear.gif" align="top"&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;!&lt;/span&gt;&lt;span style="color:#ff00ff"&gt;DOCTYPE&lt;/span&gt;&amp;nbsp;&lt;span style="color:#ff00ff"&gt;xsl:Stylesheet&amp;nbsp;[&amp;nbsp;&amp;lt;!ENTITY&amp;nbsp;nbsp&amp;nbsp;"&amp;nbsp;"&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;]&amp;gt;&lt;br&gt;
&lt;div style="display:none;" id="closed633317833189687500_3"&gt;&lt;img src="/img/sc/PlusNoLines.gif" align="top" onclick="showHideCodeDiv('633317833189687500_3', false)"&gt;&lt;b&gt;&lt;span style="color:#00008b"&gt;&amp;lt;...&amp;gt;&lt;/span&gt;&lt;/b&gt;
&lt;/div&gt;
&lt;div style="display:block;" id="open633317833189687500_3"&gt;&lt;img src="/img/sc/minusNoTopLine.gif" align="top" onclick="showHideCodeDiv('633317833189687500_3', true)"&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#8b0000"&gt;xsl:stylesheet&lt;/span&gt;&amp;nbsp;&lt;br&gt;
&lt;img src="/img/sc/I.gif" align="top"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ff0000"&gt;&amp;nbsp;version&lt;/span&gt;&lt;span style="color:#8b0000"&gt;=&lt;/span&gt;&lt;span style="color:#0000ff"&gt;"1.0"&lt;/span&gt;&amp;nbsp;&lt;br&gt;
&lt;img src="/img/sc/I.gif" align="top"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ff0000"&gt;&amp;nbsp;xmlns:xsl&lt;/span&gt;&lt;span style="color:#8b0000"&gt;=&lt;/span&gt;&lt;span style="color:#0000ff"&gt;"http://www.w3.org/1999/XSL/Transform"&lt;/span&gt;&amp;nbsp;&lt;br&gt;
&lt;img src="/img/sc/I.gif" align="top"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ff0000"&gt;&amp;nbsp;xmlns:msxml&lt;/span&gt;&lt;span style="color:#8b0000"&gt;=&lt;/span&gt;&lt;span style="color:#0000ff"&gt;"urn:schemas-microsoft-com:xslt"&lt;/span&gt;
&lt;br&gt;
&lt;img src="/img/sc/I.gif" align="top"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ff0000"&gt;&amp;nbsp;xmlns:umbraco&lt;/span&gt;&lt;span style="color:#8b0000"&gt;.library=&lt;/span&gt;&lt;span style="color:#0000ff"&gt;"urn:umbraco.library"&lt;/span&gt;
&lt;br&gt;
&lt;img src="/img/sc/L.gif" align="top"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ff0000"&gt;&amp;nbsp;exclude&lt;/span&gt;&lt;span style="color:#8b0000"&gt;-result-prefixes=&lt;/span&gt;&lt;span style="color:#0000ff"&gt;"msxml&amp;nbsp;umbraco.library"&amp;gt;&lt;/span&gt;
&lt;/div&gt;
&lt;img src="/img/sc/clear.gif" align="top"&gt;
&lt;br&gt;
&lt;img src="/img/sc/clear.gif" align="top"&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#8b0000"&gt;xsl:output&lt;/span&gt;&lt;span style="color:#ff0000"&gt;&amp;nbsp;method&lt;/span&gt;&lt;span style="color:#8b0000"&gt;=&lt;/span&gt;&lt;span style="color:#0000ff"&gt;"xml"&lt;/span&gt;&lt;span style="color:#ff0000"&gt;&amp;nbsp;omit&lt;/span&gt;&lt;span style="color:#8b0000"&gt;-xml-declaration=&lt;/span&gt;&lt;span style="color:#0000ff"&gt;"yes"&lt;/span&gt;&amp;nbsp;&lt;span style="color:#8b0000"&gt;/&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;br&gt;
&lt;img src="/img/sc/clear.gif" align="top"&gt;
&lt;br&gt;
&lt;img src="/img/sc/clear.gif" align="top"&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#8b0000"&gt;xsl:param&lt;/span&gt;&lt;span style="color:#ff0000"&gt;&amp;nbsp;name&lt;/span&gt;&lt;span style="color:#8b0000"&gt;=&lt;/span&gt;&lt;span style="color:#0000ff"&gt;"currentPage"&lt;/span&gt;&lt;span style="color:#8b0000"&gt;/&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;br&gt;
&lt;img src="/img/sc/clear.gif" align="top"&gt;
&lt;br&gt;
&lt;img src="/img/sc/clear.gif" align="top"&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#8b0000"&gt;xsl:template&lt;/span&gt;&lt;span style="color:#ff0000"&gt;&amp;nbsp;match&lt;/span&gt;&lt;span style="color:#8b0000"&gt;=&lt;/span&gt;&lt;span style="color:#0000ff"&gt;"/"&amp;gt;&lt;/span&gt;
&lt;br&gt;
&lt;img src="/img/sc/clear.gif" align="top"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#8b0000"&gt;xsl:choose&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;br&gt;
&lt;img src="/img/sc/clear.gif" align="top"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#8b0000"&gt;xsl:when&lt;/span&gt;&lt;span style="color:#ff0000"&gt;&amp;nbsp;test&lt;/span&gt;&lt;span style="color:#8b0000"&gt;=&lt;/span&gt;&lt;span style="color:#0000ff"&gt;"$currentPage/ancestor-or-self::node&amp;nbsp;[string(data[@alias='pageBanner'])!=''][1]&amp;nbsp;/data[@alias='pageBanner']&amp;nbsp;!=&amp;nbsp;''"&amp;gt;&lt;/span&gt;
&lt;br&gt;
&lt;img src="/img/sc/clear.gif" align="top"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#8b0000"&gt;xsl:value-of&lt;/span&gt;&lt;span style="color:#ff0000"&gt;&amp;nbsp;select&lt;/span&gt;&lt;span style="color:#8b0000"&gt;=&lt;/span&gt;&lt;span style="color:#0000ff"&gt;"umbraco.library:GetMedia($currentPage/ancestor-or-self::node&amp;nbsp;[data[@alias='pageBanner']!=''][1]&amp;nbsp;/data[@alias='pageBanner'],'false')/data&amp;nbsp;[@alias&amp;nbsp;=&amp;nbsp;'umbracoFile']"&lt;/span&gt;&lt;span style="color:#8b0000"&gt;/&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;br&gt;
&lt;img src="/img/sc/clear.gif" align="top"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#8b0000"&gt;/xsl:when&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;br&gt;
&lt;img src="/img/sc/clear.gif" align="top"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#8b0000"&gt;xsl:otherwise&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;br&gt;
&lt;img src="/img/sc/clear.gif" align="top"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;!--
The URL of the default banner just incase the user removes the homepage banner (would
be better as a parameter) --&amp;gt; 
&lt;br&gt;
&lt;img src="/img/sc/clear.gif" align="top"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#8b0000"&gt;/xsl:otherwise&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;br&gt;
&lt;img src="/img/sc/clear.gif" align="top"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#8b0000"&gt;/xsl:choose&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;br&gt;
&lt;img src="/img/sc/clear.gif" align="top"&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#8b0000"&gt;/xsl:template&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;br&gt;
&lt;img src="/img/sc/clear.gif" align="top"&gt;
&lt;br&gt;
&lt;img src="/img/sc/clear.gif" align="top"&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#8b0000"&gt;/xsl:stylesheet&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;p&gt;
Then add a macro to your project and you&amp;rsquo;re done :). You can see it in action
on the new &lt;a href="http://lucyswitchgear.thesitedoctor.co.uk/"&gt;Lucy Switchgear website&lt;/a&gt; if
you're interested, it's currently being written so it's bound to be a little rough
around the edges but do let me know what you think. Our remit was to improve the 
&lt;abbr title="Content Management System"&gt;
CMS
&lt;/abbr&gt;
they had in place making it easier to manage the site and also sort out a few major
issues from a 
&lt;abbr title="Search Engine Optimisation"&gt;
SEO
&lt;/abbr&gt;
perspective. Although altering the design wasn&amp;rsquo;t part of the initial brief I
think you&amp;rsquo;ll agree the facelift we&amp;rsquo;ve given the site is for the better
(even if it&amp;rsquo;s just from a usability point of view).
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=d812c9eb-91bf-4384-9840-3e840ee01fd2" /&gt;</description>
      <comments>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,d812c9eb-91bf-4384-9840-3e840ee01fd2.aspx</comments>
      <category>The Site Doctor</category>
      <category>Umbraco</category>
      <category>Web Development</category>
    </item>
    <item>
      <trackback:ping>http://blogs.thesitedoctor.co.uk/test/Trackback.aspx?guid=a9a5d870-e59f-4e2d-a722-fbe9046f629e</trackback:ping>
      <pingback:server>http://blogs.thesitedoctor.co.uk/test/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,a9a5d870-e59f-4e2d-a722-fbe9046f629e.aspx</pingback:target>
      <dc:creator>Tim</dc:creator>
      <wfw:comment>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,a9a5d870-e59f-4e2d-a722-fbe9046f629e.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.thesitedoctor.co.uk/test/SyndicationService.asmx/GetEntryCommentsRss?guid=a9a5d870-e59f-4e2d-a722-fbe9046f629e</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Having only recently started to use Umbraco I've taken a couple of days to familiarise
myself with the way it works and try and get a few best practices in place, I expect
these will be updated over time but you've got to start somewhere ;) 
</p>
        <p>
          <b>
          </b>
        </p>
        <p>
As with any code, I think it's very important to follow a consistent naming convention
-whether it's the same one everyone else follows or not, you need to be able to pickup
code you wrote months/years/decades ago and still understand it. Your styles will
no doubt change over the years but you get the idea. 
</p>
        <p>
I've chosen to follow the following "style": 
</p>
        <ul>
          <li>
            <b>Document Types: </b>Lowercase the first letter of the aliases followed by capitals
for the new words (similar to <a href="http://en.wikipedia.org/wiki/Hungarian_notation">Hungarian
Notation</a>). Use descriptive names i.e. Home Page for the document type as it'll
be client facing. Suffix with "Page" if it is a page document type (as opposed to
i.e. a screen shot) 
</li>
          <li>
            <b>Templates:</b> If the template is specifically for a document type, use the same
name for the template, if it relates to multiple document types name it logically
i.e. "Master Template" or "Left Menu" 
</li>
          <li>
            <b>Macros:</b> Prefix the macro alias with uppercase TSD to avoid conflicts with other
macros. Prefix the name with [Source of the macro] i.e. [XSLT] or [User Control].
This is something I picked up from the sample package created by <a href="http://www.creativewebspecialist.co.uk/">Warren
Buckley</a> that I think makes it easier to understand what's going on 
</li>
          <li>
            <b>XSLT Files:</b> Prefix the name with the site's abbreviation i.e. for <a href="http://www.thesitedoctor.co.uk/">www.thesitedoctor.co.uk</a> it
would be TSD or for <a href="http://www.wineandhampergifts.co.uk/">www.wineandhampergifts.co.uk</a> WAHG
if it's a site specific XSLT file otherwise name conventionally i.e. <a href="http://en.wikipedia.org/wiki/CamelCase">CamelCase</a></li>
        </ul>
        <img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=a9a5d870-e59f-4e2d-a722-fbe9046f629e" />
      </body>
      <title>Naming conventions for Umbraco</title>
      <guid isPermaLink="false">http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,a9a5d870-e59f-4e2d-a722-fbe9046f629e.aspx</guid>
      <link>http://blogs.thesitedoctor.co.uk/test/2007/11/26/NamingConventionsForUmbraco.aspx</link>
      <pubDate>Mon, 26 Nov 2007 10:30:56 GMT</pubDate>
      <description>&lt;p&gt;
Having only recently started to use Umbraco I've taken a couple of days to familiarise
myself with the way it works and try and get a few best practices in place, I expect
these will be updated over time but you've got to start somewhere ;) 
&lt;p&gt;
&lt;b&gt;&lt;/b&gt; 
&lt;p&gt;
As with any code, I think it's very important to follow a consistent naming convention
-whether it's the same one everyone else follows or not, you need to be able to pickup
code you wrote months/years/decades ago and still understand it. Your styles will
no doubt change over the years but you get the idea. 
&lt;p&gt;
I've chosen to follow the following "style": 
&lt;ul&gt;
&lt;li&gt;
&lt;b&gt;Document Types: &lt;/b&gt;Lowercase the first letter of the aliases followed by capitals
for the new words (similar to &lt;a href="http://en.wikipedia.org/wiki/Hungarian_notation"&gt;Hungarian
Notation&lt;/a&gt;). Use descriptive names i.e. Home Page for the document type as it'll
be client facing. Suffix with "Page" if it is a page document type (as opposed to
i.e. a screen shot) 
&lt;li&gt;
&lt;b&gt;Templates:&lt;/b&gt; If the template is specifically for a document type, use the same
name for the template, if it relates to multiple document types name it logically
i.e. "Master Template" or "Left Menu" 
&lt;li&gt;
&lt;b&gt;Macros:&lt;/b&gt; Prefix the macro alias with uppercase TSD to avoid conflicts with other
macros. Prefix the name with [Source of the macro] i.e. [XSLT] or [User Control].
This is something I picked up from the sample package created by &lt;a href="http://www.creativewebspecialist.co.uk/"&gt;Warren
Buckley&lt;/a&gt; that I think makes it easier to understand what's going on 
&lt;li&gt;
&lt;b&gt;XSLT Files:&lt;/b&gt; Prefix the name with the site's abbreviation i.e. for &lt;a href="http://www.thesitedoctor.co.uk/"&gt;www.thesitedoctor.co.uk&lt;/a&gt; it
would be TSD or for &lt;a href="http://www.wineandhampergifts.co.uk/"&gt;www.wineandhampergifts.co.uk&lt;/a&gt; WAHG
if it's a site specific XSLT file otherwise name conventionally i.e. &lt;a href="http://en.wikipedia.org/wiki/CamelCase"&gt;CamelCase&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=a9a5d870-e59f-4e2d-a722-fbe9046f629e" /&gt;</description>
      <comments>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,a9a5d870-e59f-4e2d-a722-fbe9046f629e.aspx</comments>
      <category>ASP.Net</category>
      <category>Umbraco</category>
      <category>Web Development</category>
      <category>WebDD</category>
    </item>
    <item>
      <trackback:ping>http://blogs.thesitedoctor.co.uk/test/Trackback.aspx?guid=1148f8a0-76f7-4121-a2e0-7cc540a724da</trackback:ping>
      <pingback:server>http://blogs.thesitedoctor.co.uk/test/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,1148f8a0-76f7-4121-a2e0-7cc540a724da.aspx</pingback:target>
      <dc:creator>Tim</dc:creator>
      <wfw:comment>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,1148f8a0-76f7-4121-a2e0-7cc540a724da.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.thesitedoctor.co.uk/test/SyndicationService.asmx/GetEntryCommentsRss?guid=1148f8a0-76f7-4121-a2e0-7cc540a724da</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I'm currently investigating a new Open Source ASP.Net CMS system called <a href="http://www.umbraco.org/" title="Umbraco open source ASP.Net CMS">Umbraco</a>.
It looks very promising as it can be fully accessible and has full support for XHTML
among many other interesting features. I met with a couple of the guys that are developing
the system in Manchester a couple of weeks ago and they've got big plans so keep an
eye on it.
</p>
        <p>
Anyway yesterday while setting up the new The Site Doctor site on <a href="http://www.umbraco.org/" title="Umbraco open source ASP.Net CMS">Umbraco</a> I
ran into an issue where by I had "broken" the menu. Basically I had deleted
the template from the system which should have deleted all copies of the pages that
use that template but instead a cache remained somewhere. I ran through a number of
steps to re-create the cache but nothing worked.
</p>
        <p>
If you run into the same issue as I did, follow these steps:
</p>
        <ol>
          <li>
Find out the ID of the page in question (easiest way is just to add the ID to the
output of the menu XSLT) 
</li>
          <li>
Search the database for the ID using the T-SQL I posted in "<a href="http://blogs.thesitedoctor.co.uk/tim/2007/11/02/How+To+Search+Every+Table+And+Field+In+A+SQL+Server+Database.aspx">How
to search every table and field in a SQL Server Database</a>"</li>
          <li>
Download and install a Unicode and UTF-8 search program such as <a href="http://www.silveragesoftware.com/hffr.html">Text
Workbench</a> and search for the ID (I only found it in /data/Umbraco.config) 
</li>
          <li>
Reset the applications cache -the easiest way to do this is to simply re-upload the
web.config file</li>
        </ol>
        <p>
That should sort it :) 
</p>
        <img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=1148f8a0-76f7-4121-a2e0-7cc540a724da" />
      </body>
      <title>Umbraco and Ghost/Cached/Deleted pages appearing in menu</title>
      <guid isPermaLink="false">http://blogs.thesitedoctor.co.uk/test/PermaLink,guid,1148f8a0-76f7-4121-a2e0-7cc540a724da.aspx</guid>
      <link>http://blogs.thesitedoctor.co.uk/test/2007/11/03/UmbracoAndGhostCachedDeletedPagesAppearingInMenu.aspx</link>
      <pubDate>Sat, 03 Nov 2007 13:31:42 GMT</pubDate>
      <description>&lt;p&gt;
I'm currently investigating a new Open Source ASP.Net CMS system called &lt;a href="http://www.umbraco.org/" title="Umbraco open source ASP.Net CMS"&gt;Umbraco&lt;/a&gt;.
It looks very promising as it can be fully accessible and has full support for XHTML
among many other interesting features. I met with a couple of the guys that are developing
the system in Manchester a couple of weeks ago and they've got big plans so keep an
eye on it.
&lt;/p&gt;
&lt;p&gt;
Anyway yesterday while setting up the new The Site Doctor site on &lt;a href="http://www.umbraco.org/" title="Umbraco open source ASP.Net CMS"&gt;Umbraco&lt;/a&gt; I
ran into an issue where by I had &amp;quot;broken&amp;quot; the menu. Basically I had deleted
the template from the system which should have deleted all copies of the pages that
use that template but instead a cache remained somewhere. I ran through a number of
steps to re-create the cache but nothing worked.
&lt;/p&gt;
&lt;p&gt;
If you run into the same issue as I did, follow these steps:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Find out the ID of the page in question (easiest way is just to add the ID to the
output of the menu XSLT) 
&lt;/li&gt;
&lt;li&gt;
Search the database for the ID using the T-SQL I posted in &amp;quot;&lt;a href="http://blogs.thesitedoctor.co.uk/tim/2007/11/02/How+To+Search+Every+Table+And+Field+In+A+SQL+Server+Database.aspx"&gt;How
to search every table and field in a SQL Server Database&lt;/a&gt;&amp;quot;&lt;/li&gt;
&lt;li&gt;
Download and install a Unicode and UTF-8 search program such as &lt;a href="http://www.silveragesoftware.com/hffr.html"&gt;Text
Workbench&lt;/a&gt; and search for the ID (I only found it in /data/Umbraco.config) 
&lt;/li&gt;
&lt;li&gt;
Reset the applications cache -the easiest way to do this is to simply re-upload the
web.config file&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
That should sort it :) 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.thesitedoctor.co.uk/test/aggbug.ashx?id=1148f8a0-76f7-4121-a2e0-7cc540a724da" /&gt;</description>
      <comments>http://blogs.thesitedoctor.co.uk/test/CommentView,guid,1148f8a0-76f7-4121-a2e0-7cc540a724da.aspx</comments>
      <category>ASP.Net</category>
      <category>Software</category>
      <category>Umbraco</category>
    </item>
  </channel>
</rss>