<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-20883010</id><updated>2010-06-03T09:14:44.567+01:00</updated><title type='text'>Into the core - Independent Sitecore developer viewpoints</title><subtitle type='html'>Independant consulting and development experiences on the Sitecore 5 and 6 platform. Problemsolving, workable solutions, "under the hood" and whatever else comes to mind.</subtitle><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default'/><link rel='alternate' type='text/html' href='http://www.cassidy.dk/blog/sitecore/default.html'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default?start-index=26&amp;max-results=25'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.cassidy.dk/blog/sitecore/atom.xml'/><author><name>Mark Cassidy</name><uri>http://www.blogger.com/profile/07054254475245848945</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>41</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-20883010.post-3380395826300336104</id><published>2010-06-03T09:14:00.001+01:00</published><updated>2010-06-03T09:14:44.577+01:00</updated><title type='text'>This blog has moved</title><content type='html'>
       This blog is now located at http://intothecore.cassidy.dk/.
       You will be automatically redirected in 30 seconds or you may click &lt;a href='http://intothecore.cassidy.dk/'&gt;here&lt;/a&gt;.

       For feed subscribers, please update your feed subscriptions to
       http://intothecore.cassidy.dk/feeds/posts/default.
  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20883010-3380395826300336104?l=www.cassidy.dk%2Fblog%2Fsitecore%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/3380395826300336104/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20883010&amp;postID=3380395826300336104' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/3380395826300336104'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/3380395826300336104'/><link rel='alternate' type='text/html' href='http://www.cassidy.dk/blog/sitecore/2010/06/this-blog-has-moved.html' title='This blog has moved'/><author><name>Mark Cassidy</name><uri>http://www.blogger.com/profile/07054254475245848945</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03182104182261746826'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20883010.post-4345551949993713675</id><published>2009-09-03T17:57:00.001+01:00</published><updated>2009-09-03T17:57:49.280+01:00</updated><title type='text'>Partial Cache Clearing in Sitecore</title><content type='html'>&lt;p&gt;For a very long time, some very serious performance issues have affected certain types of Sitecore deployments. It has to do with scaling a Sitecore solution into webfarms (multiple content delivery servers) and the use of the Sitecore Staging Module.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;In very short summary, if the website is updated frequently (say, for instance, an editorial staff of 10 or so, posting relevant market updates) AND the website is under heavy load, most practical uses of the tool Sitecore recommends and supports will more or less kill performance on your SQL Servers or whatever storage mechanism you have in place.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;I’ve never blogged in detail about this issue, as I didn’t have a client myself that was affected directly by this issue. Paul George has blogged about it in detail however, and if you want to learn more about what this issue is and if it could be affecting you, take a look at these posts:&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="http://blog.paulgeorge.co.uk/2009/07/22/problems-with-sitecore-and-the-staging-module/"&gt;Problems with Sitecore and the staging module part 1&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://blog.paulgeorge.co.uk/2009/07/26/problems-the-sitecore-staging-module-part-2-extranet-user-loses-session/"&gt;Problems with the Sitecore 6 staging module part 2 – extranet user loses session&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;So why write about it now?&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;h2&gt;The good news&lt;/h2&gt; &lt;p&gt;&lt;a href="http://sitecoresupport.blogspot.com/2009/09/announcement-partial-item-cache.html"&gt;Alex Shyba posted about a new Sitecore Shared Source module&lt;/a&gt; that was just made publically available; &lt;a href="http://trac.sitecore.net/SitecoreStager/browser/Tags/rev090820"&gt;SitecoreStager – Sitecore Partial (item) Cache Clearing Module&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;In short, instead of just uncritically clearing the entire cache on your target server, dropping user sessions, putting out the cat and so on – the SitecoreStager will instead execute a partial cache clear and in essence just clear items from the cache that were affected by the publishing operation.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;This is very good news indeed, and for those clients who have been affected by this problem I am sure it’s tipped hats all ‘round :-)&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;h2&gt;&lt;/h2&gt; &lt;h2&gt;The bad news&lt;/h2&gt; &lt;p&gt;This is actually something that has been nagging me a bit for some time now, and has just been refreshed by this release.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;It is Shared Source.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Don’t get me wrong. I think the &lt;a href="http://sdn.sitecore.net/Resources/Shared%20Source.aspx"&gt;Sitecore Shared Source Library&lt;/a&gt; is an excellent idea. I have code in there myself, and it’s a perfect place to go look for those “there has to be someone else who had this problem and solved it” code snippets and field types and whatever it may be.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;But it is also, for obvious reasons, unsupported by Sitecore themselves. I mean, how could they?&amp;nbsp; Half the modules and code pieces in there come from independent sources like myself – and it wouldn’t be reasonable to expect Sitecore to support them.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;But what about the code Sitecore release to the library themselves?&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Would you not agree; “With Sitecore, you can have a team of editors publishing content to an enterprise level site, and performance will still rock” is a statement you’ll find (albeit probably not verbatim) in Sitecore marketing material?&amp;nbsp;&amp;nbsp; But it is unsupported?&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;I feel somewhat the same for the &lt;a href="http://trac.sitecore.net/MultipleSitesManager"&gt;Multiple Sites Manager&lt;/a&gt;…&amp;nbsp; shouldn’t a standard Sitecore have a solution for regular (advanced) editors to set up new websites without having to edit configuration files?&amp;nbsp; Or is that limited to Foundry licenses only?&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;h2&gt;What I mean is&lt;/h2&gt; &lt;p&gt;Sitecore marketing materials doesn’t exactly help anyone much, when they boast “Comes with Blog Modules, Wiki Modules and even &lt;a href="http://www.sitecore.net/en/Products/Sitecore-CMS/Integration-Tools.aspx"&gt;Microsoft Dynamix and Microsoft BizTalk integration&lt;/a&gt; (yes…)”; yet offers little or no actual support other than pointing the users, the licensees, the Sitecore implementors (like myself) in the direction of the Shared Souce Library, shrug and go… “From here, you’re on your own”.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Kudos for making this module. I think this belongs in the core package however, fully supported and updated with every Sitecore release. That’s my 2 cents worth.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20883010-4345551949993713675?l=www.cassidy.dk%2Fblog%2Fsitecore%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/4345551949993713675/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20883010&amp;postID=4345551949993713675' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/4345551949993713675'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/4345551949993713675'/><link rel='alternate' type='text/html' href='http://www.cassidy.dk/blog/sitecore/2009/09/partial-cache-clearing-in-sitecore.html' title='Partial Cache Clearing in Sitecore'/><author><name>Mark Cassidy</name><uri>http://www.blogger.com/profile/07054254475245848945</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03182104182261746826'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20883010.post-1733331766452490912</id><published>2009-06-23T19:04:00.001+01:00</published><updated>2009-06-23T19:04:16.020+01:00</updated><title type='text'>Code Monkeys?</title><content type='html'>&lt;p&gt;Before I begin, I’m breaking routine here – this post is in no way Sitecore related.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;So here I was, reading through my blogroll, catching up on bits and bobs from around the world. And then one of the sites decides to confront me with the following ad:&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_7sFzy9-mI1g/SkEZGhV6IUI/AAAAAAAAAFM/vXg1gbcQfDo/s1600-h/chimps%5B2%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="chimps" border="0" alt="chimps" src="http://lh3.ggpht.com/_7sFzy9-mI1g/SkEZH_Hm7mI/AAAAAAAAAFQ/jGVVinht9jI/chimps_thumb.png?imgmax=800" width="215" height="244"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;I am, by own admission, quite possibly a bit over sensitive to the idea that developers are &lt;a title="The Wetware Crisis" href="http://brucefwebster.com/2008/04/11/the-wetware-crisis-the-dead-sea-effect/"&gt;interchangeable code monkeys&lt;/a&gt;. I’ve worked in the internet industry pretty much since the inception in the mid 90s, and I will never subscribe to the notion that one developer (me) can easily be replaced by a &lt;a title="Rent a Coder" href="http://www.rentacoder.com/RentACoder/DotNet/default.aspx"&gt;developer&lt;/a&gt; working offshore for as low as $ USD 7.00 a day.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;But then again, maybe that’s just me ;-)&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Am I missing a point here?&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20883010-1733331766452490912?l=www.cassidy.dk%2Fblog%2Fsitecore%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/1733331766452490912/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20883010&amp;postID=1733331766452490912' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/1733331766452490912'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/1733331766452490912'/><link rel='alternate' type='text/html' href='http://www.cassidy.dk/blog/sitecore/2009/06/code-monkeys.html' title='Code Monkeys?'/><author><name>Mark Cassidy</name><uri>http://www.blogger.com/profile/07054254475245848945</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03182104182261746826'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20883010.post-5044929671464618232</id><published>2009-06-05T13:38:00.001+01:00</published><updated>2009-06-05T13:50:25.702+01:00</updated><title type='text'>Just because you can doesn’t mean you should</title><content type='html'>&lt;p&gt;For those of you who don’t know this; I make my living as a Sitecore Professional Services Consultant. Understand this in the context of working with the Sitecore &lt;em&gt;product&lt;/em&gt; as a consultant, I don’t actually work for Sitecore &lt;em&gt;the company&lt;/em&gt;.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;My job, if you will, consists primarily of establishing contact with newly started Sitecore Partners or want-to-become Partners, and bringing to them whatever skills I can offer to help them take those first shaky steps when bringing their first Sitecore Project to life.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Don’t worry, am not going to start any kind of sales pitch here, that’s not what &lt;strike&gt;blogs &lt;/strike&gt;this blog &lt;strike&gt;are&lt;/strike&gt; is for. I’m only telling, so you know what sort of context this post is in and where my experiences are coming from. &lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;As you can maybe imagine (or even remember still?); the myriad of questions in relation to Sitecore coming from developers, sales people, project managers and so on are many and not far between. Nothing wrong with that, obviously, we all have to learn. Mostly the questions start out around the capabilities of the product, “can” questions. After this, they move into “how”, and ultimately (in the cases where I’m actually lucky enough to be around for the entire project) “when”.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;h2&gt;"Can” questions&lt;/h2&gt; &lt;p&gt;Initially, when requirements are being gathered, it’s a heap of “Can Sitecore do this?” type of questions. To name just a very few examples:&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Can you integrate Sitecore with SharePoint?  &lt;li&gt;Can you use the AJAX toolkit on a Sitecore site?  &lt;li&gt;Can Sitecore deliver Flash content?  &lt;li&gt;Can we build a database of our people and offices in Sitecore and have them shown on the site?  &lt;li&gt;Can we have search options on our site?  &lt;li&gt;Can Sitecore integrate with Google Analytics?  &lt;li&gt;Can we implement breadcrumbs with Sitecore?&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;There are, of course, many more questions that are usually asked – as I’m sure any member of the Sitecore sales team will tell you as well. Incidentally, the answer to all of the above questions is “yes”.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;And now we’re getting to the point. Working with Sitecore – how often is it, that you actually have to sat “No”. “Sorry. Can’t do that with Sitecore”?&amp;nbsp;&amp;nbsp; While I have no statistics on it, I can still state without shaking my hand that this very rarely happens. Sitecore allows you to say “Yes. Can do” to almost any requirement, no matter how far fetched it may seem or even be.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Let’s not get too carried away, however, this is not quite as amazing as it might appear on the surface. If we boil it down to the bone, Sitecore can be described as an “ASP.NET application that adds Content Management services to your ASP.NET websites”. Right – I’m sure there’s a hundred different marketing spins to be made here, but bear with me… ;-)&amp;nbsp; &lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Sitecore is an ASP.NET application. It sits, talks, walks and sounds like an ASP.NET application. And here’s the good bit – and the reason you can answer “yes” to almost any requirement – &lt;em&gt;anything you can do in ASP.NET, you can continue doing – Sitecore or no Sitecore involved&lt;/em&gt;.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Even the Sitecore product itself is flexible to the bone - (almost) everything is based on configuration files, and they can be tweaked and twisted or completely rewritten – in case there’s a particular feature you are missing, or if there’s a certain way Sitecore works that you want to change or even remove entirely. A blessing, right?&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Wrong!&amp;nbsp; And on after-thought; “Wrong… mostly!”&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Don’t get me wrong. I totally get where Sitecore is coming from, in wanting to create as flexible a platform as possible. As any software vendor on the market; the more requirements you can say “yes” to, the more sales you are likely to get. This is as simple and obvious as can be, really.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;I’m just saying; maybe “Yes. But…” is a better answer. Let’s take a look at some more “can” questions. These are not fictional by the way, they are real questions asked by real people.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;h2&gt;“Can” questions part 2&lt;/h2&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Can you rewrite how Sitecore creates new items, so that all language versions are created instead of just the current language you are editing?  &lt;li&gt;Can you use ASP.NET Master Pages and Content Pages with Sitecore?&amp;nbsp;&amp;nbsp; Does Sitecore support nested Master Pages?  &lt;li&gt;Can you work with Web Parts in Sitecore?  &lt;ul&gt; &lt;li&gt;This one deserves a closer examination; and after doing that what is &lt;em&gt;usually&lt;/em&gt; really asked here is, “Can I put my page into edit mode, and add/remove Web Parts on different placeholder areas of the page?”&lt;/li&gt;&lt;/ul&gt; &lt;li&gt;Can I use Microsoft Word to edit my pages?  &lt;li&gt;Can I use the Microsoft MVC Framework with Sitecore?&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Do you see where this is going?&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;What are these people really asking for?&amp;nbsp; Features?&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Nope. In the vast majority of cases, these are not feature requests. These people are looking for &lt;em&gt;&lt;strong&gt;familiarity&lt;/strong&gt;&lt;/em&gt;.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Yep. That’s right. Familiar ground to stand on. Something known, as opposed to something unknown. Can we blame them?&amp;nbsp; Absolutely not. I think we all have a bit of &lt;em&gt;fear of the unknown&lt;/em&gt;, to one degree or another.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;And of course, Sitecore is fully aware of this as well. They have released features specifically to address some of these very questions already, and there are more to come. That way, we can continue saying “yes” and everyone wins. Just keep this point in mind however – &lt;em&gt;&lt;strong&gt;familiarity&lt;/strong&gt;&lt;/em&gt;. Not features. More often than not.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;h2&gt;The solution&lt;/h2&gt; &lt;p&gt;I guess the word “solution” is not really appropriate, as it seems to indicate there was a problem to begin with. Look &lt;em&gt;behind&lt;/em&gt; the question. Find out why it is being asked in the first place, and then work from there.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Why does the person want to change how Sitecore creates language versions?&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Turns out, this is apparently how other major CMS vendors do it. Now I happen to think Sitecore is doing this the right way, but this person came from a different background with different experience.&amp;nbsp;&amp;nbsp; He was looking for a way to solve (amongst other things) content translation flows – and was maybe not aware of the various tools and gadgets that Sitecore provide for this purpose.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Master Pages?&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Think “overworked .NET developer who really cannot be bothered to try and figure out how Sitecore constructs the pages it delivers”.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;I certainly get where he or she is coming from. But don’t go chasing down this road – sit down and show (don’t tell; show) how a Sitecore “Layout” and an ASP.NET “Master Page” is more or less essentially the same thing. (I know…&amp;nbsp; but really – in most cases, this is just semantics).&amp;nbsp;&amp;nbsp; So “placeholders”, not “content placeholders”. “Layouts”, not “Master Pages”.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Am sure you’re seeing the pattern here, by now :-)&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;All I’m saying is; “Yes. You absolutely CAN reconfigure Sitecore, so that security is completely disabled, users and roles come off a scan of your table napkin, your coffee machine starts automatically when you publish AND it will even offer background music when content editing”. Ok I’m being ironic, obviously, but see the point is this.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;u&gt;Just because you can doesn’t mean you should&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Don’t go mucking about with Sitecore, jumping through hoops to make it act a certain way. Chances are – and most times – you aren’t dealing with a real requirement at all. All too often have I arrived at a “young” Sitecore shop and seen a development team dive right into a complete reconfiguration of how Sitecore works.&amp;nbsp; Pipelines altered and skewed and tonnes of bespoke code developed because “Otherwise we couldn’t meet our clients requirements”.&amp;nbsp; Err…&amp;nbsp; WHAT requirements were those exactly?&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;I mean, come on. I’ve done lots and lots of Sitecore sites now – and I can count the number of times I’ve actually had to modify standard Sitecore behaviour on maybe one hand.&amp;nbsp; This does not include adding new modules or field types, or anything like that – I’m talking about core changes such as altering the publishing pipeline, messing about with security resolvers and so on.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Not pointing fingers at anyone in particular here. If I were, I would have to point to myself first – I’m as guilty of trying to change something from what it is into something that is familiar as I gather anyone else is.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;I just think it’s something we should all keep in mind. &lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;And oh… before I end.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Sometimes the question DOES lead to a “legitimate” feature request ;-)&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;-&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20883010-5044929671464618232?l=www.cassidy.dk%2Fblog%2Fsitecore%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/5044929671464618232/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20883010&amp;postID=5044929671464618232' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/5044929671464618232'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/5044929671464618232'/><link rel='alternate' type='text/html' href='http://www.cassidy.dk/blog/sitecore/2009/06/just-because-you-can-doesnt-mean-you.html' title='Just because you can doesn’t mean you should'/><author><name>Mark Cassidy</name><uri>http://www.blogger.com/profile/07054254475245848945</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03182104182261746826'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20883010.post-1497490738741821502</id><published>2009-05-15T00:37:00.001+01:00</published><updated>2009-05-15T00:37:43.747+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Link Database'/><category scheme='http://www.blogger.com/atom/ns#' term='DomainObjects'/><category scheme='http://www.blogger.com/atom/ns#' term='Sitecore'/><title type='text'>Listing “Related Articles” with Sitecore using the LinkDatabase</title><content type='html'>&lt;p&gt;Seems I am on a writing streak this week. Am taking a week off, you see, from my normal everyday Sitecore Consulting, and seem to have a bit of time on my hands to catch up on some of all the posts I’ve been meaning to write for a while. Don’t worry; after this I will probably be way too busy again for a while to find time to post ;-)&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;So I catching up on &lt;a title="Link to StackOverflow.com" href="http://stackoverflow.com"&gt;StackOverflow&lt;/a&gt; the other day, and an interesting question was posed; “&lt;a title="How to find related items by tags in Lucene.NET" href="http://stackoverflow.com/questions/848229/how-to-find-related-items-by-tags-in-lucene-net"&gt;How to find related items by tags in Lucene.NET&lt;/a&gt;”.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;And while there probably IS a way to actually do this with Lucene.NET; I remember my initial thought was “but why go through all the hassle of configuring and setting it up to do this?”. Not only would it matter things from an Operations point of view; it would require more code and more code that was completely dependant on specific configuration settings in the Lucene indexes.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Now, let me be very clear, I am no big expert on Lucene. There are many of you out there who know it well, and would probably be able to cook up a solution to answer the guys question using it. As for myself, I try to keep as much arcane configuration out of any project I am involved in – especially to solve a problem such as this, where Sitecore pretty much gives you the tools you need to solve it straight out of the box.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;So anyway. Guy was asking in a Lucene context, but was looking for proposals. And I decided to give it a whirl, mocked up some pseudo code to solve the problem, and that was that. But see; everyone can write pseudo-code :P&amp;nbsp;&amp;nbsp; And it’s only fair I put my err… code where my mouth is, and write up a real example of how this can be achieved in a manner I explained. Here goes.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;h2&gt;Setting it up in Sitecore&lt;/h2&gt; &lt;p&gt;I start by making up two templates:&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;1) “Simple Value”, which will be used to organise the meta tags I will be drawing upon.&lt;/p&gt; &lt;p&gt;It has no fields.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;2) “Article”, which I will use to demonstrate how to implement “Related Articles” functionality.&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_7sFzy9-mI1g/SgyrQTufi6I/AAAAAAAAAE8/G9dq-cEScg0/s1600-h/image%5B2%5D.png"&gt;&lt;img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="74" alt="image" src="http://lh4.ggpht.com/_7sFzy9-mI1g/SgyrQ4jk5JI/AAAAAAAAAFA/FBPsYXvGJk8/image_thumb.png?imgmax=800" width="244" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;I then set up a meta-structure that I will be using to tag up my articles, and ultimately draw out related articles. I don’t fill out the entire structure, nor do I mean to imply this structure is perfect. But it is enough to demonstrate the point, and should be easy enough to follow. All the tags are based on the “Simple Value” template.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_7sFzy9-mI1g/SgyrRejBc_I/AAAAAAAAAFE/7OW1TIuzjfM/s1600-h/image%5B5%5D.png"&gt;&lt;img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="244" alt="image" src="http://lh6.ggpht.com/_7sFzy9-mI1g/SgyrRibnV3I/AAAAAAAAAFI/2oYrcICyAPA/image_thumb%5B1%5D.png?imgmax=800" width="101" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;After this, I go through the somewhat tedious task of setting up a number of articles that are tagged in different ways.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;For now, I type and tag in 7 articles; like this:&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Name: Ben Hur&lt;/p&gt; &lt;p&gt;Tags: O2 Arena, Theatre&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Name: Britney Spears&lt;/p&gt; &lt;p&gt;Tags: O2 Arena, Pop, Concert&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Name: Depeche Mode&lt;/p&gt; &lt;p&gt;Tags: O2 Arena, Alternative, Concert&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Name: Michael Jackson&lt;/p&gt; &lt;p&gt;Tags: O2 Arena, Pop, Concert&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Name: Nickelback&lt;/p&gt; &lt;p&gt;Tags: O2 Arena, Rock, Concert&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Name: Pet Shop Boys&lt;/p&gt; &lt;p&gt;Tags: O2 Arena, Pop, Concert&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Name: War of the Worlds&lt;/p&gt; &lt;p&gt;Tags: O2 Arena, Theatre&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;I should probably go on for a while longer if I really wanted to go all-out in demonstrating this. However, I do have enough now, and it’ll have to do. I hate typing in test data ;-)&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Before I go on, I should explain exactly how I intend to deduce what “related articles” should be. It can be done and determined in many ways – but I am proceeding exactly in the manner that was originally in question on StackOverflow. The rule can be described as two statements:&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;1) An article is related if it shares one or more tags with the source article&lt;/p&gt; &lt;p&gt;2) The more tags it shares, the more relevant it becomes (i.e. should appear higher on the list)&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Lastly, I set up a blank .ASPX page in my webroot named “TestRelated.aspx”, and I quickly mock up two &lt;a title="Link to the Trac homespace for CorePoint.DomainObjects" href="http://trac.sitecore.net/DomainObjects"&gt;DomainObjects&lt;/a&gt; that I will build upon for this functionality.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;SimpleValue.cs&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;using &lt;/span&gt;CorePoint.DomainObjects.SC;
&lt;span style="color: blue"&gt;using &lt;/span&gt;CorePoint.DomainObjects;

&lt;span style="color: blue"&gt;namespace &lt;/span&gt;Website.Related
{
    [&lt;span style="color: #2b91af"&gt;Template&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"user defined/simple value"&lt;/span&gt;)]
    &lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;SimpleValue &lt;/span&gt;: &lt;span style="color: #2b91af"&gt;StandardTemplate
    &lt;/span&gt;{
    }
}
&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Article.cs&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;using &lt;/span&gt;System;
&lt;span style="color: blue"&gt;using &lt;/span&gt;System.Collections.Generic;
&lt;span style="color: blue"&gt;using &lt;/span&gt;CorePoint.DomainObjects.SC;
&lt;span style="color: blue"&gt;using &lt;/span&gt;CorePoint.DomainObjects;

&lt;span style="color: blue"&gt;namespace &lt;/span&gt;Website.Related
{
    [&lt;span style="color: #2b91af"&gt;Template&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"user defined/article"&lt;/span&gt;)]
    &lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Article &lt;/span&gt;: &lt;span style="color: #2b91af"&gt;StandardTemplate
    &lt;/span&gt;{
        [&lt;span style="color: #2b91af"&gt;Field&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"title"&lt;/span&gt;)]
        &lt;span style="color: blue"&gt;public string &lt;/span&gt;Title { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }

        [&lt;span style="color: #2b91af"&gt;Field&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"text"&lt;/span&gt;)]
        &lt;span style="color: blue"&gt;public string &lt;/span&gt;Text { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }

        [&lt;span style="color: #2b91af"&gt;Field&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"tags"&lt;/span&gt;)]
        &lt;span style="color: blue"&gt;public &lt;/span&gt;&lt;span style="color: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;Guid&lt;/span&gt;&amp;gt; Tags { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }
    }
}
&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;And finally, in my TestRelated.aspx.cs, I add a bit of code to test that everything is as expected.&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public partial class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;TestRelated &lt;/span&gt;: System.Web.UI.&lt;span style="color: #2b91af"&gt;Page
&lt;/span&gt;{
    &lt;span style="color: blue"&gt;protected void &lt;/span&gt;Page_Load( &lt;span style="color: blue"&gt;object &lt;/span&gt;sender, &lt;span style="color: #2b91af"&gt;EventArgs &lt;/span&gt;e )
    {
        &lt;span style="color: blue"&gt;var &lt;/span&gt;director = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;SCDirector&lt;/span&gt;();

        &lt;span style="color: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;Article&lt;/span&gt;&amp;gt; articles = director.GetChildObjects&amp;lt;&lt;span style="color: #2b91af"&gt;Article&lt;/span&gt;&amp;gt;( &lt;span style="color: #a31515"&gt;"/sitecore/content/global/articles" &lt;/span&gt;);
        &lt;span style="color: blue"&gt;foreach &lt;/span&gt;( &lt;span style="color: #2b91af"&gt;Article &lt;/span&gt;article &lt;span style="color: blue"&gt;in &lt;/span&gt;articles )
        {
            &lt;span style="color: green"&gt;// Get the SimpleValues (name) from the tag Guids
            &lt;/span&gt;&lt;span style="color: blue"&gt;var &lt;/span&gt;simpleValues = article.Tags.ConvertAll&amp;lt;&lt;span style="color: blue"&gt;string&lt;/span&gt;&amp;gt;( a =&amp;gt; 
                        { 
                            &lt;span style="color: blue"&gt;return &lt;/span&gt;director.GetObjectByIdentifier&amp;lt;&lt;span style="color: #2b91af"&gt;SimpleValue&lt;/span&gt;&amp;gt;( a ).Name; 
                        } );
            &lt;span style="color: #2b91af"&gt;StringBuilder &lt;/span&gt;sb = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;StringBuilder&lt;/span&gt;();
            simpleValues.ForEach( sv =&amp;gt; sb.Append( sv + &lt;span style="color: #a31515"&gt;' ' &lt;/span&gt;) );

            Response.Write( &lt;span style="color: blue"&gt;string&lt;/span&gt;.Format(
                             &lt;span style="color: #a31515"&gt;"Name: {0}&amp;lt;br /&amp;gt;Tags: {1}&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;"&lt;/span&gt;,
                             article.Name,
                             sb.ToString() ) );
        }
    }
}
&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So far so good. I run the code, and I get a replica of the list I already showed:&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &lt;p&gt;Name: Ben Hur&lt;br&gt;Tags: O2 Arena Theater &lt;br&gt;Name: Britney Spears&lt;br&gt;Tags: Pop Concert O2 Arena &lt;br&gt;Name: Depeche Mode&lt;br&gt;Tags: O2 Arena Concert Alternative &lt;br&gt;Name: Michael Jackson&lt;br&gt;Tags: Pop Concert O2 Arena &lt;br&gt;Name: Nickelback&lt;br&gt;Tags: Rock Concert O2 Arena &lt;br&gt;Name: Pet Shop Boys&lt;br&gt;Tags: O2 Arena Concert Pop &lt;br&gt;Name: War of the Worlds&lt;br&gt;Tags: O2 Arena Musical 
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Excellent. After all this, I am now ready to proceed to the good stuff ;-)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;Finding Related Articles using the Sitecore LinkDatabase&lt;/h2&gt;
&lt;p&gt;Having an Article entity in place, makes this an obvious place to add functionality such as Related Articles. I could either add it as a Lazy Load property named “Related Articles”, or I could write a method named “GetRelatedArticles()”. This is mostly down to aesthetics and practices; personally I prefer the first option.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I expand the Article.cs with a little bit of code. The original pseudo-code I suggested, is entered in comments, for reference.&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;private int &lt;/span&gt;_referenceCount;
&lt;span style="color: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;Article&lt;/span&gt;&amp;gt; _RelatedArticles = &lt;span style="color: blue"&gt;null&lt;/span&gt;;
&lt;span style="color: blue"&gt;public &lt;/span&gt;&lt;span style="color: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;Article&lt;/span&gt;&amp;gt; RelatedArticles
{
    &lt;span style="color: blue"&gt;get
    &lt;/span&gt;{
        &lt;span style="color: blue"&gt;if &lt;/span&gt;( _RelatedArticles == &lt;span style="color: blue"&gt;null &lt;/span&gt;)
        {
            _RelatedArticles = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;Article&lt;/span&gt;&amp;gt;();
            &lt;span style="color: blue"&gt;var &lt;/span&gt;referenceCount = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Dictionary&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;Guid&lt;/span&gt;, &lt;span style="color: blue"&gt;int&lt;/span&gt;&amp;gt;();

            &lt;span style="color: green"&gt;// for each ID in tags
            &lt;/span&gt;&lt;span style="color: blue"&gt;foreach &lt;/span&gt;( &lt;span style="color: #2b91af"&gt;Guid &lt;/span&gt;id &lt;span style="color: blue"&gt;in &lt;/span&gt;Tags )
            {
                &lt;span style="color: blue"&gt;var &lt;/span&gt;sv = Director.GetObjectByIdentifier&amp;lt;&lt;span style="color: #2b91af"&gt;SimpleValue&lt;/span&gt;&amp;gt;( id );

                &lt;span style="color: green"&gt;// Personal note: In this particular instance, performance
                // could be gained here, but not loading up full articles
                // via DomainObjects but hitting the LinkDatabase directly instead

                // get all documents referencing this tag
                &lt;/span&gt;&lt;span style="color: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;Article&lt;/span&gt;&amp;gt; articles = sv.GetReferrers&amp;lt;&lt;span style="color: #2b91af"&gt;Article&lt;/span&gt;&amp;gt;();

                &lt;span style="color: green"&gt;// for each document found
                &lt;/span&gt;articles.ForEach( a =&amp;gt;
                    {
                        &lt;span style="color: blue"&gt;if &lt;/span&gt;( a.Id != Id )
                        {
                            &lt;span style="color: green"&gt;// if master-list contains document; 
                            &lt;/span&gt;&lt;span style="color: blue"&gt;if &lt;/span&gt;( referenceCount.ContainsKey( a.Id ) )
                                referenceCount[ a.Id ]++; &lt;span style="color: green"&gt;// increase usage-count
                            &lt;/span&gt;&lt;span style="color: blue"&gt;else &lt;/span&gt;&lt;span style="color: green"&gt;// else; 
                                // add document to master list
                                &lt;/span&gt;referenceCount[ a.Id ] = 1;
                        }
                    } );
            }

            &lt;span style="color: green"&gt;// Now we have a list of all the relevant guids being referenced on all tags
            // on this article. Load them up, and stamp them with the reference count
            &lt;/span&gt;&lt;span style="color: blue"&gt;foreach &lt;/span&gt;( &lt;span style="color: blue"&gt;var &lt;/span&gt;key &lt;span style="color: blue"&gt;in &lt;/span&gt;referenceCount.Keys )
            {
                &lt;span style="color: blue"&gt;var &lt;/span&gt;relatedArticle = Director.GetObjectByIdentifier&amp;lt;&lt;span style="color: #2b91af"&gt;Article&lt;/span&gt;&amp;gt;( key );
                relatedArticle._referenceCount = referenceCount[ key ];
                _RelatedArticles.Add( relatedArticle );
            }
            
            &lt;span style="color: green"&gt;// sort master-list by usage-count descending
            &lt;/span&gt;_RelatedArticles.Sort( ( a, b ) =&amp;gt; b._referenceCount.CompareTo( a._referenceCount ) );
        }

        &lt;span style="color: blue"&gt;return &lt;/span&gt;_RelatedArticles;
    }
}
&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;And to test if what I’m getting from this is what I expect, I also add some code to my TestRelated.aspx so it becomes:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;protected void &lt;/span&gt;Page_Load( &lt;span style="color: blue"&gt;object &lt;/span&gt;sender, &lt;span style="color: #2b91af"&gt;EventArgs &lt;/span&gt;e )
{
    &lt;span style="color: blue"&gt;var &lt;/span&gt;director = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;SCDirector&lt;/span&gt;();

    &lt;span style="color: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;Article&lt;/span&gt;&amp;gt; articles = director.GetChildObjects&amp;lt;&lt;span style="color: #2b91af"&gt;Article&lt;/span&gt;&amp;gt;( &lt;span style="color: #a31515"&gt;"/sitecore/content/global/articles" &lt;/span&gt;);
    &lt;span style="color: blue"&gt;foreach &lt;/span&gt;( &lt;span style="color: #2b91af"&gt;Article &lt;/span&gt;article &lt;span style="color: blue"&gt;in &lt;/span&gt;articles )
    {
        &lt;span style="color: green"&gt;// Get the SimpleValues (name) from the tag Guids
        &lt;/span&gt;&lt;span style="color: blue"&gt;var &lt;/span&gt;simpleValues = article.Tags.ConvertAll&amp;lt;&lt;span style="color: blue"&gt;string&lt;/span&gt;&amp;gt;( a =&amp;gt; 
                    { 
                        &lt;span style="color: blue"&gt;return &lt;/span&gt;director.GetObjectByIdentifier&amp;lt;&lt;span style="color: #2b91af"&gt;SimpleValue&lt;/span&gt;&amp;gt;( a ).Name; 
                    } );
        &lt;span style="color: #2b91af"&gt;StringBuilder &lt;/span&gt;sb = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;StringBuilder&lt;/span&gt;();
        simpleValues.ForEach( sv =&amp;gt; sb.Append( sv + &lt;span style="color: #a31515"&gt;", " &lt;/span&gt;) );

        Response.Write( &lt;span style="color: blue"&gt;string&lt;/span&gt;.Format(
                         &lt;span style="color: #a31515"&gt;"Name: {0}&amp;lt;br /&amp;gt;Tags: {1}&amp;lt;br /&amp;gt;Related Articles: "&lt;/span&gt;,
                         article.Name,
                         sb.ToString() ) );

        article.RelatedArticles.ForEach( ra =&amp;gt;
                Response.Write( &lt;span style="color: blue"&gt;string&lt;/span&gt;.Format( &lt;span style="color: #a31515"&gt;"{0},"&lt;/span&gt;, ra.Name ) ) );

        Response.Write( &lt;span style="color: #a31515"&gt;"&amp;lt;hr /&amp;gt;" &lt;/span&gt;);
    }
}
&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;And after all this, I am pleased to find a result looking like:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Name: Ben Hur&lt;br&gt;Tags: O2 Arena, Theater, &lt;br&gt;Related Articles: Michael Jackson,Britney Spears,Depeche Mode,Nickelback,Pet Shop Boys,War of the Worlds, 
&lt;hr&gt;
&lt;strong&gt;Name: Britney Spears&lt;br&gt;Tags: Pop, Concert, O2 Arena, &lt;br&gt;Related Articles: &lt;u&gt;Michael Jackson&lt;/u&gt;,&lt;u&gt;Pet Shop Boys&lt;/u&gt;,Depeche Mode,Nickelback,Ben Hur,War of the Worlds, &lt;/strong&gt;
&lt;hr&gt;
Name: Depeche Mode&lt;br&gt;Tags: O2 Arena, Concert, Alternative, &lt;br&gt;Related Articles: Britney Spears,Michael Jackson,Nickelback,Pet Shop Boys,War of the Worlds,Ben Hur, 
&lt;hr&gt;
&lt;strong&gt;Name: Michael Jackson&lt;br&gt;Tags: Pop, Concert, O2 Arena, &lt;br&gt;Related Articles: &lt;u&gt;Britney Spears&lt;/u&gt;,&lt;u&gt;Pet Shop Boys&lt;/u&gt;,Depeche Mode,Nickelback,Ben Hur,War of the Worlds, &lt;/strong&gt;
&lt;hr&gt;
Name: Nickelback&lt;br&gt;Tags: Rock, Concert, O2 Arena, &lt;br&gt;Related Articles: Britney Spears,Depeche Mode,Pet Shop Boys,Michael Jackson,Ben Hur,War of the Worlds, 
&lt;hr&gt;
&lt;strong&gt;Name: Pet Shop Boys&lt;br&gt;Tags: O2 Arena, Concert, Pop, &lt;br&gt;Related Articles: &lt;u&gt;Britney Spears&lt;/u&gt;,&lt;u&gt;Michael Jackson&lt;/u&gt;,Depeche Mode,Nickelback,War of the Worlds,Ben Hur, &lt;/strong&gt;
&lt;hr&gt;
Name: War of the Worlds&lt;br&gt;Tags: O2 Arena, Musical, &lt;br&gt;Related Articles: Ben Hur,Britney Spears,Depeche Mode,Nickelback,Pet Shop Boys,Michael Jackson, 
&lt;hr&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The first thing that strikes me is; my meta data and test data probably aren’t extensive enough to really see this functionality in full effect. They all look almost the same.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;However, I can determine that it works as expected. “Britney Spears”, “Michael Jackson” and “Pet Shop Boys” all share the same 3 meta tags. They SHOULD in all instances suggest the “one left out” on top of the list as “Related Articles”.&amp;nbsp; And they all do; I’ve marked them in bold and underline.&amp;nbsp; Also note that the “Depeche Mode” concert in O2 Arena lists other concerts (although of different music genre) before it proceeds to list the musicals and theatre plays.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It works :-)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;A few notes on performance&lt;/h2&gt;
&lt;p&gt;In this post, I’ve deliberately not focused excessively on performance implications. Don’t worry – it’s not at all bad. But in “real life”; there are still obvious places in this code where you could potentially gain a significant amount of performance. As everyone will know; I/O operations are by an order of magnitude some of the most expensive calls we can make, and there is definitely a few places you could set in here.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;A few suggestions I would look into if I were to take this code live:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Code up a TagController; that will eventually act as a cache for all the tags in your solution. Load up the tags only once, and don’t repeatedly re-load them in your loops. 
&lt;li&gt;In this case, bypass the very convenient .GetReferrers() method provided by DomainObjects and go through the extra work of working with the LinkDatabase directly yourself. For this part of the algorithm (counting up how many times a given ID is referencing your tag), you don’t really need to load up the Sitecore Item – something .GetReferrers() will automatically do. I will put this on the TODO list for DomainObjects. 
&lt;li&gt;And – as ALWAYS – don’t forget to configure caching for whatever sublayouts and/or user controls you are calling this functionality on.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;That’s it for this time. I hope you found this useful&amp;nbsp; :-)&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20883010-1497490738741821502?l=www.cassidy.dk%2Fblog%2Fsitecore%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/1497490738741821502/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20883010&amp;postID=1497490738741821502' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/1497490738741821502'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/1497490738741821502'/><link rel='alternate' type='text/html' href='http://www.cassidy.dk/blog/sitecore/2009/05/listing-related-articles-with-sitecore.html' title='Listing “Related Articles” with Sitecore using the LinkDatabase'/><author><name>Mark Cassidy</name><uri>http://www.blogger.com/profile/07054254475245848945</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03182104182261746826'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20883010.post-8066399257320925910</id><published>2009-05-13T01:04:00.001+01:00</published><updated>2009-05-13T01:04:35.981+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sitecore 6'/><category scheme='http://www.blogger.com/atom/ns#' term='Configuration'/><category scheme='http://www.blogger.com/atom/ns#' term='Sitecore'/><title type='text'>Working with web.config include files in Sitecore 6</title><content type='html'>&lt;p&gt;In my previous post about &lt;a title="Working with multiple content databases" href="http://www.cassidy.dk/blog/sitecore/2009/05/working-with-multiple-content-databases.html"&gt;Working with multiple content databases&lt;/a&gt;; Lars Floe Nielsen made a comment about something I’ve been meaning to write about for a long time.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Configuration files. Such a pain, aren’t they?&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Anyone who has ever stepped through 6 Sitecore upgrades and meticulously stepped through the web.config change instructions line by line will know what I mean. Would be so much easier to just &lt;em&gt;replace&lt;/em&gt; your web.config with the one matching the latest Sitecore version you were upgrading to.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Or what about your environments?&amp;nbsp;&amp;nbsp; Dev environment, Staging environment, Live environment, Slave server environment?&amp;nbsp;&amp;nbsp; All with different configuration settings. This has already &lt;a title="Multi environment config" href="http://adeneys.wordpress.com/2009/04/17/multi-environment-config/"&gt;been blogged about&lt;/a&gt;, and I am not going to dig particularly deep into this topic in this post.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Starting from Sitecore 6 (actually, V5, but I’ve had a very hard time tracking more information down on it than can be found in &lt;a title="Configuration Changes in 5.3" href="http://alexeyrusakov.com/sitecoreblog/2006/10/04/Configuration+Changes+In+53.aspx"&gt;Alexeys post on the matter&lt;/a&gt;), Sitecore actually introduced a really neat new functionality. It’s called “Web Config Patching”, but to be honest I don’t personally like the term “patching” being used in this context, even if this IS technically what the functionality does.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;So far, I have not really been able to locate much in terms of official documentation on this subject (&lt;a title="Search SDN for config include" href="http://sdn.sitecore.net/searchresult.aspx?q=config%20include"&gt;searching SDN&lt;/a&gt; directly provides very few clues), so most of my knowledge on it comes from personal experience, chatting with other Sitecore consultants/investigators, studying other configuration include files and spiced with generous dosages of Reflector.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;In the “&lt;a title="What's new in Sitecore 6" href="http://sdn5.sitecore.net/upload/sitecore6/whatsnew-a4.pdf"&gt;What’s new&lt;/a&gt;” released for Sitecore 6, the functionality gets the following mention:&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;“Previous versions of Sitecore CMS forced administrators to make direct changes to configuration settings in the web.config file manually. This led to challenges locating local configuration changes as opposed to modifications made by Sitecore when upgrading to a new version of Sitecore. Sitecore 6 offers a smart solution: web.config modifications can now be made in a separate XML file, stored under the /App_Config/Include folder, which Sitecore reads in at startup time after loading the web.config file. The folder contains several example files which illustrate how to use this feature. The Sitecore 6 configuration factory reads the include config files”&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;The information appears out of date however, and no such “example files” can be found in any version of Sitecore 6 I have had my hands on.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Anyway. On we go.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;h2&gt;So how and where does it work?&lt;/h2&gt; &lt;p&gt;To make good use of config includes, one must first understand how Sitecore implements it. And to get some idea of this, one must know a little bit about how a web.config file is organised.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;If you open up a standard Sitecore web.config and look near the top, the first thing you will see will be looking something like this:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color: #a31515"&gt;xml &lt;/span&gt;&lt;span style="color: red"&gt;version&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;1.0&lt;/span&gt;" &lt;span style="color: red"&gt;encoding&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;utf-8&lt;/span&gt;"&lt;span style="color: blue"&gt;?&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;configuration&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;configSections&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;section &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;sitecore&lt;/span&gt;" &lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;Sitecore.Configuration.ConfigReader, Sitecore.Kernel&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;section &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;log4net&lt;/span&gt;" &lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;log4net.Config.Log4NetConfigurationSectionHandler, 
                                  Sitecore.Logging&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;sectionGroup &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;system.web.extensions&lt;/span&gt;" &lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;System.Web.Configuration.SystemWebExtensionsSectionGroup, 
                                                     System.Web.Extensions, Version=3.5.0.0, Culture=neutral, 
                                                     PublicKeyToken=31BF3856AD364E35&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;
      &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;sectionGroup &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;scripting&lt;/span&gt;" &lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;System.Web.Configuration.ScriptingSectionGroup, 
                                           System.Web.Extensions, Version=3.5.0.0, Culture=neutral, 
                                           PublicKeyToken=31BF3856AD364E35&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;section &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;scriptResourceHandler&lt;/span&gt;" &lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;System.Web.Configuration.ScriptingScriptResourceHandlerSection, 
                                                    System.Web.Extensions, Version=3.5.0.0, Culture=neutral, 
                                                    PublicKeyToken=31BF3856AD364E35&lt;/span&gt;" 
                 &lt;span style="color: red"&gt;requirePermission&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;false&lt;/span&gt;" &lt;span style="color: red"&gt;allowDefinition&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;MachineToApplication&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;sectionGroup &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;webServices&lt;/span&gt;" &lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;System.Web.Configuration.ScriptingWebServicesSectionGroup, 
                                               System.Web.Extensions, Version=3.5.0.0, Culture=neutral, 
                                               PublicKeyToken=31BF3856AD364E35&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;
          &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;section &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;jsonSerialization&lt;/span&gt;" &lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;System.Web.Configuration.ScriptingJsonSerializationSection, 
                                                  System.Web.Extensions, Version=3.5.0.0, Culture=neutral, 
                                                  PublicKeyToken=31BF3856AD364E35&lt;/span&gt;" 
                   &lt;span style="color: red"&gt;requirePermission&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;false&lt;/span&gt;" &lt;span style="color: red"&gt;allowDefinition&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;Everywhere&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;
          &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;section &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;profileService&lt;/span&gt;" &lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;System.Web.Configuration.ScriptingProfileServiceSection, 
                                               System.Web.Extensions, Version=3.5.0.0, Culture=neutral, 
                                               PublicKeyToken=31BF3856AD364E35&lt;/span&gt;" 
                   &lt;span style="color: red"&gt;requirePermission&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;false&lt;/span&gt;" &lt;span style="color: red"&gt;allowDefinition&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;MachineToApplication&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;
          &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;section &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;authenticationService&lt;/span&gt;" &lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;System.Web.Configuration.ScriptingAuthenticationServiceSection, 
                                                      System.Web.Extensions, Version=3.5.0.0, Culture=neutral, 
                                                      PublicKeyToken=31BF3856AD364E35&lt;/span&gt;" 
                   &lt;span style="color: red"&gt;requirePermission&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;false&lt;/span&gt;" &lt;span style="color: red"&gt;allowDefinition&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;MachineToApplication&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;
          &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;section &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;roleService&lt;/span&gt;" &lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;System.Web.Configuration.ScriptingRoleServiceSection, 
                                            System.Web.Extensions, Version=3.5.0.0, Culture=neutral, 
                                            PublicKeyToken=31BF3856AD364E35&lt;/span&gt;" 
                   &lt;span style="color: red"&gt;requirePermission&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;false&lt;/span&gt;" &lt;span style="color: red"&gt;allowDefinition&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;MachineToApplication&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;
        &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;sectionGroup&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
      &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;sectionGroup&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;sectionGroup&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;configSections&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What is declared here, are the different Configuration Sections that ASP.NET can expect to find in the configuration file. Some of them are there to support ASP.NET, and some of them are put in there by Sitecore. You can learn more about the &lt;a title="Format of ASP.NET Configuration Files" href="http://msdn.microsoft.com/en-us/library/ackhksh7(vs.71).aspx"&gt;format of ASP.NET configuration files here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Basically, what this then means is, that various “top level” configuration sections can be expected to appear in the web.config file we are looking at, and ASP.NET will (via the “type” attribute) know how to parse them. For normal every day use, most of us have probably been able to just use &amp;lt;appSettings&amp;gt; for whatever configuration we needed – but for configuring a complex application such as Sitecore, this just won’t be enough. Fortunately this is why ASP.NET allows us to create our &lt;a title="Creating New Configuration Sections" href="http://msdn.microsoft.com/en-us/library/2tw134k3(VS.71).aspx"&gt;own configuration sections with our own configuration handlers&lt;/a&gt;; and that is exactly what Sitecore has been doing for a very long time.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Now. Keeping in mind what I wrote above; Sitecore came up with a system that allows the include of configuration files. Tying that into what we just learned; to find and use this functionality we must then look in the config section that Sitecore provides. Not surprisingly, this section is called &amp;lt;sitecore&amp;gt; and this is where you configure the vast majority of what you need to do, to get your Sitecore installation up and running the way you want it.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;u&gt;Config Include only works in this configuration section&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;First thing to keep in mind, when using this technology.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This means it won’t work for &amp;lt;appSetting&amp;gt; configuration settings. Don’t worry about it – Sitecore has a perfectly good replacement for it; I’ll demonstrate in a bit.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;How to set it up?&lt;/h2&gt;
&lt;p&gt;Here’s a bit of good news. There’s nothing really to set up. Sitecore comes with this functionality enabled out of the box, and all you need to do is to tap into it and use it.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you open up Windows Explorer and navigate to /Website/App_Config/Include, you will (probably) find an empty folder. This is a directory that Sitecore is actively watching, for any additions &lt;em&gt;or changes&lt;/em&gt; to it’s base web.config file. Remember I said how it was not fully correct to call this “config include”?&amp;nbsp; This is because Sitecore actually offers more than just including more configuration files; it also allows you to &lt;em&gt;edit existing configuration data defined in web.config&lt;/em&gt;. As long as it sits in the &amp;lt;sitecore&amp;gt; section :-)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;As so often before when I am testing something; I create a new .ASPX file (with codebehinds) in the root of my website; I name it “TestInclude.aspx”, and I type the following code into the class Visual Studio generates for me:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public partial class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;TestInclude &lt;/span&gt;: System.Web.UI.&lt;span style="color: #2b91af"&gt;Page
&lt;/span&gt;{
    &lt;span style="color: blue"&gt;protected void &lt;/span&gt;Page_Load( &lt;span style="color: blue"&gt;object &lt;/span&gt;sender, &lt;span style="color: #2b91af"&gt;EventArgs &lt;/span&gt;e )
    {
        Response.Write( &lt;span style="color: #a31515"&gt;"The value of setting 'TestInclude' is: " &lt;/span&gt;+ 
                        Sitecore.Configuration.&lt;span style="color: #2b91af"&gt;Settings&lt;/span&gt;.GetSetting( &lt;span style="color: #a31515"&gt;"TestInclude"&lt;/span&gt;, &lt;span style="color: #a31515"&gt;"Undefined" &lt;/span&gt;) );
    }
}
&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;At this point, the result I get when running the page is entirely as expected; “The value of setting 'TestInclude' is: Undefined”&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Notice how the Sitecore API equivalent is much more elegant than the ASP.NET standard handling which would achieve the above in the &amp;lt;appSettings&amp;gt; section.&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;string &lt;/span&gt;val;
&lt;span style="color: blue"&gt;if &lt;/span&gt;( System.Configuration.&lt;span style="color: #2b91af"&gt;ConfigurationManager&lt;/span&gt;.AppSettings[ &lt;span style="color: #a31515"&gt;"TestInclude" &lt;/span&gt;] != &lt;span style="color: blue"&gt;null &lt;/span&gt;)
    val = System.Configuration.&lt;span style="color: #2b91af"&gt;ConfigurationManager&lt;/span&gt;.AppSettings[ &lt;span style="color: #a31515"&gt;"TestInclude" &lt;/span&gt;];
&lt;span style="color: blue"&gt;else
    &lt;/span&gt;val = &lt;span style="color: #a31515"&gt;"Undefined"&lt;/span&gt;;
&lt;/pre&gt;
&lt;p&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;But we’re not there yet. I then proceed to create a “New File” in the folder I mentioned above; /App_Config/Include and name it “TestInclude.config”&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color: #a31515"&gt;xml &lt;/span&gt;&lt;span style="color: red"&gt;version&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;1.0&lt;/span&gt;" &lt;span style="color: red"&gt;encoding&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;utf-8&lt;/span&gt;" &lt;span style="color: blue"&gt;?&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;configuration &lt;/span&gt;&lt;span style="color: red"&gt;xmlns:patch&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;http://www.sitecore.net/xmlconfig/&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;sitecore&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;settings&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
      &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;setting &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;TestInclude&lt;/span&gt;" &lt;span style="color: red"&gt;value&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;This value comes from TestInclude.config&lt;/span&gt;"&lt;span style="color: blue"&gt;/&amp;gt;
    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;settings&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;sitecore&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;configuration&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;I run my .ASPX page again; and this time I get the result I was hoping for. “The value of setting 'TestInclude' is: This value comes from TestInclude.config”.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Great! :-)&amp;nbsp; Things are working as expected. And I now have my own configuration files in a nice isolated area that can be easily packaged and deployed WITHOUT needing to worry (much) about the version of Sitecore that may be in place; and without needing to touch the original web.config in any way what so ever.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;There’s another benefit; or at least in a majority of cases this is a benefit. Making modifications to your config include files take effect (almost) instantly and &lt;em&gt;do not recycle your application pool&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;u&gt;Updating your config files will not force your website to reset&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Another important fact to keep in mind. For better and (sometimes) for worse.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Notice how this is not limited to work with only &amp;lt;settings&amp;gt;. Anything in the Sitecore configuration structure can be added in your include file. If I wanted to add a new XSL helper, for instance, I would expand my file like this:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color: #a31515"&gt;xml &lt;/span&gt;&lt;span style="color: red"&gt;version&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;1.0&lt;/span&gt;" &lt;span style="color: red"&gt;encoding&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;utf-8&lt;/span&gt;" &lt;span style="color: blue"&gt;?&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;configuration &lt;/span&gt;&lt;span style="color: red"&gt;xmlns:patch&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;http://www.sitecore.net/xmlconfig/&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;sitecore&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;xslExtensions&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
      &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;extension &lt;/span&gt;&lt;span style="color: red"&gt;mode&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;on&lt;/span&gt;" &lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;CorePoint.XslHelpers.XslHelper, CorePoint.Library&lt;/span&gt;" 
                 &lt;span style="color: red"&gt;namespace&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;http://www.corepoint-it.com/library/xslhelper&lt;/span&gt;" &lt;span style="color: red"&gt;singleInstance&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;true&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;
    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;xslExtensions&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;

    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;settings&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
      &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;setting &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;TestInclude&lt;/span&gt;" &lt;span style="color: red"&gt;value&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;This value comes from TestInclude.config&lt;/span&gt;"&lt;span style="color: blue"&gt;/&amp;gt;
    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;settings&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;sitecore&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;configuration&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;&lt;span style="color: blue"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;One last thing to mention about these include files before proceeding is; you can have as many of them as you like. They need to end in .config, but other than that there are no limitations. You can even create sub folders to your App_Config/Include directory and place your .config files there if you prefer; they too will be picked up by Sitecore’s configuration system.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;More advanced work with your config include files&lt;/h2&gt;
&lt;p&gt;In the example I just went through, I adeptly (or maybe not…) skipped explaining part of the reason the config include file I created looks the way it does. What I did was to work with the include system in it’s simplest form. If you picture in your mind your original web.config file, and then merge my XML on top of it; you have a pretty good idea of what I have just done.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;And this is fine; for settings. After all, a setting is a setting, and it matters not exactly WHERE in the configuration file the setting appears.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;But what about the times when it does matter?&amp;nbsp; Like for Sitecore pipelines for instance; I can assure you the order of which these pipelines executes is NOT irrelevant. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Positioning your configuration within the web.config is fortunately easily achieved. A few examples probably explain it better than I can type myself out of. So here goes.&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color: #a31515"&gt;xml &lt;/span&gt;&lt;span style="color: red"&gt;version&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;1.0&lt;/span&gt;" &lt;span style="color: red"&gt;encoding&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;utf-8&lt;/span&gt;" &lt;span style="color: blue"&gt;?&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;configuration &lt;/span&gt;&lt;span style="color: red"&gt;xmlns:patch&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;http://www.sitecore.net/xmlconfig/&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;sitecore&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;pipelines&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
      &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;httpRequestBegin&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
        &amp;lt;!-- &lt;/span&gt;&lt;span style="color: green"&gt;Insert own pipeline processor as the first element of the pipeline &lt;/span&gt;&lt;span style="color: blue"&gt;--&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;processor &lt;/span&gt;&lt;span style="color: red"&gt;patch:before&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;*[1]&lt;/span&gt;" &lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;CorePoint.Tracking.RequestTracker, CorePoint.Library&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;

        &amp;lt;!-- &lt;/span&gt;&lt;span style="color: green"&gt;Insert own pipeline processor right after the Language Resolver &lt;/span&gt;&lt;span style="color: blue"&gt;--&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;processor &lt;/span&gt;&lt;span style="color: red"&gt;patch:after&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;*[@type='Sitecore.Pipelines.HttpRequest.LanguageResolver, Sitecore.Kernel']&lt;/span&gt;"
                   &lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;CorePoint.Tracking.LanguageTracker, CorePoint.Library&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;
&lt;/span&gt;&lt;span style="color: blue"&gt;      &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;httpRequestBegin&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;pipelines&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;settings&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
      &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;setting &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;TestInclude&lt;/span&gt;" &lt;span style="color: red"&gt;value&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;This value comes from TestInclude.config&lt;/span&gt;"&lt;span style="color: blue"&gt;/&amp;gt;
    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;settings&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;sitecore&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;configuration&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;As you can probably see, fairly advanced stuff can be done with configuration files. Most of this syntax and form I have exclusively from Reflector use, and &lt;strong&gt;&lt;em&gt;I may not have it spot on correct&lt;/em&gt;&lt;/strong&gt;. Finding official documentation on this topic has proven to be next to impossible. Except for lots of references on various comments around the web (recommended practise is to use config includes or “auto-includes” as they are also called) of course – but knowing HOW to use them is what this post is all about :-)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I would love to know how one can:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;font color="#333333"&gt;Remove an existing configuration entirely&lt;/font&gt;&lt;/li&gt;
&lt;li&gt;&lt;font color="#333333"&gt;Replace an existing functionality entirely&lt;/font&gt;&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Both seem possible from digging around in Reflector – but given that this is actually a fairly involved process to test (at 2am in the morning), I chose to let the matter rest for this time. I will get back with an update if and when I learn more.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;In summary&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Configuration include files is probably one of the features I personally like very much from an operational perspective in Sitecore 6&lt;/li&gt;
&lt;li&gt;The functionality is way under-documented; but hopefully now this post can help you get started&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;So please; no more 3-page documents describing how to “merge” your configuration into web.config for &amp;lt;insert your module/functionality name here&amp;gt; :P&lt;/li&gt;&lt;/ul&gt;
&lt;li&gt;You can modify config include files without resetting your website AppPool&lt;/li&gt;
&lt;li&gt;And lastly, it only works in the &amp;lt;sitecore&amp;gt; configuration section. Don’t attempt it for &amp;lt;system.web&amp;gt; or &amp;lt;system.webserver&amp;gt; for instance, it won’t work.&lt;/li&gt;&lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20883010-8066399257320925910?l=www.cassidy.dk%2Fblog%2Fsitecore%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/8066399257320925910/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20883010&amp;postID=8066399257320925910' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/8066399257320925910'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/8066399257320925910'/><link rel='alternate' type='text/html' href='http://www.cassidy.dk/blog/sitecore/2009/05/working-with-webconfig-include-files-in.html' title='Working with web.config include files in Sitecore 6'/><author><name>Mark Cassidy</name><uri>http://www.blogger.com/profile/07054254475245848945</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03182104182261746826'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20883010.post-6527755252267793069</id><published>2009-05-08T17:41:00.001+01:00</published><updated>2009-05-08T17:41:32.654+01:00</updated><title type='text'>Working with multiple content databases in Sitecore 6</title><content type='html'>&lt;p&gt;One of the very neat things about Sitecore, is the way the architecture allows you to mould, shape, and work with the configuration files to come up with an implementation that suits your purpose.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;As the title of this post will suggest, I will be taking a look at Sitecore databases in this post; and how you are free to work with as many of them as you see fit in your projects.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;For sake of argument, let’s say that you were tasked with expanding an existing Sitecore website with a Products database. Potentially, this database would be holding tens-of-thousands of products – at least if you are to believe the PowerPoint slides of sales projections the CEO presented last week ;-)&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Now I KNOW what the first argument would be; “Don’t store in Sitecore. Sitecore is meant to build and store websites, and something as “businessey” as a Products Database has no place there”. I beg to differ however – as long as we’re not assuming there are ERP systems involved; we’re starting entirely from scratch.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;I find, that actually, Sitecore is perfect for the job. Just in short summary, by using Sitecore as our data platform, we get (at the very least) the following handed to us on a silver platter:&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Flexible hierarchical storage structure&lt;/li&gt; &lt;li&gt;Multi-lingual meta data for product descriptions and so on&lt;/li&gt; &lt;li&gt;Built-in advanced media library and media handling&lt;/li&gt; &lt;li&gt;Easily modelled data templates&lt;/li&gt; &lt;li&gt;Standard stuff, like workflows, security and so on&lt;/li&gt; &lt;li&gt;Can be edited and maintained using familiar tools&lt;/li&gt; &lt;ul&gt; &lt;li&gt;Don’t overlook this one. If you place the data in “traditional” SQL tables – YOU are going to need to write an interface that creates, edits and maintains your product data&lt;/li&gt; &lt;li&gt;WHAT are you going to say, when the customer asks for “advanced” stuff such as Workflows, Automatic Image Scaling / Thumbnail creation, granular (field based) security, Publishing functionality, Spell checking… ?&amp;nbsp;&amp;nbsp; Just naming a few here, but let’s not be blind to what Sitecore is offering out of the box&lt;/li&gt; &lt;li&gt;What will it cost?&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;So just bear with me here. Am not saying that every case is a case for data going into Sitecore and “living” there. But what I am saying is, it’s not something that should be discarded as an option without further investigation. Like everything software, there are tradeoffs involved. Make sure you make the right trade.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;h2&gt;Setting it up&lt;/h2&gt; &lt;p&gt;Right. So let’s get started.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;In my example here, I downloaded a fresh copy of &lt;a title="ZIP archive of the Sitecore CMS site root" href="http://sdn.sitecore.net/downloads/sitecore602rev090416.download"&gt;Sitecore 090416&lt;/a&gt; (ZIP archive of the web root, we’re all developers here. The Installer is for marketers ;-))&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;I’m going to be using SQL Server Express, so I get rid of the Oracle and SQL 2000 files. For my Products Database, I will be using the Sitecore “Master” database as a foundation, so I take a copy of the files and rename them like this:&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_7sFzy9-mI1g/SgRgi9dCEHI/AAAAAAAAAC0/71f1VwOvgv0/s1600-h/copy%5B3%5D.png"&gt;&lt;img title="copy" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="95" alt="copy" src="http://lh3.ggpht.com/_7sFzy9-mI1g/SgRgjViN7nI/AAAAAAAAAC4/X3secN8QFus/copy_thumb.png?imgmax=800" width="244" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;And then I proceed to attach them:&lt;/p&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_7sFzy9-mI1g/SgRgjo63neI/AAAAAAAAAC8/E0mSAWuh988/s1600-h/attach%5B3%5D.png"&gt;&lt;img title="attach" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="219" alt="attach" src="http://lh6.ggpht.com/_7sFzy9-mI1g/SgRgj-KidPI/AAAAAAAAADA/SeXW4DEgDFU/attach_thumb.png?imgmax=800" width="244" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;And eventually end up with 4 databases attached, like this:&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_7sFzy9-mI1g/SgRgkJCo8uI/AAAAAAAAADE/4pxHD_yMYMc/s1600-h/databases%5B3%5D.png"&gt;&lt;img title="databases" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="79" alt="databases" src="http://lh6.ggpht.com/_7sFzy9-mI1g/SgRgkhlv43I/AAAAAAAAADI/qSp0--YYq3I/databases_thumb.png?imgmax=800" width="206" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;So far so good. I continue to set up an IIS site for this, and a local host header of “sc090416”. All of this you hopefully know all about, so I won’t go into detail with it here. The point of this post is not basic Sitecore installation – we’re all here to look at databases ;-)&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;A few things that you need to do, which you wouldn’t normally, is to configure our new Products Database in Sitecore. First, open up /Website/App_Config/ConnectionStrings.config and configure the extra database. It could look like this:&lt;/p&gt; &lt;p&gt;&lt;span style="color: blue"&gt;&lt;br&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color: #a31515"&gt;xml &lt;/span&gt;&lt;span style="color: red"&gt;version&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;1.0&lt;/span&gt;" &lt;span style="color: red"&gt;encoding&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;utf-8&lt;/span&gt;"&lt;span style="color: blue"&gt;?&amp;gt;&lt;br&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;connectionStrings&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br&gt;&amp;nbsp; &amp;lt;!-- &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green"&gt;Sitecore connection strings.&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; All database connections for Sitecore are configured here.&lt;br&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue"&gt;--&amp;gt;&lt;br&gt;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;add &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;core&lt;/span&gt;" &lt;span style="color: red"&gt;connectionString&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;user id=sa;password=removed;Data Source=.\SQLEXPRESS;Database=sc090416_Core&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;&lt;br&gt;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;add &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;master&lt;/span&gt;" &lt;span style="color: red"&gt;connectionString&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;user id=sa;password=removed;Data Source=.\SQLEXPRESS;Database=sc090416_Master&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;&lt;br&gt;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;add &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;web&lt;/span&gt;" &lt;span style="color: red"&gt;connectionString&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;user id=sa;password=removed;Data Source=.\SQLEXPRESS;Database=sc090416_Web&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;add &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;products&lt;/span&gt;" &lt;span style="color: red"&gt;connectionString&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;user id=sa;password=removed;Data Source=.\SQLEXPRESS;Database=sc090416_Products&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;&lt;br&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;connectionStrings&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br&gt;&lt;/span&gt;&lt;/p&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt; &lt;p&gt;Very straight forward, so far. But we’re not done yet. Open up Web.Config, look for the &amp;lt;databases&amp;gt; element, and find &amp;lt;!—master —&amp;gt;. For now, just copy the entire section – like this:&lt;/p&gt;&lt;pre class="code"&gt;!      &lt;span style="color: blue"&gt;&amp;lt;!-- &lt;/span&gt;&lt;span style="color: green"&gt;&lt;strong&gt;products&lt;/strong&gt; –&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
!      &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;database &lt;/span&gt;&lt;span style="color: red"&gt;id&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;&lt;strong&gt;products&lt;/strong&gt;&lt;/span&gt;" &lt;span style="color: red"&gt;singleInstance&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;true&lt;/span&gt;" &lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;Sitecore.Data.Database, Sitecore.Kernel&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;param &lt;/span&gt;&lt;span style="color: red"&gt;desc&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;name&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;$(id)&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;param&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;icon&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;People/16x16/cubes_blue.png&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;icon&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;dataProviders &lt;/span&gt;&lt;span style="color: red"&gt;hint&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;list:AddDataProvider&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;
          &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;dataProvider &lt;/span&gt;&lt;span style="color: red"&gt;ref&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;dataProviders/main&lt;/span&gt;" &lt;span style="color: red"&gt;param1&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;$(id)&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;
            &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;prefetch &lt;/span&gt;&lt;span style="color: red"&gt;hint&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;raw:AddPrefetch&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;
              &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;sc.include &lt;/span&gt;&lt;span style="color: red"&gt;file&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;/App_Config/Prefetch/Common.config&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;
              &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;sc.include &lt;/span&gt;&lt;span style="color: red"&gt;file&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;/App_Config/Prefetch/Master.config&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;
            &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;prefetch&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
          &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;dataProvider&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
        &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;dataProviders&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;securityEnabled&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;true&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;securityEnabled&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;proxiesEnabled&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;false&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;proxiesEnabled&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;publishVirtualItems&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;true&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;publishVirtualItems&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;proxyDataProvider &lt;/span&gt;&lt;span style="color: red"&gt;ref&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;proxyDataProviders/main&lt;/span&gt;" &lt;span style="color: red"&gt;param1&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;$(id)&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;workflowProvider &lt;/span&gt;&lt;span style="color: red"&gt;hint&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;defer&lt;/span&gt;" &lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;Sitecore.Workflows.Simple.WorkflowProvider, Sitecore.Kernel&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;
          &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;param &lt;/span&gt;&lt;span style="color: red"&gt;desc&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;database&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;$(id)&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;param&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
          &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;param &lt;/span&gt;&lt;span style="color: red"&gt;desc&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;history store&lt;/span&gt;" &lt;span style="color: red"&gt;ref&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;workflowHistoryStores/main&lt;/span&gt;" &lt;span style="color: red"&gt;param1&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;$(id)&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;
        &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;workflowProvider&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;indexes &lt;/span&gt;&lt;span style="color: red"&gt;hint&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;list:AddIndex&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;
          &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;index &lt;/span&gt;&lt;span style="color: red"&gt;path&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;indexes/index[@id='system']&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;
        &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;indexes&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;archives &lt;/span&gt;&lt;span style="color: red"&gt;hint&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;raw:AddArchive&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;
          &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;archive &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;archive&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;
          &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;archive &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;recyclebin&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;
        &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;archives&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;Engines.HistoryEngine.Storage&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
          &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;obj &lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;Sitecore.Data.$(database).$(database)HistoryStorage, Sitecore.Kernel&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;
            &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;param &lt;/span&gt;&lt;span style="color: red"&gt;connectionStringName&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;$(id)&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;
            &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;EntryLifeTime&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;30.00:00:00&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;EntryLifeTime&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
          &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;obj&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
        &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;Engines.HistoryEngine.Storage&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;Engines.HistoryEngine.SaveDotNetCallStack&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;false&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;Engines.HistoryEngine.SaveDotNetCallStack&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;cacheSizes &lt;/span&gt;&lt;span style="color: red"&gt;hint&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;setting&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;
          &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;data&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;20MB&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;data&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
          &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;items&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;10MB&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;items&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
          &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;paths&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;500KB&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;paths&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
          &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;standardValues&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;500KB&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;standardValues&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
        &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;cacheSizes&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
      &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;database&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Right. The only changes I made to this copy, are marked on the lines with !. Essentially the only thing changing are references to “master” which now become “products”.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;With this change, I am now ready to log into Sitecore for the first time and check that everything is in order.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://lh5.ggpht.com/_7sFzy9-mI1g/SgRglXgv1aI/AAAAAAAAADM/h6ate9Or4D0/s1600-h/products%5B2%5D.png"&gt;&lt;img title="products" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="172" alt="products" src="http://lh4.ggpht.com/_7sFzy9-mI1g/SgRglz2w8kI/AAAAAAAAADQ/bevAWkNZDF4/products_thumb.png?imgmax=800" width="244" border="0"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So far, everything is looking good. Sitecore has recognised my new database. I can switch to it – and you know…&amp;nbsp; it looks just like the “master” database ;-)&amp;nbsp;&amp;nbsp; At this point, this should not really be a surprise.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;Testing it&lt;/h2&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To further test things, I create a couple of content items. In the “master” database, I delete the /Home node, and create:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://lh4.ggpht.com/_7sFzy9-mI1g/SgRgmQoiNvI/AAAAAAAAADU/_AnpcTo3Gek/s1600-h/master%5B3%5D.png"&gt;&lt;img title="master" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="204" alt="master" src="http://lh4.ggpht.com/_7sFzy9-mI1g/SgRgmlv59cI/AAAAAAAAADY/zauL_zWtXOs/master_thumb.png?imgmax=800" width="221" border="0"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I then switch to the “products” database, and create a similar (yet different) folder.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://lh6.ggpht.com/_7sFzy9-mI1g/SgRgm862vdI/AAAAAAAAADc/54l4Cr2Dx4Q/s1600-h/product2%5B3%5D.png"&gt;&lt;img title="product2" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="170" alt="product2" src="http://lh6.ggpht.com/_7sFzy9-mI1g/SgRgnF6hOFI/AAAAAAAAADg/rqH9YVmeS_M/product2_thumb.png?imgmax=800" width="223" border="0"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Time to stop for a minute. Why did I delete /Home?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Well here’s the thing. The Home node that “master” is "born” with, so to speak, is just a placeholder really. At least that’s how I see it. Right now, my concern is, that if we leave the /Home node in both databases – we will have two items in two different databases, but sharing the same ID. What happens if you edit it in one database – should it overwrite changes done in the other?&amp;nbsp; While pursuing this question could be fun – I don’t really think this is a scenario Sitecore will support and I frankly don’t know what would happen. At this point I don’t much care to find out either :P&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So anyway.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have my two new folders, and I do a publish. Now at this point, there are a couple of things you would be expecting to see. Upon switching to the “web” database to have a look, I think I can pretty much guarantee that whatever you were expecting, it wasn’t this:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://lh5.ggpht.com/_7sFzy9-mI1g/SgRgnjZK29I/AAAAAAAAADk/ryZvH7Bya4A/s1600-h/web%5B2%5D.png"&gt;&lt;img title="web" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="193" alt="web" src="http://lh4.ggpht.com/_7sFzy9-mI1g/SgRgoEuLxYI/AAAAAAAAADo/7JJS2-lyq-M/web_thumb.png?imgmax=800" width="244" border="0"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Well ok. To be fair, maybe it was. But of all the things I personally expected when I first tried this, this was not the result I was hoping for and certainly not expecting ;-)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So what is happening here?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I guess, the most accurate answer would be, Sitecore isn’t really designed to work like this. While the concept of multiple databases IS certainly supported – you are supposed to use Proxy items to “merge” all of the data from “extra” databases (like our Products) into the main “master” database and then publish from there.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This doesn’t answer the question however, what IS happening?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Well I started investigating, and the first thing I looked into was the publishItem pipeline. Out of the box, it looks like this:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;publishItem &lt;/span&gt;&lt;span style="color: red"&gt;help&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;Processors should derive from Sitecore.Publishing.Pipelines.PublishItem.PublishItemProcessor&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;processor &lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;Sitecore.Publishing.Pipelines.PublishItem.RaiseProcessingEvent, Sitecore.Kernel&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;processor &lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;Sitecore.Publishing.Pipelines.PublishItem.CheckVirtualItem, Sitecore.Kernel&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;processor &lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;Sitecore.Publishing.Pipelines.PublishItem.CheckSecurity, Sitecore.Kernel&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;processor &lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;Sitecore.Publishing.Pipelines.PublishItem.DetermineAction, Sitecore.Kernel&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;processor &lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;Sitecore.Publishing.Pipelines.PublishItem.PerformAction, Sitecore.Kernel&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;processor &lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;Sitecore.Publishing.Pipelines.PublishItem.RemoveUnknownChildren, Sitecore.Kernel&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;processor &lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;Sitecore.Publishing.Pipelines.PublishItem.MoveItems, Sitecore.Kernel&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;processor &lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;Sitecore.Publishing.Pipelines.PublishItem.RaiseProcessedEvent, Sitecore.Kernel&lt;/span&gt;" &lt;span style="color: red"&gt;runIfAborted&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;true&lt;/span&gt;" &lt;span style="color: blue"&gt;/&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;processor &lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;Sitecore.Publishing.Pipelines.PublishItem.UpdateStatistics, Sitecore.Kernel&lt;/span&gt;" &lt;span style="color: red"&gt;runIfAborted&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;true&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;traceToLog&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;false&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;traceToLog&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;processor&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;publishItem&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;And if going by names is enough (and it is), my suspicion instantly fell on RemoveUnknownChildren. A little work with Reflector quickly reveals what one of the main purposes of this item processor is.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It essentially gets a list of child item IDs in the “source” database and removes them if they are not present in the “destination” database. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This can be tested quickly enough. Switch to “master” – run a publish and check the result. Sure enough, our “Master Database” folder is now there, alone. Swithing to “products” and running a publish gives us a new result; now the “Master Database” folder is gone, but the “Products Database” folder is present.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Curious as I am, I proceeded to disable this processor, to see what happened.&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;!--&lt;/span&gt;&lt;span style="color: green"&gt;&amp;lt;processor type="Sitecore.Publishing.Pipelines.PublishItem.RemoveUnknownChildren, Sitecore.Kernel" /&amp;gt;&lt;/span&gt;&lt;span style="color: blue"&gt;--&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;Result:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://lh4.ggpht.com/_7sFzy9-mI1g/SgRgoaa6dOI/AAAAAAAAADs/tn2OoZazsQM/s1600-h/disabled%5B2%5D.png"&gt;&lt;img title="disabled" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="200" alt="disabled" src="http://lh5.ggpht.com/_7sFzy9-mI1g/SgRgo2hZ6CI/AAAAAAAAADw/-vNM2FUslzs/disabled_thumb.png?imgmax=800" width="244" border="0"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Voila. It looks good. At least on paper ;-)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;While I am not completely comfortable with an intrusion such as this, disabling a system processor in the publishing pipeline, it at least allows me to move a bit forward on what I was aiming to achieve. If I dare to, that is.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In “master” I mock up a new template, and an item named Home, based on it:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://lh6.ggpht.com/_7sFzy9-mI1g/SgRgpJsNVqI/AAAAAAAAAD0/gsh6VpfFFXE/s1600-h/master%5B6%5D.png"&gt;&lt;img title="master" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="196" alt="master" src="http://lh3.ggpht.com/_7sFzy9-mI1g/SgRgptt0y7I/AAAAAAAAAD4/_CxcYZU9gTU/master_thumb%5B1%5D.png?imgmax=800" width="244" border="0"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;And in Products, something similar.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://lh5.ggpht.com/_7sFzy9-mI1g/SgRgqK9waHI/AAAAAAAAAD8/cXiEwQEco7w/s1600-h/products2%5B2%5D.png"&gt;&lt;img title="products2" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="195" alt="products2" src="http://lh4.ggpht.com/_7sFzy9-mI1g/SgRgqd6CcNI/AAAAAAAAAEA/3e8GNRAkpKI/products2_thumb.png?imgmax=800" width="244" border="0"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;And after publishing the respective databases, I get the (now) expected end result.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://lh6.ggpht.com/_7sFzy9-mI1g/SgRgqobPEtI/AAAAAAAAAEE/5o2YqrX1-lU/s1600-h/web2%5B2%5D.png"&gt;&lt;img title="web2" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="195" alt="web2" src="http://lh6.ggpht.com/_7sFzy9-mI1g/SgRgrL9d6dI/AAAAAAAAAEI/Q8lcb3YgfsQ/web2_thumb.png?imgmax=800" width="244" border="0"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Pretty neat :-)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Alas however, as I mentioned above, having to modify web.config to achieve this kind of behaviour worries me. I can certainly see some advantages to this model, and I hope that at some point in the future, this will be an officially supported way to work with multiple databases. For now, the route we have to go, is via Proxy Items. They are not entirely bad either – that’s not it at all – but they seem (to me) a little less intuitive to use. Worst of all, however, they don’t hide from view the potentially thousands (see CEO presentation above) of content items being proxied in from the “products” database – I would personally prefer to be able to work like I just described here.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;(In reality, there are lots of potential issues involved in this approach, and I can sort of see why Sitecore wouldn’t immediately support it)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;But let’s proceed.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;Configuring multiple databases using Sitecore Proxy Items&lt;/h2&gt;
&lt;p&gt;First thing I do is enable the RemoveUnknownChildren processor again. Now I’m back to a normal (and therefore supported) configuration.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;First thing that needs to be done, is enabling proxies on the “master” database.&amp;nbsp; Find it in web.config, and toggle the setting.&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;proxiesEnabled&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;true&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;proxiesEnabled&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;Then, in the Content Editor (“master” database), navigate to /sitecore/system/proxies – and add a new Proxy.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Most of the settings on the Proxy Item are fairly straight forward.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://lh3.ggpht.com/_7sFzy9-mI1g/SgRgrYHZ1oI/AAAAAAAAAEM/kjpDxsCe4jE/s1600-h/proxy%5B2%5D.png"&gt;&lt;img title="proxy" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="181" alt="proxy" src="http://lh3.ggpht.com/_7sFzy9-mI1g/SgRgr647hTI/AAAAAAAAAEQ/0vOA1-nOdVw/proxy_thumb.png?imgmax=800" width="244" border="0"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The “Source Item” field is a little bit tricky however. If you click, you get a navigation tree from your… “master” database. Not products, as one would hope. This is not news, I &lt;a title="Proxy template curiosity when proxying across databases" href="http://www.cassidy.dk/blog/sitecore/2006/01/proxy-template-curiosity-when-proxying.html"&gt;blogged about this in January 2006&lt;/a&gt; – and the workaround is fortunately even simpler today than it was back then. I open up the View tab, switch on “Raw Values” and quickly paste my ID of the “Products Database” root folder into the field. After saving my Products Proxy, I can safely disable “Raw Values” again, and now I have:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://lh5.ggpht.com/_7sFzy9-mI1g/SgRgsBKkQBI/AAAAAAAAAEU/Ib8iTUsQMHA/s1600-h/proxy2%5B2%5D.png"&gt;&lt;img title="proxy2" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="182" alt="proxy2" src="http://lh4.ggpht.com/_7sFzy9-mI1g/SgRgsjLRCQI/AAAAAAAAAEY/tNdRJg3IMs0/proxy2_thumb.png?imgmax=800" width="244" border="0"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Because of what appears to be a slight quirk in the Sitecore Content Editor interface, I disable and then re-enable proxies using the new option that has now appeared in my database selector.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://lh5.ggpht.com/_7sFzy9-mI1g/SgRgsvD6K6I/AAAAAAAAAEc/WPSUpwz9yIo/s1600-h/selector%5B2%5D.png"&gt;&lt;img title="selector" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="179" alt="selector" src="http://lh4.ggpht.com/_7sFzy9-mI1g/SgRgs5pM7DI/AAAAAAAAAEg/ucPERBeWMlY/selector_thumb.png?imgmax=800" width="147" border="0"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Once done, my content tree looks like I expect:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://lh3.ggpht.com/_7sFzy9-mI1g/SgRgtHlWVsI/AAAAAAAAAEk/MBhyNZvsBr4/s1600-h/proxied%5B2%5D.png"&gt;&lt;img title="proxied" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="156" alt="proxied" src="http://lh4.ggpht.com/_7sFzy9-mI1g/SgRgtWH6F1I/AAAAAAAAAEo/nXybdjbLvDM/proxied_thumb.png?imgmax=800" width="244" border="0"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Notice how the items coming in from the “products” database are shown in grey. This is a visual cue to the editor, that these items are “different” – in effect in this case not coming from the same database at all.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Running a publish also yields the same results – we are now back to where we were using my first approach.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;Setting up a shortcut to Products&lt;/h2&gt;
&lt;p&gt;One of the last things you would probably want to do, is set up an application shortcut to your “products” database.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Fortunately, this is very easily achieved. Switch to the “core” database, and find /sitecore/content/documents and settings/all users/start menu/left/content editor – make a duplicate of it, and name your new item Product Editor.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Configure parameters like this:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://lh6.ggpht.com/_7sFzy9-mI1g/SgRgt77m8fI/AAAAAAAAAEs/NX37sgZneI0/s1600-h/producteditor%5B8%5D.png"&gt;&lt;img title="producteditor" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="182" alt="producteditor" src="http://lh6.ggpht.com/_7sFzy9-mI1g/SgRgudr4y_I/AAAAAAAAAEw/YUcCwvMIRoo/producteditor_thumb%5B2%5D.png?imgmax=800" width="244" border="0"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Especially make note of the “Parameters” field; where I am instructing the Content Editor application to use the “products” database instead of the default database.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Switch back to “master”, and you now have an extra option available on your Start Menu.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://lh6.ggpht.com/_7sFzy9-mI1g/SgRguvJjb8I/AAAAAAAAAE0/baXFeAWcYFY/s1600-h/startmenu%5B2%5D.png"&gt;&lt;img title="startmenu" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="244" alt="startmenu" src="http://lh5.ggpht.com/_7sFzy9-mI1g/SgRguyGVR_I/AAAAAAAAAE4/3GX_kSBHwvg/startmenu_thumb.png?imgmax=800" width="195" border="0"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;And clicking the new “Product Editor” now take you directly to the “products” database, ready to edit.&amp;nbsp; Since this application shortcut can be configured with security just like you would expect, you can therefore configure users who can ONLY work with the “products” and not mess around with the rest of your site. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;In summary&lt;/h2&gt;
&lt;p&gt;When I set out writing this article, I had a few ideas in mind. I thought I had a “new creative” approach to handling multiple databases in Sitecore – but it turned out to be perhaps a little TOO creative ;-)&amp;nbsp;&amp;nbsp; The recommended approach is going via Proxy Items, and it seems like the safer way to go.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regardless of method used, I still feel that Sitecore offers plenty of options of partitioning your data if the need arises. Performance-wise… well sure – I have no doubt you could produce a QUICKER (as in; performing faster) Product Catalogue working directly with SQL Server and Products/Categories and whatnot tables.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Just like you could absolutely create a QUICKER website, using only flat .html files ;-)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;But there is a LOT to be gained by utilising the tools Sitecore makes available to us. Many of them were mentioned in the beginning of this article.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I, for one, do NOT relish the idea of having to create a full blown web based product administrative interface. Especially not late Friday afternoon. Anyone else? ;-)&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20883010-6527755252267793069?l=www.cassidy.dk%2Fblog%2Fsitecore%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/6527755252267793069/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20883010&amp;postID=6527755252267793069' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/6527755252267793069'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/6527755252267793069'/><link rel='alternate' type='text/html' href='http://www.cassidy.dk/blog/sitecore/2009/05/working-with-multiple-content-databases.html' title='Working with multiple content databases in Sitecore 6'/><author><name>Mark Cassidy</name><uri>http://www.blogger.com/profile/07054254475245848945</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03182104182261746826'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20883010.post-3572523896868676967</id><published>2009-04-17T17:05:00.001+01:00</published><updated>2009-04-17T17:05:08.440+01:00</updated><title type='text'>Sitecore Wildcard Nodes</title><content type='html'>&lt;p&gt;So here I was, doing a bit of late Friday afternoon catching up on the Sitecore Forums. I come across &lt;a href="http://sdn.sitecore.net/SDN5/Forum/ShowPost.aspx?PostID=15042"&gt;this post&lt;/a&gt;, in which a fairly common question is being asked, for which there are quite a number of possible solutions.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;What got my attention was the reply by Kern, who mentions something called a “wildcard item”.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;This is one of those humbling experiences. Having worked with Sitecore for over 3 years now, been involved directly and indirectly with a very large number of Sitecore Solution Partners, being certified, for a while had an office space right next to where certification training is being conducted in the UK; heck even going out for Friday night beers with one of the most experienced Sitecore Trainers in the UK….&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;And I’ve never ever heard of “wildcard items” before.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;I asked around between everyone I could find online on MSN (with Sitecore experience), and although they all did offer various guesses – none knew the answer.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Best… Kept… Secret… Ever… LOL ;-)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Or maybe it just never came up.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;But I find it so very useful, that I’m now going to do my bit to spreading the word.&amp;nbsp;&amp;nbsp; Once again, it is proof that the really true gems in the Sitecore blogosphere tend to come from Lars Nielsen’s blog.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;a title="Sitecore - Avoiding query string in dynamic URL" href="http://larsnielsen.blogspirit.com/archive/2007/01/09/sitecore-avoiding-query-string-in-dynamic-url.html"&gt;Sitecore – Avoiding query string in dynamic URL&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;I’ll just bring a quick snippet from the full article here, to give you some sort of idea of what it’s all about. Lars talks at length about how you can implement and use wildcard items in XSLT, and I find it in a way “drowns” the underlying real message – how you can use wildcard items in your day-to-day solutions. &lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Anyway, give it a look. And have a good weekend :-)&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Snippet:&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_7sFzy9-mI1g/Seiosh8aQhI/AAAAAAAAACs/KEHwO5yu6es/s1600-h/wildcard%5B2%5D.png"&gt;&lt;img title="wildcard" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="244" alt="wildcard" src="http://lh5.ggpht.com/_7sFzy9-mI1g/Seios1UN9tI/AAAAAAAAACw/nR8nKTZ5-_A/wildcard_thumb.png?imgmax=800" width="162" border="0"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20883010-3572523896868676967?l=www.cassidy.dk%2Fblog%2Fsitecore%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/3572523896868676967/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20883010&amp;postID=3572523896868676967' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/3572523896868676967'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/3572523896868676967'/><link rel='alternate' type='text/html' href='http://www.cassidy.dk/blog/sitecore/2009/04/sitecore-wildcard-nodes.html' title='Sitecore Wildcard Nodes'/><author><name>Mark Cassidy</name><uri>http://www.blogger.com/profile/07054254475245848945</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03182104182261746826'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20883010.post-2381865719862275047</id><published>2009-04-13T19:26:00.001+01:00</published><updated>2009-04-13T19:26:07.749+01:00</updated><title type='text'>Migrating data into Sitecore</title><content type='html'>&lt;p&gt;One question I’ve noticed gets posed ever so often on the Sitecore Forums is; “How do I migrate data from my clients previous CMS into Sitecore?”&amp;nbsp; Or similar type questions, to more or less the same effect.&amp;nbsp; Also commonly asked on the same occasion is; “Does Sitecore provide a tool for this?”&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Just to make sure we’re all on the same page here; I’m referring to the act of importing structured data (i.e. the clients existing website, sitting in any structured repository – CMS or otherwise – and getting that migrated into Sitecore for use in the Next Generation CMS system being developed by you).&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;This process is also known as &lt;a href="http://en.wikipedia.org/wiki/Data_migration"&gt;Data Migration&lt;/a&gt;, and WikiPedia defines it as follows:&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;“&lt;b&gt;Data migration&lt;/b&gt; is the process of transferring &lt;a href="http://en.wikipedia.org/wiki/Data"&gt;data&lt;/a&gt; between &lt;a href="http://en.wikipedia.org/wiki/Computer_storage"&gt;storage&lt;/a&gt; types, &lt;a href="http://en.wikipedia.org/wiki/Formats"&gt;formats&lt;/a&gt;, or &lt;a href="http://en.wikipedia.org/wiki/Computer_system"&gt;computer systems&lt;/a&gt;. Data migration is usually performed programmatically to achieve an &lt;i&gt;automated migration&lt;/i&gt;, freeing up human resources from tedious tasks. It is required when organizations or individuals change computer systems or upgrade to new systems, or when systems merge (such as when the organizations that use them undergo a merger/takeover).”&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;It further states:&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;“To achieve an effective data migration procedure, data on the old system is mapped to the new system providing a design for &lt;a href="http://en.wikipedia.org/wiki/Data_extraction"&gt;data extraction&lt;/a&gt; and &lt;a href="http://en.wikipedia.org/wiki/Data_loading"&gt;data loading&lt;/a&gt;. The design relates old data formats to the new system's formats and requirements. Programmatic data migration may involve many phases but it minimally includes &lt;i&gt;data extraction&lt;/i&gt; where data is read from the old system and &lt;i&gt;data loading&lt;/i&gt; where data is written to the new system.”&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;And lastly:&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;“Changing application vendor - for instance a new &lt;a href="http://en.wikipedia.org/wiki/CRM"&gt;CRM&lt;/a&gt; or &lt;a href="http://en.wikipedia.org/wiki/ERP"&gt;ERP&lt;/a&gt; platform will inevitably involve substantial transformation as almost every application or suite operates on its own specific data model.”&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;If we boil all of this information down, we get something like “Data Migration is usually performed programmatically. To do it, a design for extracting data and loading data needs to be developed.”&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;And that’s where you come in.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;We already have at least a partial answer to one of the above questions. Sitecore couldn’t really provide a tool that could achieve this. Data extraction would always be bespoke to the specific system being migrated from – so while you might be lucky enough to find something that would extract data from say a specific version EpiServer to a specific version of Sitecore; chances are you would still end up having to do quite a bit of the data design yourself to satisfy your business requirements.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;That being said, I do believe Sitecore offers a few features to help you out.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;font color="#333333"&gt;For instance, there’s the &lt;a href="http://trac.sitecore.net/XmlImporter"&gt;Xml Importer&lt;/a&gt;.&lt;/font&gt;&lt;/p&gt; &lt;ul&gt; &lt;ul&gt; &lt;li&gt;It essentially works as a Transformation Engine. Given an XML input file (presumably produced by the system you intend to migrate from), you then write an XSLT file to transform the XML input file to a pre-defined format, which the Xml Importer will then use to create Sitecore Content Items.&lt;/li&gt; &lt;li&gt;This is probably only fine for the simplest of cases. In most migrations I have done, there has almost always been business requirements to perform more “advanced” features such as UrlMapping (setting up Url Redirection so that the existing links will work on the target Sitecore installation), Media Importing, category mapping to name a few. Not that you couldn’t achieve most of this using XSLT. I just think it will be very hard and unworkable.&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;There may or may not be similar tools available. I’ve never used them myself simply because in the vast majority of cases, a pre-built tool would not be able to achieve the requirements I was tasked to fulfil. The process of actually creating Sitecore Content Items is the least of my worries when it comes to migration.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;While I can’t provide a specific solution in this post to whatever migration problem you may be facing, I will take you through a fictional scenario to help explain some of the points that needs to be addressed, and provide a few techniques that you may find useful.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;For demonstration purposes, I will be importing the good old trusted Northwind database. Now before you start, I’m not saying this is neither a very good idea or anything similar – Northwind doesn’t hold web content and is therefore a very unlikely candidate for this type of migration. I have chosen it simply because many of you are already familiar with the structure of it, and it is &lt;a title="Link to download Northwind sample databases for SQL 2000" href="http://www.microsoft.com/downloads/details.aspx?familyid=06616212-0356-46a0-8da2-eebc53a68034&amp;amp;displaylang=en"&gt;freely available for anyone to download&lt;/a&gt; and experiment with.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;h4&gt;Designing the model&lt;/h4&gt; &lt;p&gt;To begin the process of migration, you first need to analyse the data model, and come up with an implementation that will work in your Sitecore solution.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;In the example I’m going to cover, I’ve been tasked with the following:&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;“Migrate the &lt;em&gt;products&lt;/em&gt; into a relevant &lt;em&gt;categorised&lt;/em&gt; Sitecore Content Structure, making sure you preserve information about each &lt;em&gt;supplier&lt;/em&gt; for the migrated products”.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;After looking a bit at the products table definition, I conclude the following:&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_7sFzy9-mI1g/SeODmdkkhnI/AAAAAAAAAB0/80vL244oNRE/s1600-h/products%5B3%5D.png"&gt;&lt;img title="products" style="border-right: 0px; border-top: 0px; display: inline; margin-left: 0px; border-left: 0px; margin-right: 0px; border-bottom: 0px" height="177" alt="products" src="http://lh5.ggpht.com/_7sFzy9-mI1g/SeODmzPu9UI/AAAAAAAAAB4/Um_DeoUMc8Q/products_thumb%5B1%5D.png?imgmax=800" width="244" align="right" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;ul&gt; &lt;li&gt;Each product has only 1 supplier&lt;/li&gt; &lt;li&gt;Each product is only defined in 1 category&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;This is fortunate, as it will make the migration a fairly simple task. More often than not, things will not be this well defined and simple.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;So in terms of a Sitecore Content Structure, this could look like this:&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;/sitecore/content/Home&lt;/li&gt; &lt;ul&gt; &lt;li&gt;/sitecore/content/Home/Products&lt;/li&gt; &lt;ul&gt; &lt;li&gt;/sitecore/content/Home/Products/CategoryA&lt;/li&gt; &lt;li&gt;/sitecore/content/Home/Products/CategoryB&lt;/li&gt; &lt;li&gt;… and so on&lt;/li&gt;&lt;/ul&gt; &lt;li&gt;/sitecore/content/Home/Suppliers&lt;/li&gt; &lt;ul&gt; &lt;li&gt;/sitecore/content/Home/Suppliers/SupplierA&lt;/li&gt; &lt;li&gt;/sitecore/content/Home/Suppliers/SupplierB&lt;/li&gt; &lt;li&gt;… and so on&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;You could of course map this in many different ways. A few of the things you should be considering when designing your structure are:&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;How many Sitecore Items will be created on each branch?&amp;nbsp; &lt;/li&gt; &lt;ul&gt; &lt;li&gt;Sitecore recommends that no more than 100 Items are created on any one branch level. &lt;/li&gt;&lt;/ul&gt; &lt;li&gt;How will the existing &lt;em&gt;meta-structure&lt;/em&gt; be preserved?&amp;nbsp;&amp;nbsp; &lt;/li&gt; &lt;ul&gt; &lt;li&gt;In this case, a products category is implicitly derived from the Category node it sits under. Alternatively, as I will need to do with suppliers, you could create references from your data to point to the relevant meta data.&lt;/li&gt;&lt;/ul&gt; &lt;li&gt;Will any filtering or data transformation need to take place?&lt;/li&gt; &lt;ul&gt; &lt;li&gt;Often, there are old data in the source system that you might as well filter out when doing the migration. This could be data prior to a certain date (i.e. only migrate the last 3 years worth of data) or certain categories that will not be migrated to the new system.&lt;/li&gt; &lt;li&gt;Are there inline links that you will need to handle?&amp;nbsp;&amp;nbsp; As Northwind doesn’t hold web content, this is not relevant to this example. But in most cases, you will need to &lt;a title="Link to WikiPedia explaining the basics of Regular Expressions" href="http://en.wikipedia.org/wiki/Regular_expression"&gt;RegEx&lt;/a&gt; through content fields and rewrite Internal Links to point to the new locations of your content within Sitecore. This topic is complex enough to deserve an entire post of it’s own, so I won’t be going into detail with this here.&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Having defined this structure, I now explore the relevant Database Schemas, and come up with the following 3 Sitecore Templates that will eventually hold my migrated data. In this case I started on a blank Sitecore 6 installation (090212, but that isn’t really relevant – this migration process would not differ significantly between Sitecore 5 and Sitecore 6).&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Product:&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_7sFzy9-mI1g/SeODnnZviTI/AAAAAAAAAB8/VXsShkbVCJI/s1600-h/product%5B2%5D.png"&gt;&lt;img title="product" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="109" alt="product" src="http://lh3.ggpht.com/_7sFzy9-mI1g/SeODooLpN0I/AAAAAAAAACA/3n9A1Ty4pyQ/product_thumb.png?imgmax=800" width="244" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Category:&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_7sFzy9-mI1g/SeODpgwH_aI/AAAAAAAAACE/N8EFbfhASuU/s1600-h/category%5B2%5D.png"&gt;&lt;img title="category" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="46" alt="category" src="http://lh4.ggpht.com/_7sFzy9-mI1g/SeODqNlwNpI/AAAAAAAAACI/a7JAEGEUdMM/category_thumb.png?imgmax=800" width="244" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Supplier:&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_7sFzy9-mI1g/SeODqrynP_I/AAAAAAAAACM/zqAf_KGj6Ls/s1600-h/supplier%5B2%5D.png"&gt;&lt;img title="supplier" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="145" alt="supplier" src="http://lh4.ggpht.com/_7sFzy9-mI1g/SeODq2x5HKI/AAAAAAAAACQ/OB-Laqvc884/supplier_thumb.png?imgmax=800" width="244" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;I also create the basic skeleton structure I defined above, and run a Smart Publish. I’ll explain why, in just a bit.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Skeleton structure:&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_7sFzy9-mI1g/SeODsIimxNI/AAAAAAAAACU/2aBx8LH9mkg/s1600-h/structure%5B2%5D.png"&gt;&lt;img title="structure" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="98" alt="structure" src="http://lh4.ggpht.com/_7sFzy9-mI1g/SeODsiBqpmI/AAAAAAAAACY/yX66gzcvFBc/structure_thumb.png?imgmax=800" width="135" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;And I am now ready to proceed to the next stage.&lt;/p&gt; &lt;h4&gt;Extracting the data&lt;/h4&gt; &lt;p&gt;When it comes to extracting the Northwind Data, fortunately this is almost a textbook example. The data is nice and clean, referential integrity is in place, and .NET makes it very straightforward to connect to my underlying MS SQL Server to reach the relevant tables. I know there are many boilerplate examples out there of how to easily access Northwind using LINQ and similar technologies, but since the data extraction will be so simple in this case I don’t really see a need for invoking any of them.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;One toolkit I will use however, is my &lt;a title="Link to the Sitecore Trac space for CorePoint.DomainObjects" href="http://trac.sitecore.net/DomainObjects"&gt;CorePoint.DomainObjects&lt;/a&gt;. Don’t see this as a shameless plug; one of the main reasons I developed the toolkit was to help in my many migration projects and it just makes the task ahead so much easier.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;I set up a standard Sitecore project, and quickly mock up a few entities:&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_7sFzy9-mI1g/SeODtJETq0I/AAAAAAAAACc/qjLDf5TasyE/s1600-h/project%5B2%5D.png"&gt;&lt;img title="project" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="244" alt="project" src="http://lh4.ggpht.com/_7sFzy9-mI1g/SeODtgmmz4I/AAAAAAAAACg/wDA3qOgewZE/project_thumb.png?imgmax=800" width="213" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Product.cs:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;using &lt;/span&gt;System;
&lt;span style="color: blue"&gt;using &lt;/span&gt;System.Data;
&lt;span style="color: blue"&gt;using &lt;/span&gt;CorePoint.DomainObjects.SC;
&lt;span style="color: blue"&gt;using &lt;/span&gt;CorePoint.DomainObjects;

&lt;span style="color: blue"&gt;namespace &lt;/span&gt;Website.Migration
{
    [&lt;span style="color: #2b91af"&gt;Template&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"user defined/product"&lt;/span&gt;)]
    &lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Product &lt;/span&gt;: &lt;span style="color: #2b91af"&gt;StandardTemplate
    &lt;/span&gt;{
        &lt;span style="color: green"&gt;// A few properties that will be needed to map out the Sitecore hierarchy
        &lt;/span&gt;&lt;span style="color: blue"&gt;public int &lt;/span&gt;ProductId { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }
        &lt;span style="color: blue"&gt;public int &lt;/span&gt;SupplierId { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }
        &lt;span style="color: blue"&gt;public int &lt;/span&gt;CategoryId { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }

        [&lt;span style="color: #2b91af"&gt;Field&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"product name"&lt;/span&gt;)]         &lt;span style="color: blue"&gt;public string &lt;/span&gt;ProductName { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }
        [&lt;span style="color: #2b91af"&gt;Field&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"quantity per unit"&lt;/span&gt;)]    &lt;span style="color: blue"&gt;public string &lt;/span&gt;QuantityPerUnit { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }
        [&lt;span style="color: #2b91af"&gt;Field&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"unit price"&lt;/span&gt;)]           &lt;span style="color: blue"&gt;public double &lt;/span&gt;UnitPrice { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }
        [&lt;span style="color: #2b91af"&gt;Field&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"units in stock"&lt;/span&gt;)]       &lt;span style="color: blue"&gt;public int &lt;/span&gt;UnitsInStock { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }
        [&lt;span style="color: #2b91af"&gt;Field&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"units on order"&lt;/span&gt;)]       &lt;span style="color: blue"&gt;public int &lt;/span&gt;UnitsOnOrder { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }
        [&lt;span style="color: #2b91af"&gt;Field&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"reorder level"&lt;/span&gt;)]        &lt;span style="color: blue"&gt;public int &lt;/span&gt;ReorderLevel { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }
        [&lt;span style="color: #2b91af"&gt;Field&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"discontinued"&lt;/span&gt;)]         &lt;span style="color: blue"&gt;public bool &lt;/span&gt;Discontinued { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }
        [&lt;span style="color: #2b91af"&gt;Field&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"supplier"&lt;/span&gt;)]             &lt;span style="color: blue"&gt;public &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Guid &lt;/span&gt;Supplier { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }

        &lt;span style="color: blue"&gt;public &lt;/span&gt;Product()
        {
        }

        &lt;span style="color: blue"&gt;public &lt;/span&gt;Product( &lt;span style="color: #2b91af"&gt;DataRow &lt;/span&gt;row )
        {
            &lt;span style="color: green"&gt;// For brewity, null values are not checked for. There are none in the 
            // Northwind products table
            &lt;/span&gt;ProductName = &lt;span style="color: #2b91af"&gt;Convert&lt;/span&gt;.ToString( row[ &lt;span style="color: #a31515"&gt;"ProductName" &lt;/span&gt;] );
            SupplierId = &lt;span style="color: #2b91af"&gt;Convert&lt;/span&gt;.ToInt32( row[ &lt;span style="color: #a31515"&gt;"SupplierID" &lt;/span&gt;] );
            CategoryId = &lt;span style="color: #2b91af"&gt;Convert&lt;/span&gt;.ToInt32( row[ &lt;span style="color: #a31515"&gt;"CategoryID" &lt;/span&gt;] );
            QuantityPerUnit = &lt;span style="color: #2b91af"&gt;Convert&lt;/span&gt;.ToString( row[ &lt;span style="color: #a31515"&gt;"QuantityPerUnit" &lt;/span&gt;] );
            UnitPrice = &lt;span style="color: #2b91af"&gt;Convert&lt;/span&gt;.ToDouble( row[ &lt;span style="color: #a31515"&gt;"UnitPrice" &lt;/span&gt;] );
            UnitsInStock = &lt;span style="color: #2b91af"&gt;Convert&lt;/span&gt;.ToInt32( row[ &lt;span style="color: #a31515"&gt;"UnitsInStock" &lt;/span&gt;] );
            UnitsOnOrder = &lt;span style="color: #2b91af"&gt;Convert&lt;/span&gt;.ToInt32( row[ &lt;span style="color: #a31515"&gt;"UnitsOnOrder" &lt;/span&gt;] );
            ReorderLevel = &lt;span style="color: #2b91af"&gt;Convert&lt;/span&gt;.ToInt32( row[ &lt;span style="color: #a31515"&gt;"ReorderLevel" &lt;/span&gt;] );
            Discontinued = &lt;span style="color: #2b91af"&gt;Convert&lt;/span&gt;.ToBoolean( row[ &lt;span style="color: #a31515"&gt;"Discontinued" &lt;/span&gt;] );
        }
    }
}&lt;/pre&gt;
&lt;p&gt;Category.cs:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;using &lt;/span&gt;System;
&lt;span style="color: blue"&gt;using &lt;/span&gt;System.Data;
&lt;span style="color: blue"&gt;using &lt;/span&gt;CorePoint.DomainObjects.SC;
&lt;span style="color: blue"&gt;using &lt;/span&gt;CorePoint.DomainObjects;

&lt;span style="color: blue"&gt;namespace &lt;/span&gt;Website.Migration
{
    [&lt;span style="color: #2b91af"&gt;Template&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"user defined/category"&lt;/span&gt;)]
    &lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Category &lt;/span&gt;: &lt;span style="color: #2b91af"&gt;StandardTemplate
    &lt;/span&gt;{
        &lt;span style="color: blue"&gt;public int &lt;/span&gt;CategoryId { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }

        [&lt;span style="color: #2b91af"&gt;Field&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"category name"&lt;/span&gt;)]    &lt;span style="color: blue"&gt;public string &lt;/span&gt;CategoryName { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }
        [&lt;span style="color: #2b91af"&gt;Field&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"description"&lt;/span&gt;)]      &lt;span style="color: blue"&gt;public string &lt;/span&gt;Description { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }

        &lt;span style="color: blue"&gt;public &lt;/span&gt;Category()
        {
        }

        &lt;span style="color: blue"&gt;public &lt;/span&gt;Category( &lt;span style="color: #2b91af"&gt;DataRow &lt;/span&gt;row )
        {
            CategoryId = &lt;span style="color: #2b91af"&gt;Convert&lt;/span&gt;.ToInt32( row[ &lt;span style="color: #a31515"&gt;"CategoryID" &lt;/span&gt;] );
            CategoryName = &lt;span style="color: #2b91af"&gt;Convert&lt;/span&gt;.ToString( row[ &lt;span style="color: #a31515"&gt;"CategoryName" &lt;/span&gt;] );
            Description = &lt;span style="color: #2b91af"&gt;Convert&lt;/span&gt;.ToString( row[ &lt;span style="color: #a31515"&gt;"Description" &lt;/span&gt;] );
        }
    }
}&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;Supplier.cs:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;using &lt;/span&gt;System;
&lt;span style="color: blue"&gt;using &lt;/span&gt;System.Data;
&lt;span style="color: blue"&gt;using &lt;/span&gt;CorePoint.DomainObjects.SC;
&lt;span style="color: blue"&gt;using &lt;/span&gt;CorePoint.DomainObjects;

&lt;span style="color: blue"&gt;namespace &lt;/span&gt;Website.Migration
{
    [&lt;span style="color: #2b91af"&gt;Template&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"user defined/supplier"&lt;/span&gt;)]
    &lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Supplier &lt;/span&gt;: &lt;span style="color: #2b91af"&gt;StandardTemplate
    &lt;/span&gt;{
        &lt;span style="color: blue"&gt;public int &lt;/span&gt;SupplierId { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }

        [&lt;span style="color: #2b91af"&gt;Field&lt;/span&gt;(&lt;span style="color: #a31515"&gt;"company name"&lt;/span&gt;)]        &lt;span style="color: blue"&gt;public string &lt;/span&gt;CompanyName { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }

        &lt;span style="color: green"&gt;// For brewity, the rest of the fields are omitted, as
        // they're not really needed to demonstrate the migration

        &lt;/span&gt;&lt;span style="color: blue"&gt;public &lt;/span&gt;Supplier()
        {
        }

        &lt;span style="color: blue"&gt;public &lt;/span&gt;Supplier( &lt;span style="color: #2b91af"&gt;DataRow &lt;/span&gt;row )
        {
            SupplierId = &lt;span style="color: #2b91af"&gt;Convert&lt;/span&gt;.ToInt32( row[ &lt;span style="color: #a31515"&gt;"SupplierID" &lt;/span&gt;] );
            CompanyName = &lt;span style="color: #2b91af"&gt;Convert&lt;/span&gt;.ToString( row[ &lt;span style="color: #a31515"&gt;"CompanyName" &lt;/span&gt;] );
        }
    }
}
&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;And now we’re ready to get going. As you can see, I cheated a bit on Supplier.cs. This article is long enough, without me listing out 15 or so similar fields that don’t really add value to the demonstration / example itself.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I also created a completely standard .ASPX page under the root of the site, DoMigrate.aspx. It is in this page I will be executing the migration itself.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I start by adding some code that will load up all of the required source data into memory. When developing a migration, there are a few things to keep in mind:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Your code is more or less &lt;em&gt;fire and forget&lt;/em&gt;. It will not run in a live environment, it will not need to be maintained by yourself or your peers for an extended period of time (normally) and therefore many of the rules and guidelines that apply to developing web applications don’t really apply here.&lt;/li&gt;
&lt;li&gt;For performance reasons, load up as much as you possibly can into RAM. Run 64 bit if you can, and don’t worry if your migration script is eating up gigabytes of memory. If your migration mapping is complex (this example isn’t), you will appreciate the performance gain from having in-memory tables and lookups, and can in many cases mean a difference of 4 hours versus 4 minutes of execution time. &lt;/li&gt;
&lt;li&gt;Don’t expect to get it spot-on the first time. You will be running the script many times over.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I add a bit of code to the Page_Load method:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;protected void &lt;/span&gt;Page_Load( &lt;span style="color: blue"&gt;object &lt;/span&gt;sender, &lt;span style="color: #2b91af"&gt;EventArgs &lt;/span&gt;e )
{
    &lt;span style="color: green"&gt;// First we start by loading all source data into memory.

    &lt;/span&gt;&lt;span style="color: blue"&gt;string &lt;/span&gt;connectionString = 
        &lt;span style="color: #a31515"&gt;@"user id=sa;password=&lt;strong&gt;removed&lt;/strong&gt;;Data Source=.\SQLEXPRESS;Database=Northwind"&lt;/span&gt;;

    &lt;span style="color: #2b91af"&gt;DataTable &lt;/span&gt;products = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;DataTable&lt;/span&gt;();
    &lt;span style="color: #2b91af"&gt;DataTable &lt;/span&gt;suppliers = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;DataTable&lt;/span&gt;();
    &lt;span style="color: #2b91af"&gt;DataTable &lt;/span&gt;categories = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;DataTable&lt;/span&gt;();

    &lt;span style="color: blue"&gt;using &lt;/span&gt;( &lt;span style="color: blue"&gt;var &lt;/span&gt;conn = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;SqlConnection&lt;/span&gt;( connectionString ) )
    {
        &lt;span style="color: blue"&gt;using &lt;/span&gt;( &lt;span style="color: blue"&gt;var &lt;/span&gt;da = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;SqlDataAdapter&lt;/span&gt;( &lt;span style="color: #a31515"&gt;"SELECT * FROM Products"&lt;/span&gt;, conn ) )
        {
            da.Fill( products );
        }

        &lt;span style="color: blue"&gt;using &lt;/span&gt;( &lt;span style="color: blue"&gt;var &lt;/span&gt;da = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;SqlDataAdapter&lt;/span&gt;( &lt;span style="color: #a31515"&gt;"SELECT * FROM Categories"&lt;/span&gt;, conn ) )
        {
            da.Fill( categories );
        }

        &lt;span style="color: blue"&gt;using &lt;/span&gt;( &lt;span style="color: blue"&gt;var &lt;/span&gt;da = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;SqlDataAdapter&lt;/span&gt;( &lt;span style="color: #a31515"&gt;"SELECT * FROM Suppliers"&lt;/span&gt;, conn ) )
        {
            da.Fill( suppliers );
        }
    }
}
&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;As you can see, no surprises there. I am basically filling up 3 Datatables with information from the Northwind database.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I add a little code to load up all the data in the entities I created above, like this:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;Product&lt;/span&gt;&amp;gt; ProductList = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;Product&lt;/span&gt;&amp;gt;();
&lt;span style="color: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;Category&lt;/span&gt;&amp;gt; CategoryList = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;Category&lt;/span&gt;&amp;gt;();
&lt;span style="color: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;Supplier&lt;/span&gt;&amp;gt; SupplierList = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;Supplier&lt;/span&gt;&amp;gt;();

&lt;span style="color: blue"&gt;foreach&lt;/span&gt;( &lt;span style="color: #2b91af"&gt;DataRow &lt;/span&gt;row &lt;span style="color: blue"&gt;in &lt;/span&gt;products.Rows )
    ProductList.Add( &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Product&lt;/span&gt;( row ) );
&lt;span style="color: blue"&gt;foreach &lt;/span&gt;( &lt;span style="color: #2b91af"&gt;DataRow &lt;/span&gt;row &lt;span style="color: blue"&gt;in &lt;/span&gt;categories.Rows )
    CategoryList.Add( &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Category&lt;/span&gt;( row ) );
&lt;span style="color: blue"&gt;foreach &lt;/span&gt;( &lt;span style="color: #2b91af"&gt;DataRow &lt;/span&gt;row &lt;span style="color: blue"&gt;in &lt;/span&gt;suppliers.Rows )
    SupplierList.Add( &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Supplier&lt;/span&gt;( row ) );

Response.Write( &lt;span style="color: blue"&gt;string&lt;/span&gt;.Format( &lt;span style="color: #a31515"&gt;"{0} products, {1} categories, {2} suppliers&amp;lt;br /&amp;gt;"&lt;/span&gt;,
                ProductList.Count,
                CategoryList.Count,
                SupplierList.Count ) );
&lt;/pre&gt;
&lt;p&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;And for the first time, I run my migration script-to-be.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;“77 products, 8 categories, 29 suppliers”&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is a good time to sanity check your code and make sure the numbers you are getting are more or less what you expect. Comparing with the rowcounts of the source database, I conclude that everything appears to be in order, and continue. It is now time to create some Sitecore Items based on this data.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Before I do that, there are a few things to point out:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The order which you create the Sitecore items in, is not irrelevant. In our case here, Products refer Suppliers and sit beneath Categories. Therefore the first Sitecore Items you create must be Suppliers (or Categories, in this case that won’t matter) followed by Categories and finally followed by Products.&lt;/li&gt;
&lt;li&gt;I always run test migrations against the “web” database. This has a few advantages:&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;It runs faster (I think…&amp;nbsp; it should, since there is no publishing queue handling)&lt;/li&gt;
&lt;li&gt;It allows you to easily undo a failed migration. Just publish your skeleton again, and the whole thing resets back to start&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I add some code to create Sitecore Content. Don’t worry, we’re almost done now :-)&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: green"&gt;// Set up a director for "web", standard language and security disabled
&lt;/span&gt;&lt;span style="color: #2b91af"&gt;SCDirector &lt;/span&gt;director = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;SCDirector&lt;/span&gt;( &lt;span style="color: #a31515"&gt;"web"&lt;/span&gt;, &lt;span style="color: #a31515"&gt;"en"&lt;/span&gt;, &lt;span style="color: blue"&gt;true &lt;/span&gt;);
&lt;span style="color: blue"&gt;var &lt;/span&gt;suppliersRoot = director.GetObjectByIdentifier( &lt;span style="color: #a31515"&gt;"/sitecore/content/home/suppliers" &lt;/span&gt;);
&lt;span style="color: blue"&gt;var &lt;/span&gt;productsRoot = director.GetObjectByIdentifier( &lt;span style="color: #a31515"&gt;"/sitecore/content/home/products" &lt;/span&gt;);

&lt;span style="color: green"&gt;// And with these references in place, it's time to create our Sitecore Content Items

&lt;/span&gt;SupplierList.ForEach( &lt;span style="color: blue"&gt;delegate&lt;/span&gt;( &lt;span style="color: #2b91af"&gt;Supplier &lt;/span&gt;s )
{
    s.Name = s.CompanyName;        &lt;span style="color: green"&gt;// A name for the Sitecore Item (duh.. :P)
    &lt;/span&gt;s.ParentId = suppliersRoot.Id;
    s.Director = director;
    s.Store();
} );

CategoryList.ForEach( &lt;span style="color: blue"&gt;delegate&lt;/span&gt;( &lt;span style="color: #2b91af"&gt;Category &lt;/span&gt;c )
{
    &lt;span style="color: green"&gt;// First create the category
    &lt;/span&gt;c.Name = c.CategoryName;
    c.ParentId = productsRoot.Id;
    c.Director = director;
    c.Store();

    &lt;span style="color: green"&gt;// And now create all products under the category
    &lt;/span&gt;ProductList.FindAll( p =&amp;gt; p.CategoryId == c.CategoryId ).ForEach( &lt;span style="color: blue"&gt;delegate&lt;/span&gt;( &lt;span style="color: #2b91af"&gt;Product &lt;/span&gt;p )
    {
        p.Name = p.ProductName;
        p.ParentId = c.Id; &lt;span style="color: green"&gt;// .Id was assigned when the category was stored
        &lt;/span&gt;p.Director = director;

        &lt;span style="color: green"&gt;// Pay attention to this one. I now map the Supplier Id field with the
        // Sitecore ID of the related supplier (created above)
        &lt;/span&gt;p.Supplier = SupplierList.Find( s =&amp;gt; s.SupplierId == p.SupplierId ).Id;
        p.Store();
    } );
} );

Response.Write( &lt;span style="color: #a31515"&gt;"All done!&amp;lt;br /&amp;gt;" &lt;/span&gt;);
&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;And here we go. The data is now migrated. On my overworked laptop, this code executes in just a couple of seconds. The results look like this:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://lh5.ggpht.com/_7sFzy9-mI1g/SeODu3qOaoI/AAAAAAAAACk/hKtFlFc24ag/s1600-h/migration%5B2%5D.png"&gt;&lt;img title="migration" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="170" alt="migration" src="http://lh3.ggpht.com/_7sFzy9-mI1g/SeODvanuukI/AAAAAAAAACo/qvvI0ISdv-k/migration_thumb.png?imgmax=800" width="244" border="0"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;And you’re all done.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;A few last things to consider are this:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If migrating large quantities of data, try and disable as many Sitecore event handlers and whatever else you can get away with. &lt;/li&gt;
&lt;li&gt;Use BulkUpdateContext()&lt;/li&gt;
&lt;li&gt;Don’t forget your target language&lt;/li&gt;
&lt;li&gt;If you can, make the fields shared and unversioned. This should help migration execution speed.&lt;/li&gt;
&lt;li&gt;And probably most importantly: Most of your work will almost always be during analysis. Figuring out&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;How to get to the source data&lt;/li&gt;
&lt;li&gt;Determining what data needs to be migrated&lt;/li&gt;
&lt;li&gt;Designing a reasonable way to store the data in Sitecore&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I don’t know of many shortcuts. This is very rarely as easy a task as this one was. I know there are standards in the making, for how CMS systems could store (or at least interchange data), but I don’t know if those are realistic and (more importantly) will be widely adopted by the various CMS vendors.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I hope you found this post useful. Probably my longest post ever. Comments and feedback welcomed :-)&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20883010-2381865719862275047?l=www.cassidy.dk%2Fblog%2Fsitecore%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/2381865719862275047/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20883010&amp;postID=2381865719862275047' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/2381865719862275047'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/2381865719862275047'/><link rel='alternate' type='text/html' href='http://www.cassidy.dk/blog/sitecore/2009/04/migrating-data-into-sitecore.html' title='Migrating data into Sitecore'/><author><name>Mark Cassidy</name><uri>http://www.blogger.com/profile/07054254475245848945</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03182104182261746826'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20883010.post-3209028117348004191</id><published>2009-04-08T14:39:00.002+01:00</published><updated>2009-04-08T15:32:41.921+01:00</updated><title type='text'>DomainObjects Update 3 released</title><content type='html'>&lt;p&gt;Yet another update was just released to the &lt;a title="Sitecore Shared Source space for CorePoint DomainObjects" href="http://trac.sitecore.net/DomainObjects"&gt;Sitecore Shared Source&lt;/a&gt; space.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;Before I go into detail, let me just pre-warn that this is the first blog post on this blog where I’m using Windows Live Writer (thanks to &lt;a href="http://sitecorejohn.spaces.live.com/Blog/cns!960125F1D4A59952!207.entry"&gt;John West&lt;/a&gt; for pointing my attention towards this tool) – and in case everything goes all wrong, this would (or could) be why ;-)&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;So what’s new?&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;A bug was fixed, where creating multiple language versions of the same DomainObject wouldn’t get correctly placed in Sitecore. Additional Language versions would get added to the current Context Language instead.  &lt;li&gt;Support for Sitecore Query was added. I am a little bit torn on this functionality and whether it “fits” with the DomainObjects mindset or not. However – as there is little in way of alternatives right now – I decided to include it.  &lt;li&gt;Support for Sitecore Media Items is now part of the package. As most of you will know, Media Items in Sitecore are (almost) like any other Items, yet there are subtle differences. Getting the Url of a Media Item for instance, takes you via the MediaManager instead of the LinkManager. With this implementation, users of the DomainObject are shielded from such implementation details.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;How to use it&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;Probably best shown with a few example from the Unit Tests written for this release:&lt;/p&gt; &lt;p&gt;&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: #2b91af"&gt;StandardTemplate &lt;/span&gt;item = director.QuerySingleObject( &lt;span style="color: #a31515"&gt;"/sitecore/content//*[@IntegerTestField='10']" &lt;/span&gt;);
&lt;span style="color: #2b91af"&gt;Assert&lt;/span&gt;.IsNotNull( item );
&lt;span style="color: #2b91af"&gt;Assert&lt;/span&gt;.IsTrue( item &lt;span style="color: blue"&gt;is &lt;/span&gt;&lt;span style="color: #2b91af"&gt;TestTemplate &lt;/span&gt;);

item = director.QuerySingleObject&amp;lt;&lt;span style="color: #2b91af"&gt;TestTemplate&lt;/span&gt;&amp;gt;( &lt;span style="color: #a31515"&gt;"/sitecore/content//*[@IntegerTestField='10']" &lt;/span&gt;);
&lt;span style="color: #2b91af"&gt;Assert&lt;/span&gt;.IsNotNull( item );

item = director.QuerySingleObject&amp;lt;&lt;span style="color: #2b91af"&gt;StandardTemplate&lt;/span&gt;&amp;gt;( &lt;span style="color: #a31515"&gt;"/sitecore/content//*[@IntegerTestField='10']" &lt;/span&gt;);
&lt;span style="color: #2b91af"&gt;Assert&lt;/span&gt;.IsNotNull( item );

item = director.QuerySingleObject&amp;lt;&lt;span style="color: #2b91af"&gt;StandardTemplate&lt;/span&gt;&amp;gt;( &lt;span style="color: #a31515"&gt;"/sitecore/content/home" &lt;/span&gt;);
&lt;span style="color: #2b91af"&gt;Assert&lt;/span&gt;.IsNotNull( item );

item = director.QuerySingleObject&amp;lt;&lt;span style="color: #2b91af"&gt;TestTemplate&lt;/span&gt;&amp;gt;( &lt;span style="color: #a31515"&gt;"/sitecore/content/home" &lt;/span&gt;);
&lt;span style="color: #2b91af"&gt;Assert&lt;/span&gt;.IsNull( item );
&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;There is, as one would probably expect, a similar method for querying multiple objects. Query gets passed straight through to the Sitecore API, so same rules apply as would any other &lt;a title="Using Sitecore Query Syntax" href="http://sdn.sitecore.net/Reference/Using%20Sitecore%20Query/Sitecore%20Query%20Syntax.aspx"&gt;Sitecore Query&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;As for Media Items, the following classes have been added – all mapping to equivalent templates in Sitecore:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Audio, VersionedAudio 
&lt;li&gt;Doc, VersionedDoc 
&lt;li&gt;Document, VersionedDocument 
&lt;li&gt;Docx, VersionedDocx 
&lt;li&gt;File, VersionedFile 
&lt;li&gt;Flash, VersionedFlash 
&lt;li&gt;Image, VersionedImage 
&lt;li&gt;Jpeg, VersionedJpeg 
&lt;li&gt;MediaFolder 
&lt;li&gt;Movie, VersionedMovie 
&lt;li&gt;MP3, VersionedMP3 
&lt;li&gt;PDF, VersionedPDF 
&lt;li&gt;Zip, VersionedZip&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;They all inherit from StandardTemplate and mostly only differ from the fact that their .Url property is gained in a different manner.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Creating a new Media Item therefore is no different than any other DomainObject, except that the media file itself needs to be attached. Something like this:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: #2b91af"&gt;SCDirector &lt;/span&gt;director = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;SCDirector&lt;/span&gt;();
&lt;span style="color: #2b91af"&gt;Jpeg &lt;/span&gt;logoFile = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Jpeg&lt;/span&gt;();
logoFile.CreateFromFilePath = &lt;span style="color: #a31515"&gt;@"C:\Logo.jpg"&lt;/span&gt;;
logoFile.Title = &lt;span style="color: #a31515"&gt;"New Company Logo"&lt;/span&gt;;
logoFile.Alt = &lt;span style="color: #a31515"&gt;"Company Logo"&lt;/span&gt;;
logoFile.Description = &lt;span style="color: #a31515"&gt;"The new logo we received from Big Media Inc"&lt;/span&gt;;
logoFile.ParentId = director.GetObjectByIdentifier( &lt;span style="color: #a31515"&gt;"/sitecore/media library" &lt;/span&gt;).Id;
logoFile.Name = &lt;span style="color: #a31515"&gt;"Logo"&lt;/span&gt;;
logoFile.Director = director;
logoFile.Store();
&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;That’s it. Enjoy :-)&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20883010-3209028117348004191?l=www.cassidy.dk%2Fblog%2Fsitecore%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/3209028117348004191/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20883010&amp;postID=3209028117348004191' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/3209028117348004191'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/3209028117348004191'/><link rel='alternate' type='text/html' href='http://www.cassidy.dk/blog/sitecore/2009/04/domainobjects-update-3-released.html' title='DomainObjects Update 3 released'/><author><name>Mark Cassidy</name><uri>http://www.blogger.com/profile/07054254475245848945</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03182104182261746826'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20883010.post-2793051456746866517</id><published>2009-04-01T14:17:00.003+01:00</published><updated>2009-04-04T20:18:37.439+01:00</updated><title type='text'>Old and trusted technology...</title><content type='html'>A friend of mine made me aware of an ongoing initiative today. It's one of those "of course. Why didn't I think of that?" things that are found in many corners around the Web, but of which only few gets truly wide acceptance.&lt;br&gt;&lt;br&gt;I'll do my bit to promote this initiative however.&lt;br&gt;&lt;br&gt;"Back in the day", when I was most heavily involved in what I term "Web Client Development" or "Front End Development", IE 4.0 was "the thing". Having blown the competition out of the water (by what means, is not a discussion I get much into), finally we were seeing the full potential of the web client get unlocked. Fancy javascript, alphaFilter direct X attributes, old fashioned TABLE layouts - and best of all, there simply &lt;a href="http://www.onestat.com/html/aboutus_pressbox23.html"&gt;WERE no other browsers on the market with any significant market share&lt;/a&gt;. Cross Browser testing was something you'd specify as an item on any proposal, and make sure the price tag was high enough that any client would opt out.&lt;br&gt;&lt;br&gt;Then along came a few... mishaps. IE 5.0 and 5.5 - none of them ever really took off. Firefox was released, and ol' Microsoft HAD to come up with something to compete again. And not a moment too soon. The answer came, in form of Internet Explorer 6.0. Or IE6 as it is lovingly coined today. According to my statistics on this blog, it is still being used by more than 35% of all readers of this blog - making it one of the largest players in the Browser Marketplace still. Not bad, considering it has been around since 2001. 8 years. What's that... two Internet Lifetimes?&lt;br&gt;&lt;br&gt;Of course, in THIS day and age, everybody wants a piece of IE6 sunshine. New versions of Firefox has been released, little brothers were spawned in form of IE7 and now IE8, and even Google Chrome has entered the arena. This is not even mentioning the preferred Safari browser on the Mac platform, or perhaps even Opera.&lt;br&gt;&lt;br&gt;But I say, forget all that. IE6 is a proven trusty workhorse. It will render more or less ANYTHING, and not be concerned with making your life miserable with words such as "Compliance", "Standards", "Reliability". It won't make your users confused with such advanced concepts as "Tabs". It has more security related updates than perhaps any other product in the world, and therefore MUST be the most secure product in the world.&lt;br&gt;&lt;br&gt;And best of all, everyone working in IT Operations don't have to figure out how to work the &lt;a href="http://technet.microsoft.com/en-us/ie/bb310673.aspx"&gt;Internet Explorer Administration Kit&lt;/a&gt; to install a later version. IE6 is already there, it's free of charge, it's integrated in the platform. What more could anyone want?&lt;br&gt;&lt;br&gt;I fully back this initiative. &lt;a href="http://saveie6.com/"&gt;Save IE6&lt;/a&gt;. Everything else just adds to an already complex environment, and trying to conform to every &lt;a href="http://en.wikipedia.org/wiki/Tom,_Dick_and_Harry"&gt;Tom, Dick and Harry&lt;/a&gt; browser product around is just a waste of everyone's time.&lt;br&gt;&lt;br&gt;So say we all!&lt;br&gt;&lt;br&gt;(at least today, we do ;-)) &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;EDIT: As some of you guessed (I would have thought all, but that was not the case), this post was inspired by all the April Fool pages being posted everywhere that day – where SaveIE6 is among them. Now back to more serious matters… ;-)&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20883010-2793051456746866517?l=www.cassidy.dk%2Fblog%2Fsitecore%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/2793051456746866517/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20883010&amp;postID=2793051456746866517' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/2793051456746866517'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/2793051456746866517'/><link rel='alternate' type='text/html' href='http://www.cassidy.dk/blog/sitecore/2009/04/old-and-trusted-technology.html' title='Old and trusted technology...'/><author><name>Mark Cassidy</name><uri>http://www.blogger.com/profile/07054254475245848945</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03182104182261746826'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20883010.post-4268487647807457635</id><published>2009-03-24T18:52:00.003Z</published><updated>2009-03-24T19:07:59.993Z</updated><title type='text'>090317 is out</title><content type='html'>Also known as &lt;a href="http://sdn.sitecore.net/SDN5/Products/Sitecore%20V5/Sitecore%20CMS%206/Update/6_0_1_rev_090317.aspx"&gt;6.0.1 Update-1&lt;/a&gt;.

Looking through the change log, this one doesn't appear to be critically important. Unless of course, you are experiencing one of the issues that were fixed.

On a more humourous note; a new feature arrived in this release. It reads: "A new MaxItemNameLength web.config setting was introduced, making it possible to change the maximum length of item names. The default value is 100 characters.".

If I have ever publicly stated that Sitecore never listens, I hereby withdraw my statement. I blogged about this oddity &lt;a href="http://www.cassidy.dk/blog/sitecore/2006_05_01_archive.html"&gt;only 3 years ago&lt;/a&gt;... ;-) And in case anybody is in doubt, I am entirely kidding :-) What I failed to realise when I blogged about this issue one spring morning back in 2006 is, that item names with more than 100 characters probably don't make much sense from a usability perspective. Why Sitecore decided to implement this as configurable NOW, I don't really know.

Edit: On reading through the original post, I came across a &lt;a href="https://www.blogger.com/comment.g?blogID=20883010&amp;amp;postID=114837454492765537"&gt;comment&lt;/a&gt; from &lt;a href="http://km-sitecore.tumblr.com/"&gt;Krystle&lt;/a&gt; dated 13 August 2008, which mentions the MaxItemNameLength setting in web.config. Now if Krystle knew this in August, did everyone else just happen to forget about it until today where Sitecore publishes this as a "new feature" as of 24 March 2009.

Lol.

I am probably overworked ;-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20883010-4268487647807457635?l=www.cassidy.dk%2Fblog%2Fsitecore%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/4268487647807457635/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20883010&amp;postID=4268487647807457635' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/4268487647807457635'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/4268487647807457635'/><link rel='alternate' type='text/html' href='http://www.cassidy.dk/blog/sitecore/2009/03/090317-is-out.html' title='090317 is out'/><author><name>Mark Cassidy</name><uri>http://www.blogger.com/profile/07054254475245848945</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03182104182261746826'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20883010.post-7876241785091668493</id><published>2009-03-12T00:20:00.002Z</published><updated>2009-03-12T00:28:07.374Z</updated><title type='text'>Surface PCs and you</title><content type='html'>This post falls slightly (well... quite a bit, to be honest :P) off topic. But outsite the Sitecore realm of computing my eyes are very clearly focused on what I personally believe to be a big thing in the years to come; Surface Computing. Or - at least - that's what the Microsoft term for it is.

Now I know we're all gobsmacked about the Sitecore 6 Page Editor facilities. But try and take a look at this, and tell me (honestly) you couldn't see technology like this implemented in a system like Sitecore.

&lt;a href="http://www.ted.com/index.php/talks/jeff_han_demos_his_breakthrough_touchscreen.html"&gt;Jeff Han: Unveiling the genius of multi-touch interface design&lt;/a&gt;

While I'm not even at a point (yet) where I can get my hands on the &lt;a href="http://www.microsoft.com/surface/about_faqs/faqs.aspx"&gt;Microsoft Surface SDK&lt;/a&gt;, I know myself well enough to realise - once this technology becomes more widely available, I won't be able to keep my nose out of it. Don't take that literally ;-)

Could you imagine working with the structure of your site in this manner?   Organising your Sitecore Media Library?     Drag-and-dropping renderings onto your layouts?

I'm rambling, I'm sure. But ideas like this is what drives great development. Anyone else? :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20883010-7876241785091668493?l=www.cassidy.dk%2Fblog%2Fsitecore%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/7876241785091668493/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20883010&amp;postID=7876241785091668493' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/7876241785091668493'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/7876241785091668493'/><link rel='alternate' type='text/html' href='http://www.cassidy.dk/blog/sitecore/2009/03/surface-pcs-and-you.html' title='Surface PCs and you'/><author><name>Mark Cassidy</name><uri>http://www.blogger.com/profile/07054254475245848945</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03182104182261746826'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20883010.post-7850924948961219885</id><published>2009-03-06T16:21:00.002Z</published><updated>2009-03-06T16:26:08.549Z</updated><title type='text'>Integrated Pipeline Update</title><content type='html'>Bit busy, so just a very quick update.

The Integrated Session Fix I &lt;a href="http://www.cassidy.dk/blog/sitecore/2009/02/session-state-and-integrated-pipeline.html"&gt;wrote about a couple of weeks back&lt;/a&gt; has now passed Sitecore QA and is now made available on &lt;a href="http://sdn5.sitecore.net/Products/Sitecore%20V5/Sitecore%20CMS%206/ReleaseNotes/KnownIssues%20Recommended/IIS%20in%20Integrated%20Pipeline%20mode.aspx"&gt;SDN&lt;/a&gt;. From personal experience I can concur, I've been running it myself on the websites I am working on and not had any problems (other than those already known and mentioned on SDN, specifically that IIS would recycle my pool often if not moving the Index folder out of the Web Root).

I fully realise that me running it on a handful of non-live sites doesn't qualify as QA however, so I'm glad to now see this somewhat officially endorsed :-)

The original post has also been updated.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20883010-7850924948961219885?l=www.cassidy.dk%2Fblog%2Fsitecore%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/7850924948961219885/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20883010&amp;postID=7850924948961219885' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/7850924948961219885'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/7850924948961219885'/><link rel='alternate' type='text/html' href='http://www.cassidy.dk/blog/sitecore/2009/03/integrated-pipeline-update.html' title='Integrated Pipeline Update'/><author><name>Mark Cassidy</name><uri>http://www.blogger.com/profile/07054254475245848945</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03182104182261746826'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20883010.post-4015679731756815441</id><published>2009-02-23T12:28:00.003Z</published><updated>2009-02-23T12:32:58.914Z</updated><title type='text'>PCheX this out...</title><content type='html'>If you're already maintaining a decent Sitecore Blogroll you know this. But in case this blog has escaped your attention, I think you need to take a look at this:

&lt;a href="http://sitecoreexperience.spaces.live.com/Blog/cns!F413DDB1281D6EEA!211.entry"&gt;Check your packages with PCheX&lt;/a&gt;

As someone who often designs update packages and mail them off to clients, I am sure this tool will quickly make it to the top of my list of favourite tools and save me a lot of hassle.

The description says it all lol... ;-)

"In a way, you can imagine PCheX to be like a little friendly elf who comes around and kindly whacks you around the head with a big rubber hammer if you design an unhealthy package. "

And we certainly don't want to get whacked by big rubber hammers do we? :P&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20883010-4015679731756815441?l=www.cassidy.dk%2Fblog%2Fsitecore%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/4015679731756815441/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20883010&amp;postID=4015679731756815441' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/4015679731756815441'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/4015679731756815441'/><link rel='alternate' type='text/html' href='http://www.cassidy.dk/blog/sitecore/2009/02/pchex-this-out.html' title='PCheX this out...'/><author><name>Mark Cassidy</name><uri>http://www.blogger.com/profile/07054254475245848945</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03182104182261746826'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20883010.post-3683621047070396768</id><published>2009-02-18T10:44:00.002Z</published><updated>2009-02-18T10:48:32.550Z</updated><title type='text'>Two for the bookmarks</title><content type='html'>Some of this information has been available for a while, it just hasn't been easy to locate. It actually still isn't ;-)   But at least these two links look like they might be more or less permanent.

1) &lt;a href="http://sdn.sitecore.net/SDN5/Products/Sitecore%20V5/Sitecore%20CMS%206/ReleaseNotes.aspx"&gt;Sitecore 6 Release Notes&lt;/a&gt;

Gives you all information about known current issues. A big help, which should help you avoid getting too stuck trying to solve a particular issue - only to find that it is already known, and in some cases even comes with a workaround.

2) &lt;a href="http://sdn.sitecore.net/Products/Sitecore%20V5/Sitecore%20CMS%206/ReleaseNotes/ChangeLog.aspx"&gt;Sitecore 6 Change Log&lt;/a&gt;

Detailed information about the individual updates, so you can now be confident when choosing whether to go with the Recommended Release or the Latest Release.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20883010-3683621047070396768?l=www.cassidy.dk%2Fblog%2Fsitecore%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/3683621047070396768/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20883010&amp;postID=3683621047070396768' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/3683621047070396768'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/3683621047070396768'/><link rel='alternate' type='text/html' href='http://www.cassidy.dk/blog/sitecore/2009/02/two-for-bookmarks.html' title='Two for the bookmarks'/><author><name>Mark Cassidy</name><uri>http://www.blogger.com/profile/07054254475245848945</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03182104182261746826'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20883010.post-6063408475113264730</id><published>2009-02-14T18:34:00.002Z</published><updated>2009-02-14T18:42:54.790Z</updated><title type='text'>DomainObjects Update 2 released</title><content type='html'>&lt;div&gt;&lt;div&gt;Just posted an update of DomainObjects onto the &lt;a href="http://trac.sitecore.net/DomainObjects"&gt;Sitecore Shared Source&lt;/a&gt; space.&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;Apart from a few tuneups, this update is primarily about built-in support for referrers.&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;Say you have a product hierarchy like this:&lt;/div&gt;

&lt;div&gt;&lt;a href="http://www.cassidy.dk/blog/sitecore/uploaded_images/snap3-767229.png"&gt;&lt;img style="WIDTH: 400px; CURSOR: hand; HEIGHT: 209px" alt="" src="http://www.cassidy.dk/blog/sitecore/uploaded_images/snap3-767216.png" border="0" /&gt;&lt;/a&gt; &lt;/div&gt;&lt;/div&gt;

We are then often tasked with listing or in other ways extracting products based on a selected category (or media, as could be the case in this example). In the simplest of forms, the output could look like this (although I hope no live site would ever look like this :P):

&lt;a href="http://www.cassidy.dk/blog/sitecore/uploaded_images/snap2-717333.png"&gt;&lt;img style="WIDTH: 357px; CURSOR: hand; HEIGHT: 400px" alt="" src="http://www.cassidy.dk/blog/sitecore/uploaded_images/snap2-717331.png" border="0" /&gt;&lt;/a&gt;

&lt;p&gt;
 &lt;/p&gt;&lt;p&gt;With DomainObjects this is now a very straight forward piece of code.  All based on &lt;a href="http://larsnielsen.blogspirit.com/tag/XSLT"&gt;an article by Lars Floe Nielsen&lt;/a&gt; which I often refer back to.
&lt;/p&gt;
&lt;a href="http://www.cassidy.dk/blog/sitecore/uploaded_images/snap1-739035.png"&gt;&lt;img style="WIDTH: 400px; CURSOR: hand; HEIGHT: 123px" alt="" src="http://www.cassidy.dk/blog/sitecore/uploaded_images/snap1-739033.png" border="0" /&gt;&lt;/a&gt;

&lt;p&gt;
Sitecore 6 package, sources, API documentation have all been posted to the &lt;a href="http://trac.sitecore.net/DomainObjects"&gt;Trac space&lt;/a&gt;.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20883010-6063408475113264730?l=www.cassidy.dk%2Fblog%2Fsitecore%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/6063408475113264730/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20883010&amp;postID=6063408475113264730' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/6063408475113264730'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/6063408475113264730'/><link rel='alternate' type='text/html' href='http://www.cassidy.dk/blog/sitecore/2009/02/domainobjects-update-2-released.html' title='DomainObjects Update 2 released'/><author><name>Mark Cassidy</name><uri>http://www.blogger.com/profile/07054254475245848945</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03182104182261746826'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20883010.post-6033214038515335008</id><published>2009-02-10T14:14:00.003Z</published><updated>2009-02-10T14:21:32.168Z</updated><title type='text'>Wow @ Sitecore 6 Item Creation Speed</title><content type='html'>I remember this was being brought up right around the time of release of Sitecore 6, that item creation speed had been increased since Sitecore 5.

To be honest, I haven't really noticed. Until today that is.

For a client, I am currently in the process of converting/migrating an entire website based on the &lt;a href="http://www.polopoly.com/"&gt;Polopoly CMS&lt;/a&gt; system to Sitecore 6. Essentially a process of getting all the source content, parsing and understanding it, mapping it to relevant Sitecore templates (around 20) in all and writing this entire new structure into Sitecore.

Take a look at the numbers I am getting.

Migration process starting....
Deleting existing content....done!
Building Table of Contents tree....done!
Building Departments tree....done!
Performing in-memory mapping...done!
Duration: -00:03:58.2400000
7271 items created in total
- 471 products
- 59 images
- 1678 documents
- 3728 other articles
- 1335 departments

7.271 items created (using BulkUpdateContext()) in just under 4 minutes.

One word. Fast! :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20883010-6033214038515335008?l=www.cassidy.dk%2Fblog%2Fsitecore%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/6033214038515335008/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20883010&amp;postID=6033214038515335008' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/6033214038515335008'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/6033214038515335008'/><link rel='alternate' type='text/html' href='http://www.cassidy.dk/blog/sitecore/2009/02/wow-sitecore-6-item-creation-speed.html' title='Wow @ Sitecore 6 Item Creation Speed'/><author><name>Mark Cassidy</name><uri>http://www.blogger.com/profile/07054254475245848945</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03182104182261746826'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20883010.post-6831466962861410178</id><published>2009-02-05T21:00:00.006Z</published><updated>2009-03-06T16:27:38.426Z</updated><title type='text'>Session State and the Integrated Pipeline in Sitecore</title><content type='html'>Currently (release 090120) Sitecore has a &lt;a href="http://sdn.sitecore.net/Products/Sitecore%20V5/Sitecore%20CMS%206/ReleaseNotes/KnownIssues/IIS%20in%20Integrated%20Pipeline%20mode.aspx"&gt;known issue&lt;/a&gt; when it comes to running in the new IIS7 Integrated Mode pipeline.

The issue states:

"The ASP.NET session state may be unavailable to web page’s code depending on the URL used to access a Web site’s homepage. This occurs with a short URL, such as &lt;a href="http://mysite.com/"&gt;http://mysite.com/&lt;/a&gt;, while longer URLs, such as &lt;a href="http://mysite.com/default.aspx"&gt;http://mysite.com/default.aspx&lt;/a&gt; do not encounter the issue. "

It actually goes a bit further than that. I did some testing on a completely fresh 090120, Created "Test1" under "Home". And then "Test2" under "Test1". Like so.

Sitecore
- Content
- - Home
- - - Test1
- - - - Test2

I set up my website to run 32 bit Integrated Pipeline, with a binding to host header "integrated". I then added some test code to the Sample Layout.aspx, like so.

%
string lala;
if ( HttpContext.Current.Session != null )
lala = "Session has value";
else
lala = "Session is NULL";
Response.Write( lala );
%

(Extremely bad coding practice however, don't do this in any real scenario :P Breaks preview and page editor and whatnot... was just to test)

Now, after navigating to the following URLs, I was getting these results.

&lt;a href="http://integrated/"&gt;http://integrated/&lt;/a&gt; "Session is NULL"
&lt;a href="http://integrated/default.aspx"&gt;http://integrated/default.aspx&lt;/a&gt; "Session has value"
&lt;a href="http://integrated/test1"&gt;http://integrated/test1&lt;/a&gt; "Session is NULL"
&lt;a href="http://integrated/test1.aspx"&gt;http://integrated/test1.aspx&lt;/a&gt; "Session has value"

Ok so. A known issue and according to Sitecore Support, no immediate ETA for a fix.

Why would you want this however? Well let's consider SEO. Often have I been met with the requirement that SEO friendly URLs are required. And for some reason, SEO specialists seem to think that &lt;a href="http://integrated/products/classical-piano"&gt;http://integrated/products/classical-piano&lt;/a&gt; is a better URL than &lt;a href="http://integrated/products/classical-piano.aspx"&gt;http://integrated/products/classical-piano.aspx&lt;/a&gt;. Whether they are right or not, I leave with someone who knows more about these things than I do. Bottom line is, I needed these types of URLs for a client of mine.

And I was curious :P

According to Microsoft, the list of &lt;a href="http://learn.iis.net/page.aspx/381/aspnet-20-breaking-changes-on-iis-70/"&gt;Breaking Changes&lt;/a&gt; for Integrated Pipeline isn't all that long, and none of those stood out to me as something that should be affecting Sitecore.

After much digging around, searching the web and reading lots and lots of articles about this new Integrated Pipeline - many of which was full of praise but none really helping me in any way - I finally came across something from someone who knew "what's what".

&lt;a href="http://bhaidar.net/cs/archive/2008/07/17/asp-net-session-state-for-native-http-requests-in-iis-7-0.aspx"&gt;ASP.NET Session State for Native HTTP Requests in IIS 7.0&lt;/a&gt;

Upon reading, I felt 99% sure this was the fix I was looking for. A bit of coding, and a bit of optimisation (read through the comments) and I was ready to give it a shot.

And it worked :-)

A bit of coding (or rather, code pasting), a compile, a simple web.config change and voila. Now all of the above URLs seem perfectly happy to give me the Session State I've come to rely on.

If you can't be bothered to set up a project for this yourself, I'm attaching the project and the DLL. Just plop the DLL into your /bin folder and add the following to your web.config at the end of the system.webserver/modules node.

add name="CorePointIntegratedSessionFix" type="CorePoint.IntegratedSessionFix.Module, CorePoint.IntegratedSessionFix"

remove name="Session"

add name="Session" type="System.Web.SessionState.SessionStateModule" preCondition=""

(excuse the markup, I am REALLY not happy with my blog texteditor.. but that's a story for another day)

And the project file here:

&lt;a href="http://www.cassidy.dk/blog/sitecore/CorePoint.IntegratedSessionFix.rar"&gt;CorePoint.IntegratedSessionFix.rar&lt;/a&gt;

Enjoy :-)

Caveat: Be aware however, I don't have the resources to execute a complete regression test of this fix. It seems fine, but there could be repercussions that I am not seeing at this stage. I have an open support ticket with Sitecore Support on this issue; and I will post these findings there for their review.

Will update if needed.

Update 23-February-2009

While eating my own dogfood on this fix, I was experiencing some fairly odd behaviour when using the Sitecore Content Editor. It would pause ever so often for a few seconds, and sometimes operations would get aborted and throw up a dialog box like "Session Terminated Unexpectedly".

Quite naturally I was worried this had to do with this fix. Turns out, it hasn't. It IS related to the integrated pipeline however - I had overlooked another issue from the Known Issues List which states:

A known issue in Microsoft IIS may cause Sitecore to restart during index rebuilding or package installation when Sitecore indexes are stored below the Sitecore web site root folder.Moving the Sitecore indexes outside website root will resolve the issue.To configure this, add the following to the "settings" section of web.config file: setting name="IndexFolder" value="C:\test\indexes"

Note: You must ensure that the application pool identity has full control over the chosen index folder. For more information about appropriate folder permissions, please refer to the Sitecore CMS 6 Installation Guide.

So if you do run integrated, don't get caught by this one. Like I just did :-)

Update: 6-March-2009

This has now passed Sitecore QA and is an official workaround according to &lt;a href="http://sdn5.sitecore.net/Products/Sitecore%20V5/Sitecore%20CMS%206/ReleaseNotes/KnownIssues%20Recommended/IIS%20in%20Integrated%20Pipeline%20mode.aspx"&gt;SDN&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20883010-6831466962861410178?l=www.cassidy.dk%2Fblog%2Fsitecore%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/6831466962861410178/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20883010&amp;postID=6831466962861410178' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/6831466962861410178'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/6831466962861410178'/><link rel='alternate' type='text/html' href='http://www.cassidy.dk/blog/sitecore/2009/02/session-state-and-integrated-pipeline.html' title='Session State and the Integrated Pipeline in Sitecore'/><author><name>Mark Cassidy</name><uri>http://www.blogger.com/profile/07054254475245848945</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03182104182261746826'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20883010.post-3855301225633895198</id><published>2009-02-03T16:45:00.002Z</published><updated>2009-02-03T17:41:33.040Z</updated><title type='text'>Expert Systems</title><content type='html'>I know many of you follow &lt;a href="http://thedailywtf.com/Articles/The-Expert-System.aspx"&gt;this blog&lt;/a&gt;, but today's entry certainly did bring back memories.

Those of us who worked when the IT industry (or maybe just the Internet industry, I am not THAT old :P) fired off probably all have some terrifying tale to tell that resembles todays entry in TheDailyWTF. Be it some director's nephew "who was a genuine whizkid with websites", old-skool Mainframe programmers adjusting to the new wave of computing or whatnot.

Fortunately, these days, this phenomenon is pretty much a thing of the past. Mostly anyway. IT/Web projects have become business critical and are therefore generally regarded as something best left to proven professionals with at least something of a track record. But even professionals get it wrong.

If we look at the article, Victor is probably what WTF describes as "&lt;a href="http://thedailywtf.com/Articles/The_Complicator_0x27_s_Gloves.aspx"&gt;A Complicator&lt;/a&gt;". In summary, described as:

"There are some so deeply embedded within The Complicators, that they've acquired a sort of sixth-sense: the ability to find meta-problems ("a problem with the process of creating a solution for the actual problem") in virtually any solution. As we've all seen, the systems that these developers create often end up as a barely functional application comprised of a Matryoshka-doll-like nesting of problems and solutions."

And this would all be funny if the most recent experience I had with such a type was "back in the 90s". It was actually very recent.

As a Sitecore consultant (as in, a consultant working with the Sitecore product, not to be confused with a consultant working for Sitecore) I was recently tasked with what looked to be a very straightforward assignment. The client had oversold (which is impressive given the current state of financial affairs) and needed an extra pair of hands to wrap up some loose ends on a few existing projects and then help on the implementation of 1-2 new sites from scratch.

The client didn't have years and years of experience in working with Sitecore, and therefore already had another professional Sitecore consultant on the task. He apparently came with an impressive track record, a good friend of the house and so on. All in all, this was promising to be a sweet deal and I was looking forward to it.

The first week or so, I would be working on my own. No problem. I mean, that's what one would be thinking, no?  Almost complete site, just a few issues with some "Related People" not showing quite like the client wanted it. Sounded like straight forward filtering to me, or possibly adjusting a few queries.

I should know better by now, that to jump to conclusions ;-)

Much to my surprise, when I started digging in, I found a Sitecore implementation unlike anything I've ever seen before. And I've seen quite a few. Both done in companies I worked for, in clients I've contracted to, in solutions I've been tasked to review. I was confident in my belief that I pretty much had this thing called "Sitecore" nailed and nothing could truly surprise me to any real extent.

Well how about this then.  Ever seen a entire Sitecore site done in just 1 rendering sitting hardcoded into 1 layout?     Ever seen a Sitecore site with 3 layers of inherited templates (65 of them in all, just about) yet the ENTIRE site consisted of content items ALL based on just 1 "Mega Template" (aptly named "Page")?     And being designed like this, ever tried to explain to your end user why there are 50 fields, and depending on what values you define in some of them, other fields need to have specific values set?

Complicator indeed.

We're not talking a simple website here either, mind you. While it is difficult to rate the complexity of a website, it had all the bits you would normally expect today. Content pages, menu structure, left hand navigation, right hand spot elements, you know. The works.

Ok so. With the issue at hand; "Mr. So and So displays BELOW Mrs. This and That on the People Page. We need the order to be reversed" I started investigating. Now what probably should have been a 30 minute task ended up taking a couple of days of my time. Backtracking through an immense hierarchy of included XSLT renderings, mode="whatIneedNow" switches and so on - just to get a basic overview of how this Expert System was actually producing page output. Must be my limited mental capacity shining through, or me getting old or something. Or both ;-)

See to build a site like this, essentially bypassing everything "Sitecore" except for perhaps "Sitecore-as-an-advanced-field-editor", one needs to come up with an alternative system. Enter "The Meta System".  A sophisticated hierarchy of tags, metatags and content "blobs" which users could then (in theory, at least) tag up and ultimately have displayed on the site. See there was a "PeopleLister" meta component, an "Office" component, and if you happened to tag everything up just right - you would eventually get information out on your site. All generated by the very clever rendering Expert System. And as for the problem at hand, I guess the system didn't really consider the order People needed to be presented. Worse yet - this changed from time to time. Sometimes an alphabetical list of All People was needed, and sometimes the order (as in the case I was tracking) followed "silly business rules" (this is an actual quote).

A week came and went, and I finally had the chance to confront my colleague-consultant. While my first inclination was to ask "WTF!?" I did start on a more subtle approach. After all, being a visitor to the client a consultant is expected to show some degree of humility - maybe they &lt;a href="http://thedailywtf.com/Articles/We-Prefer-Our-Way.aspx"&gt;preferred it their way&lt;/a&gt;.

Turns out they did.

Q: But what about the Page Editor?  Surely clients must have seen a Sitecore demonstration, Nicam or otherwise, and expect this to work?
A: Nah, noone uses that anyway. It's not imporant.

Q: Ok. So what about caching?  Sitecore has little chance to implement much in terms of useful caching when all it sees is ONE rendering on ONE layout?
A: That's not important. Servers are so quick today anyway.

Q: Umm ok. Well then what about user security?  How will you assign permissions in this hierarchy of metadata - controlling which users can actually access/change/delete what?
A: We just give everyone "Is Administrator" permissions and write a guide. If they break anything we can always restore back.

Q: Aha. Well how about integrating other Sitecore modules, like for eCommerce, SEO and so on?
A: It can be done. Or we can just install those on a separate installation and run it on a sub domain. That's what the users want anyway, not to complicate things.

Some may think I am kidding, sadly this is not the case :P  Not to complicate things....

Sitecore Support, you have my heartfelt sympathies. I certainly hope you don't get many of these cases dumped into your support tool. And if you do, kudos for what must be endlessly much more patience than I have myself. After these initial rounds in the ring, everyone decided it was probably best I went on to greener pastures and left them to it ;-)

Let me end this by pointing out what I have already pointed out in the past; please DO be aware that Sitecore is putting great effort into publishing guidelines, best practices and "Cookbooks" for how to approach Sitecore site implementation, development and handling.

&lt;a href="http://sdn.sitecore.net/Reference/Sitecore%206.aspx"&gt;They're all on SDN&lt;/a&gt;.  I haven't had time to read through ALL of them yet (shame on me); but if anyone has - is there a definition for Expert System in there? ;-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20883010-3855301225633895198?l=www.cassidy.dk%2Fblog%2Fsitecore%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/3855301225633895198/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20883010&amp;postID=3855301225633895198' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/3855301225633895198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/3855301225633895198'/><link rel='alternate' type='text/html' href='http://www.cassidy.dk/blog/sitecore/2009/02/expert-systems.html' title='Expert Systems'/><author><name>Mark Cassidy</name><uri>http://www.blogger.com/profile/07054254475245848945</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03182104182261746826'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20883010.post-2517461045873285218</id><published>2009-01-28T12:10:00.002Z</published><updated>2009-01-28T12:15:30.091Z</updated><title type='text'>Temporary files, again....</title><content type='html'>&lt;a href="http://www.cassidy.dk/blog/sitecore/uploaded_images/28-01-2009-11-55-30-704466.png"&gt;&lt;img style="WIDTH: 400px; CURSOR: hand; HEIGHT: 201px" alt="" src="http://www.cassidy.dk/blog/sitecore/uploaded_images/28-01-2009-11-55-30-704464.png" border="0" /&gt;&lt;/a&gt;
&lt;div&gt; &lt;/div&gt;&lt;div&gt;So about a month and a half after &lt;a href="http://www.cassidy.dk/blog/sitecore/2008/12/sitecore-packager-throwing.html"&gt;blogging about this very issue&lt;/a&gt;, here we go again. This time I wasn't thinking very deeply about things, so when I tried to install &lt;a href="http://sdn.sitecore.net/SDN5/Products/Sitecore%20V5/Sitecore%20CMS%206/Update/6_0_0_rev_081222.aspx"&gt;Update 8&lt;/a&gt; and got hit by a File Exists error I contacted Sitecore Support.&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;Luckily these guys are not without humour, and referred me back to my own blog post for a fix LOL ;-)   1 : 0 to Sitecore Support.&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;As can be seen, apparently all of these files were created 14/1. Now I have NO idea what I was doing that particular day, but I was wondering.... anyone else having this problem or is it just something really messed up on my development box here?&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;Gonna get to the bottom of this, one day... :P&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20883010-2517461045873285218?l=www.cassidy.dk%2Fblog%2Fsitecore%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/2517461045873285218/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20883010&amp;postID=2517461045873285218' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/2517461045873285218'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/2517461045873285218'/><link rel='alternate' type='text/html' href='http://www.cassidy.dk/blog/sitecore/2009/01/temporary-files-again.html' title='Temporary files, again....'/><author><name>Mark Cassidy</name><uri>http://www.blogger.com/profile/07054254475245848945</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03182104182261746826'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20883010.post-7716670853791423744</id><published>2009-01-26T14:34:00.002Z</published><updated>2009-01-26T14:46:11.525Z</updated><title type='text'>typesThatShouldNotBeExpanded</title><content type='html'>After having ran into this myself a few times, and for the 5th time being asked by one of my Sitecore friends; I though I would bring this one up.

Ever had trouble getting your ASP.NET ListView controls to retain ViewState or do standard Paging?

As many of you will know, Sitecore's web.config is a source of endless configuration fun. Sitecore's modular nature is basically founded on this configuration - want to switch something around or change how Sitecore works (at your own risk, usually, but that's ok)?  Web.config is the place to go.

Many of the settings are self explanatory and well commented, so working out what they do is fairly straight forward. In some cases, they are not, however.

If you look through, you will find an element named "
typesThatShouldNotBeExpanded".

In it you will find two entries:
&lt;ul&gt;&lt;li&gt;System.Web.UI.WebControls.Repeater&lt;/li&gt;&lt;li&gt;System.Web.UI.WebControls.DataList&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;And while I don't have enough insight into exactly HOW Sitecore ties in to the ASP.NET lifecycle to determine exactly WHY this setting is needed, I can however tell you what happens if you don't fully control it.&lt;/p&gt;&lt;p&gt;Say you have a control, where you drop in an ASP.NET ListView Control. Or a GridView control. They'll appear to work fine at first, but you'll quickly notice that paging and viewstate is acting up a bit on your controls.&lt;/p&gt;&lt;p&gt;The fix for this is easy, and as far as I know this is well known by Sitecore Support. Add your controls to this - almost black magic like - web.config setting, and you're set :-)&lt;/p&gt;&lt;p&gt;So&lt;/p&gt;&lt;p&gt;Add System.Web.UI.WebControls.ListView, and System.Web.UI.WebControls.GridView to this collection if you find paging, viewstate or other things "that normally works" doesn't.&lt;/p&gt;&lt;p&gt;I don't know when this setting was introduced, or even IF there is a reason Sitecore doesn't include these common controls in the list. Maybe there's a negative effect on performance or otherwise.&lt;/p&gt;&lt;p&gt;&lt;a href="http://uk.search.yahoo.com/search?p=typesThatShouldNotBeExpanded&amp;amp;fr=FP-tab-web-t340&amp;amp;ei=UTF-8&amp;amp;meta=vc%3D"&gt;Searching on the web&lt;/a&gt; only produces this one link (searching on SDN, two results but similarly without explanation), and that doesn't tell us anything else than the config setting was apparently introduced in Sitecore 5.3.2 071220.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20883010-7716670853791423744?l=www.cassidy.dk%2Fblog%2Fsitecore%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/7716670853791423744/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20883010&amp;postID=7716670853791423744' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/7716670853791423744'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/7716670853791423744'/><link rel='alternate' type='text/html' href='http://www.cassidy.dk/blog/sitecore/2009/01/typesthatshouldnotbeexpanded.html' title='typesThatShouldNotBeExpanded'/><author><name>Mark Cassidy</name><uri>http://www.blogger.com/profile/07054254475245848945</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03182104182261746826'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20883010.post-9074818339783376309</id><published>2009-01-06T20:07:00.010Z</published><updated>2009-01-07T11:05:15.799Z</updated><title type='text'>Sitecore MVPs announced</title><content type='html'>While those of us nominated have known this for a while, Sitecore today officially announced the &lt;a href="http://www.sitecore.net/en/News/Press%20releases/2009/Sitecore%20MVP%20Program%202008.aspx"&gt;Sitecore MVPs for 2008&lt;/a&gt;. A select list of 13 Sitecore professionals, of which I am proud to be named as one. Reportedly I am the first (and so far the only) UK based Sitecore MVP - and given I make my living here in London as an independent Sitecore consultant,&lt;em&gt; &lt;/em&gt;I can only hope this award helps open up a few doors down the road.

Up until the nomination came through on email, I didn't actually really know if the MVP programme was "alive" or if it was just something that would be "nice to have" inside Sitecore circles. I know Alex De Groot used the title for a while (and considering he probably wrote 10 blog posts for every one of the rest of the community put together, probably rightly so :P), but other than that the title didn't come up very often. Obviously Alex works for Sitecore now, and so probably no longer qualifies as such - not that his community contributions are less noticed for that reason. Cheers Alex, for being the one nominating me for this.

This brings about a point that I consider to be important. The MVP programme nominates people outside Sitecore itself. Which, with some reason, should make the MVPs a reliable source for real impressions and opinions on Sitecore as a product, Sitecore as a company and Sitecore as a business partner (well maybe less so). Without restrictions being imposed, mind you, as &lt;a href="http://sitecore.alexiasoft.nl/2008/04/23/my-lack-of-blogging/"&gt;Alex himself commented on earlier in 2008&lt;/a&gt;.

While personally I certainly have a vested interest in Sitecore (as I make my living from implementing it), I'd also like to think that I keep an open mind and share my thoughts on it all - be it positive or negative. No doubt this has been the source of some controversy from time to time ;-)

For that reason, here is the official list of Sitecore MVPs for 2008, with links to their blogs. I may not have been able to locate you all, so if you're on this list and have a blog I have not included - drop a comment. Sitecore will eventually make a similar list available on their site but until then, this should help the interested reader.

Australia
· &lt;a href="http://adeneys.wordpress.com/"&gt;Alistair Deneys&lt;/a&gt; (&lt;a href="http://www.nextdigital.com/"&gt;Next Digital Group&lt;/a&gt;)

Canada
· Eric Briand (&lt;a href="http://www.ergonet.com/"&gt;Ergonet&lt;/a&gt;)
· Glen McInnis (&lt;a href="http://www.nonlinearcreations.com/"&gt;Non-linear Creations&lt;/a&gt;)

Germany
· &lt;a href="http://blog.wojciech.org/"&gt;Christopher Wojciech&lt;/a&gt; (&lt;a href="http://www.netzkern.de/"&gt;Netzkern GmbH&lt;/a&gt;)
· &lt;a href="http://jgnk.spaces.live.com/"&gt;Julius Ganns&lt;/a&gt; (Netzkern GmbH)

Denmark
· Klaus Petersen (&lt;a href="http://www.alpha-solutions.dk/"&gt;Alpha Solutions A/S&lt;/a&gt;)
· &lt;a href="http://mcore.wordpress.com/"&gt;Thomas Eldblom&lt;/a&gt; (&lt;a href="http://www.pentia.dk/"&gt;Pentia A/S&lt;/a&gt;)

The Netherlands
· Justin Sjouw (&lt;a href="http://www.caesar.nl/"&gt;Caesar Optimit&lt;/a&gt;)
· &lt;a href="http://www.markvanaalst.com/"&gt;Marc van Aalst&lt;/a&gt; (&lt;a href="http://www.evident.nl/"&gt;Evident&lt;/a&gt;)

The United Kingdom
· &lt;a href="http://www.cassidy.dk/blog/sitecore/"&gt;Mark Cassidy&lt;/a&gt; (&lt;a href="http://www.corepoint-it.com/"&gt;CorePoint IT Limited&lt;/a&gt;) (btw, please don't click the company link... yet... :P)

USA
· Andy Uzick (FMC Technologies, Inc.)
· Sasha Pfandt (&lt;a href="http://www.digitaria.com/"&gt;Digitaria Interactive, Inc.&lt;/a&gt;)
· Ben Golden (&lt;a href="http://www.awarewebsolutions.com/"&gt;Aware Web Solutions&lt;/a&gt;) (must be cold in the Twin Cities this time of year :P)

Congrats everyone, and happy new year :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20883010-9074818339783376309?l=www.cassidy.dk%2Fblog%2Fsitecore%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/9074818339783376309/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20883010&amp;postID=9074818339783376309' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/9074818339783376309'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/9074818339783376309'/><link rel='alternate' type='text/html' href='http://www.cassidy.dk/blog/sitecore/2009/01/sitecore-mvps-announced.html' title='Sitecore MVPs announced'/><author><name>Mark Cassidy</name><uri>http://www.blogger.com/profile/07054254475245848945</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03182104182261746826'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20883010.post-5151442720161525302</id><published>2008-12-18T23:13:00.004Z</published><updated>2009-02-14T15:52:53.347Z</updated><title type='text'>TreelistEx not registering links in LinkDatabase</title><content type='html'>Ahh nothing like being kept up till 11pm on the last day before xmas holidays... :P

So here's the thing.

TreelistEx is broken. You're supposed to be using this field type to "tag" content. Probably most often, you will use this to tag up categories for news articles, blog posts, meta keywords and similar stuff.

And on that same note, quite obviously, you're supposed to be able to "reverse lookup" all these tags you can set. Not much point in having to loop through ALL of your 100.000 articles to find the ones that are marked "Holiday Capers" - Sitecore has a Link Database for that. If you've not worked with the Link Database before, Lars Nielsen has &lt;a href="http://larsnielsen.blogspirit.com/tag/XSLT"&gt;an excellent post&lt;/a&gt; about it.

But here's the catch. As I said, this is broken. Nothing you store in a TreelistEx field will be registered in the LinkDatabase.

"tree list", reference, droplink - sure. They all work. But not this one.

A little work with Dr. Reflector eventually led me in the right direction. Now why one would need to, is an entirely different story for a different day - I believe I already &lt;a href="http://www.cassidy.dk/blog/sitecore/2008/12/showing-sitecore-how-to-improve.html"&gt;had a few comments&lt;/a&gt; on that earlier.

It comes down to TreelistEx being unknown to Sitecore itself - odd as this may sound. The field type simply doesn't exist in FieldTypes.config - and this will eventually force Sitecore to skip the field when doing it's internal RebuildItem functionality. This is, as Reflector will tell you, the method that Sitecore will recursively call when rebuilding the Link Database.

Add the missing field type to /App_Config/FieldTypes.config - force a full rebuild of the Link Database - and everything now clicks into place as it should.

fieldType name="TreelistEx" type="Sitecore.Data.Fields.MultilistField,Sitecore.Kernel"

Thanks Sitecore. Where do I bill my lack of sleep? ;-)


EDIT: 14-February-2009

This fix was released in &lt;a href="http://sdn5.sitecore.net/Products/Sitecore%20V5/Sitecore%20CMS%206/Update/6_0_1_rev_090212.aspx"&gt;build 090212 (also known as Service Release 1)&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20883010-5151442720161525302?l=www.cassidy.dk%2Fblog%2Fsitecore%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/5151442720161525302/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20883010&amp;postID=5151442720161525302' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/5151442720161525302'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/5151442720161525302'/><link rel='alternate' type='text/html' href='http://www.cassidy.dk/blog/sitecore/2008/12/treelistex-not-registering-links-in.html' title='TreelistEx not registering links in LinkDatabase'/><author><name>Mark Cassidy</name><uri>http://www.blogger.com/profile/07054254475245848945</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03182104182261746826'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20883010.post-6573613728644355833</id><published>2008-12-18T15:04:00.002Z</published><updated>2008-12-18T15:40:48.038Z</updated><title type='text'>Showing Sitecore how to improve...</title><content type='html'>A while back, &lt;a href="http://sitecore.alexiasoft.nl/2008/12/02/show-sitecore-how-to-improve/"&gt;Alex De Groot&lt;/a&gt; invited to an open debate on areas where Sitecore could improve.

This post is my response.

Readers of this blog will have noticed, I often take a somewhat critical stance to Sitecore. What may not be so obvious at a first glance however is, my beef is not so much with the product itself, but rather Sitecore as the company behind the product. The issues that come from working with the product ultimately comes down to the practices that are in place in the company that creates it. Sure, a particular bug might be annoying but it's just the smoke - not the fire itself.

So I won't be requesting features, in short. In fact, if anything, I will request "no new features" at all; but instead point out that good solid project management practices, quality assurance, usability studies and whatnot make up a very important (if not the most important) part of any ongoing software development endeveaour. Even if I couldn't spell that right... ;-)

But then - it is also obviously very easy for me to just sit here and say "hey guys, manage your stuff - how hard can it be?!".  I've been doing software development for many years now, and if anything I've come to realise that perfection is more a direction than a goal in itself. I've seen improvements in the way Sitecore has been working, especially over the last year or so. Documentation for instance, has always been a weakness when working with Sitecore. So I was very pleased to find, that documentation is taking on a whole new level with &lt;a href="http://sdn5.sitecore.net/Reference/Sitecore%206/Documentation%20Package.aspx"&gt;The Sitecore 6 Documentation Package&lt;/a&gt; - while far from covering everything there is to say about working with Sitecore, it's certainly a step in the right direction. Through Sitecore Support I've had the priviledge of looking at some of the other documents still being drafted, and I'm glad to see that this new trend is taking on.

Documentation would have been top of my list still, as the first thing to improve. It doesn't matter that you have a good product, if noone knows about it.

With that said however, for crying out loud guys will you fix and consolidate your online information already?  Per Bering from Codehouse pointed this out as well as a comment to Alex' post. Your site search is absolute bollox and there is not a single other thing to say about it :P

"Did you mean..
&lt;a href="http://sdn5.sitecore.net/searchresult.aspx?q=xsl"&gt;xsl rendering&lt;/a&gt;
&lt;a href="http://sdn5.sitecore.net/searchresult.aspx?q=xsls"&gt;xsls rendering&lt;/a&gt;
&lt;a href="http://sdn5.sitecore.net/searchresult.aspx?q=xslext"&gt;xslext rendering&lt;/a&gt;
&lt;a href="http://sdn5.sitecore.net/searchresult.aspx?q=exslt"&gt;exslt rendering&lt;/a&gt;
&lt;a href="http://sdn5.sitecore.net/searchresult.aspx?q=xslt"&gt;xslt rederings&lt;/a&gt;
&lt;a href="http://sdn5.sitecore.net/searchresult.aspx?q=xslt"&gt;xslt renderingid&lt;/a&gt;
&lt;a href="http://sdn5.sitecore.net/searchresult.aspx?q=xslt"&gt;xslt renderingitem&lt;/a&gt;
&lt;a href="http://sdn5.sitecore.net/searchresult.aspx?q=xslt"&gt;xslt renderendtag&lt;/a&gt; "

... :P

Right now, the only way I am staying "on top" (if that's what I am, I don't know) of current Sitecore technical information is, by subscribing to roughly 20 Sitecore related blogs, chatting with people who work for Sitecore, chatting with other consultants who work for Sitecore partners and then as the last resort - the ultimate Sitecore tool; &lt;a href="http://www.red-gate.com/products/reflector/"&gt;Reflector&lt;/a&gt;. I've even seen Sitecore support personnel themselves point developers in the direction of Reflector as a source for information. And while it's a great tool, I can't really believe this is how it is meant to be. Notice btw, how I deliberately didn't include SDN5 as a common source of information for me. While I go there, it's very rare that I am able to successfully find what I'm looking for there - so the fallback option is Sitecore Support. Fortunately I find Sitecore Support very good, at least :-)

Enough about documentation however.

The second thing I would ask for, is for Sitecore to &lt;a href="http://en.wikipedia.org/wiki/Eating_one"&gt;start eating their own dogfood&lt;/a&gt;. If it's not good enough for you to run your own site on, it's certainly not good enough for the very large developer base out here who has very limited access to documentation on the product. Update notes and changelogs don't really tell a useful story as I think most who work with the product will know. I've never seen a changelog saying that the "admin" user no longer comes with Danish locale as default in a blank Sitecore 6 - and that this breaks the way some fields work in Sitecore - nor have I seen a note that it was fixed. It might exist somewhere; see "searching" above ;-)  Or what about Page Editor acting up and throwing exceptions if you happen to run Sitecore in a non "en" language context?  Or breaks if you don't set a layout for the Print device?

I would much rather wait an additional 3 months for any Sitecore release, if it means it has been fully implemented throughout the Sitecore organisation before being released to the general public. This will not cover all usage scenarios of Sitecore as a product - but it WILL get rid of "all those little annoyances" that are so very hard to explain to our customers. "Why does my image links break, if I do it this way instead of that way?" and so on. Fortunately, level 1 support is behind me - but then..  should we accept these kinds of issues at all?

Finally, and just for good measure, I will throw in a product feature comment. The Page Editor. Brilliant, but hugely underestimated right now. Find a good way to solve the problems of configurable controls (a.la SharePoint WebParts) getting easily added to layouts - and come up with some form of layout or rendering inheritance as pointed out by &lt;a href="http://adeneys.wordpress.com/2008/12/17/my-sitecore-wishlist/"&gt;another commentator&lt;/a&gt;. Not necessarily saying the suggested approach is the best one (although it very well might be), but it certainly is something that I would like to see addressed and solved.

In summary:

&lt;ol&gt;&lt;li&gt;Document. Love your developer base, please ;-)  Take a look at what &lt;a href="http://world.episerver.com/support/"&gt;the competition is doing&lt;/a&gt;, maybe expecting a new MSDN is asking too much after all ;-)&lt;/li&gt;&lt;li&gt;Eat it yourselves. First.&lt;/li&gt;&lt;li&gt;Keep evolving the Page Editor, which I honestly believe can be one of the absolute killer features and opens up a lot of opportunities for new development areas.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;That's not asking for much is it? ;-)  We were invited however.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20883010-6573613728644355833?l=www.cassidy.dk%2Fblog%2Fsitecore%2Fdefault.html' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/6573613728644355833/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20883010&amp;postID=6573613728644355833' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/6573613728644355833'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20883010/posts/default/6573613728644355833'/><link rel='alternate' type='text/html' href='http://www.cassidy.dk/blog/sitecore/2008/12/showing-sitecore-how-to-improve.html' title='Showing Sitecore how to improve...'/><author><name>Mark Cassidy</name><uri>http://www.blogger.com/profile/07054254475245848945</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03182104182261746826'/></author><thr:total>1</thr:total></entry></feed>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  