<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Brian Pedersen's Sitecore and .NET Blog</title>
	<atom:link href="http://briancaos.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://briancaos.wordpress.com</link>
	<description>A developer oriented blog about Sitecore, C#, ASP.NET and web related issues</description>
	<lastBuildDate>Mon, 18 Jan 2010 13:00:25 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='briancaos.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/b5bdd911cc2b5b39af2e0cd5eb9af380?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Brian Pedersen's Sitecore and .NET Blog</title>
		<link>http://briancaos.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://briancaos.wordpress.com/osd.xml" title="Brian Pedersen&#8217;s Sitecore and .NET Blog" />
		<item>
		<title>Removing dead masters from Sitecore</title>
		<link>http://briancaos.wordpress.com/2010/01/15/removing-dead-masters-from-sitecore/</link>
		<comments>http://briancaos.wordpress.com/2010/01/15/removing-dead-masters-from-sitecore/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 11:54:41 +0000</pubDate>
		<dc:creator>briancaos</dc:creator>
				<category><![CDATA[Sitecore 6]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[Masters]]></category>
		<category><![CDATA[Sitecore]]></category>

		<guid isPermaLink="false">http://briancaos.wordpress.com/?p=491</guid>
		<description><![CDATA[One of the major changes from Sitecore 5.3 to Sitecore 6.x is that Sitecore replaced the masters definintion with branches.
Sitecore masters have been around since Sitecore 4, and they allowed you to have items filled with predefined values. And they determined which types of pages could be created below another type of page. 
Both features have been replaced [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=briancaos.wordpress.com&blog=4258391&post=491&subd=briancaos&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p>One of the major changes from <a href="http://www.sitecore.net" target="_blank">Sitecore</a> 5.3 to Sitecore 6.x is that Sitecore replaced the masters definintion with <a href="http://mcore.wordpress.com/2008/08/20/no-more-masters/" target="_blank">branches</a>.</p>
<p>Sitecore masters have been around since Sitecore 4, and they allowed you to have items filled with predefined values. And they determined which types of pages could be created below another type of page. </p>
<p>Both features have been replaced with the <strong>__Standard values template</strong>.<br />
Furthermore, Sitecore have also introduced <strong>branches</strong>, which allows you to create a <a href="http://briancaos.wordpress.com/2009/12/01/creating-items-from-branches-in-sitecore/" target="_blank">hierachy of items</a>.</p>
<p>However, this does not mean that Sitecore have removed the field &#8220;<strong>__masters</strong>&#8221; which was previously used for storing the masters on an item. This is not a problem unless you import Sitecore items from a Sitecore 5.x solution into a Sitecore 6.x solution.<br />
For example, when upgrading an existing site, you might prefer to create Sitecore packages of content from your old 5.x website to the new 6.x website. These packages cannot contain the masters from the 5.x solution as there is nowhere to dump them in 6.x.</p>
<p>When the masters field on an item is not empty, Sitecore will not read the masters from the <strong>__Standard values</strong>. This is default behaviour and is expected. So after you have moved your items from 5.x to 6.x, you need to empty the masters field on each of the items you have imported.</p>
<p>The following function blanks the masters field for each item below the specified root item recursively:</p>
<pre class="brush: csharp;">public void ProcessItems(Item root)
{
  foreach (Item item in root.Children)
  {
    if (item.Fields[&quot;__masters&quot;] == null)
      continue;

    item.Editing.BeginEdit();
    try
    {
      item.Fields[&quot;__masters&quot;].Reset();
      item.BranchId = new ID(Guid.Empty);
      item.Editing.AcceptChanges();
    }
    catch
    {
      item.Editing.CancelEdit();
    }
    ProcessItems(item, ExecuteMode);
  }
}</pre>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/briancaos.wordpress.com/491/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/briancaos.wordpress.com/491/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/briancaos.wordpress.com/491/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/briancaos.wordpress.com/491/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/briancaos.wordpress.com/491/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/briancaos.wordpress.com/491/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/briancaos.wordpress.com/491/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/briancaos.wordpress.com/491/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/briancaos.wordpress.com/491/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/briancaos.wordpress.com/491/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=briancaos.wordpress.com&blog=4258391&post=491&subd=briancaos&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://briancaos.wordpress.com/2010/01/15/removing-dead-masters-from-sitecore/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/25db0dbe9728e65c205cb902b4aa9741?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">briancaos</media:title>
		</media:content>
	</item>
		<item>
		<title>Modal windows does not resize automatically</title>
		<link>http://briancaos.wordpress.com/2010/01/08/modal-windows-does-not-resize-automatically/</link>
		<comments>http://briancaos.wordpress.com/2010/01/08/modal-windows-does-not-resize-automatically/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 10:59:15 +0000</pubDate>
		<dc:creator>briancaos</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[General .NET]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Modal window]]></category>
		<category><![CDATA[ShowModalDialog]]></category>

		<guid isPermaLink="false">http://briancaos.wordpress.com/?p=483</guid>
		<description><![CDATA[I&#8217;m not sure if this is a bug or a feature, but when using modal windows in Internet Explorer, your HTML is not updated when the window.onresize event is fired. This is pretty annoying, since it is possible and even valid to open modal windows that is resizable:
var result = window.showModalDialog(&#34;/mypage.aspx&#34;, window, &#34;dialogHeight:500px; dialogWidth:700px; resizable:Yes; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=briancaos.wordpress.com&blog=4258391&post=483&subd=briancaos&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p>I&#8217;m not sure if this is a bug or a feature, but when using modal windows in Internet Explorer, your HTML is not updated when the <a href="https://developer.mozilla.org/En/DOM/Window.onresize" target="_blank">window.onresize</a> event is fired. This is pretty annoying, since it is possible and even valid to open modal windows that is resizable:</p>
<pre class="brush: jscript;">var result = window.showModalDialog(&quot;/mypage.aspx&quot;, window, &quot;dialogHeight:500px; dialogWidth:700px; resizable:Yes; scroll:No&quot;);</pre>
<p>Notice the <a href="http://www.webreference.com/js/tutorial1/dialog.html" target="_blank">resizable:Yes</a> parameter, which allows the modal window to be resized.</p>
<p>If your window contains HTML that resizes to the client width and height, and you resize the window, the <strong>window.onresize</strong> event is in fact fired, <a href="http://groups.google.com/group/microsoft.public.internetexplorer.general/browse_thread/thread/625bc0c5efa89689" target="_blank">but your HTML does not change</a>.</p>
<p>How do you overcome this issue? You will have to resize the HTML yourself, by hooking into the <strong>window.onresize</strong> event. Add the following to your HTML:</p>
<pre class="brush: jscript;">&lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot;&gt;
  window.onresize = function() {
  }
&lt;/script&gt;</pre>
<p>There is several ways to write HTML that can be resized. First of all, and most important, the elements that needs to be resized must be accessible from Javascript, so you will have to add the <a href="http://www.w3schools.com/tags/att_standard_id.asp" target="_blank">id attribute</a> to the HTML elements to resize.<br />
In my own project I added a <a href="http://stackoverflow.com/questions/83073/why-not-use-tables-for-layout-in-html" target="_blank">table</a> to my HTML. The table has the advantage of being dynamic in nature, and it is possible to select which columns that have a variable size and which have a dynamic size. Observe the following example:</p>
<pre class="brush: xml;">&lt;table id=&quot;tbl&quot; width=&quot;700px&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;
  &lt;tr&gt;
    &lt;td width=&quot;200px&quot;&gt;
      &lt;div id=&quot;colLeft&quot;&gt;
        &lt;!-- Some html --&gt;
      &lt;/div&gt;
    &lt;/td&gt;
    &lt;td width=&quot;100%&quot; valign=&quot;top&quot;&gt;
      &lt;div id=&quot;colCenter&quot;&gt;
        &lt;!-- Some html --&gt;
      &lt;/div&gt;
    &lt;/td&gt;
    &lt;td width=&quot;200px&quot;&gt;
      &lt;div id=&quot;colRight&quot;&gt;
        &lt;!-- Some html --&gt;
      &lt;/div&gt;
    &lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;</pre>
<p>My table has an <strong>id</strong> called &#8220;tbl&#8221; and starts with a width of 700px which is the default size of the modal dialog. The first and last columns are fixed in size, leaving the middle column resizable. To resize the table by width, all I have to add to my <strong>window.onresize</strong> is:</p>
<pre class="brush: jscript;">window.onresize = function() {
  document.getElementById(&quot;tbl&quot;).width = document.documentElement.clientWidth;
}</pre>
<p>The height is pushed to the default modal box height of 700px using the 3 div tags in each column, by adding a fixed height of 700px to each column:</p>
<pre class="brush: css;">#colLeft, #colCenter, #colRight {
  height:700px;
}</pre>
<p>To resize in height i will need to resize each div tag individually:</p>
<pre class="brush: jscript;">window.onresize = function() {
  document.getElementById(&quot;tbl&quot;).width = document.documentElement.clientWidth;
  document.getElementById(&quot;colLeft&quot;).style.height = document.documentElement.clientHeight;
  document.getElementById(&quot;colCenter&quot;).style.height = document.documentElement.clientHeight;
  document.getElementById(&quot;colRight&quot;).style.height = document.documentElement.clientHeight;
}</pre>
<p>Please notice that 2 onresize events are fired: One when resized in height and one when resized in width. You can therefore make your Javascript more effeicient by saving the old clientWidth and clientHeight in variables, and only resize the HTML if the values are changed:</p>
<pre class="brush: jscript;">var oldClientHeight = 0;
var oldClientWidth = 0;

window.onresize = function() {
  if (document.documentElement.clientWidth != oldClientWidth) {
    document.getElementById(&quot;tbl&quot;).width = document.documentElement.clientWidth;
    oldClientWidth = document.documentElement.clientWidth;
  }
  if (document.documentElement.clientHeight != oldClientHeight) {
    document.getElementById(&quot;colLeft&quot;).style.height = document.documentElement.clientHeight;
    document.getElementById(&quot;colCenter&quot;).style.height = document.documentElement.clientHeight;
    document.getElementById(&quot;colRight&quot;).style.height = document.documentElement.clientHeight;
    oldClientHeight = document.documentElement.clientHeight;
  }
}</pre>
<p>This reduces flickering a little bit.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/briancaos.wordpress.com/483/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/briancaos.wordpress.com/483/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/briancaos.wordpress.com/483/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/briancaos.wordpress.com/483/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/briancaos.wordpress.com/483/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/briancaos.wordpress.com/483/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/briancaos.wordpress.com/483/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/briancaos.wordpress.com/483/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/briancaos.wordpress.com/483/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/briancaos.wordpress.com/483/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=briancaos.wordpress.com&blog=4258391&post=483&subd=briancaos&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://briancaos.wordpress.com/2010/01/08/modal-windows-does-not-resize-automatically/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/25db0dbe9728e65c205cb902b4aa9741?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">briancaos</media:title>
		</media:content>
	</item>
		<item>
		<title>Using modal windows from C# code</title>
		<link>http://briancaos.wordpress.com/2009/12/02/using-modal-windows-from-c-code/</link>
		<comments>http://briancaos.wordpress.com/2009/12/02/using-modal-windows-from-c-code/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 10:32:10 +0000</pubDate>
		<dc:creator>briancaos</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[General .NET]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[GetPostBackEventReference]]></category>
		<category><![CDATA[Modal window]]></category>
		<category><![CDATA[RegisterClientScriptBlock]]></category>
		<category><![CDATA[ShowModalDialog]]></category>

		<guid isPermaLink="false">http://briancaos.wordpress.com/?p=479</guid>
		<description><![CDATA[&#8220;In user interface design, a modal window is a child window that requires the user to interact with it before they can return to operating the parent application, thus preventing the workflow on the application main window. Modal windows are often called heavy windows or modal dialogs because the window is often used to display [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=briancaos.wordpress.com&blog=4258391&post=479&subd=briancaos&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p>&#8220;<em>In </em><a title="User interface" href="/wiki/User_interface"><em>user interface</em></a><em> design, a <strong>modal window</strong> is a </em><a title="Window (computing)" href="/wiki/Window_(computing)#Properties"><em>child</em></a><em> window that requires the user to interact with it before they can return to operating the </em><a title="Tree (data structure)" href="/wiki/Tree_(data_structure)#Terminology"><em>parent</em></a><em> application, thus preventing the </em><a title="Workflow" href="/wiki/Workflow"><em>workflow</em></a><em> on the application main window. Modal windows are often called heavy windows or <strong>modal dialogs</strong> because the window is often used to display a </em><a title="Dialog box" href="/wiki/Dialog_box"><em>dialog box</em></a><em>.</em>&#8221; (source: <a href="http://en.wikipedia.org/wiki/Modal_window" target="_blank">Wikipedia</a>)</p>
<p>Modal windows in websites are client-controlled windows. A modal window is opened using a piece of <a href="http://en.wikipedia.org/wiki/JavaScript" target="_blank">Javascript</a>:</p>
<pre class="brush: jscript;">var result = window.showModalDialog(&quot;/MyModalWindow.aspx&quot;&quot;, &quot;&quot;&quot;&quot;, &quot;&quot;status:no&quot;&quot;);
alert(result);</pre>
<p>The modal window return value is also generated using client side Javascript:</p>
<pre class="brush: jscript;">window.returnValue = &quot;OK&quot;;
window.close();</pre>
<p>When you want to use a modal window from server-side C# code you can choose between several strategies. This is a strategy I have used with success.</p>
<p><strong>Step 1: Set up the Modal window</strong></p>
<p>This sample modal window contains only 2 buttons, an OK button and a Cancel button. Both buttons are server-side buttons. This is the HTML for my modal window:</p>
<pre class="brush: xml;">&lt;head runat=&quot;server&quot;&gt;
  &lt;title&gt;My Modal Window&lt;/title&gt;
  &lt;base target=&quot;_self&quot; /&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;form id=&quot;form1&quot; runat=&quot;server&quot;&gt;
    &lt;div&gt;
      &lt;asp:Button ID=&quot;btnOK&quot; runat=&quot;server&quot; text=&quot;OK&quot; onclick=&quot;btnOK_Click&quot; /&gt;
      &lt;asp:Button ID=&quot;btnCancel&quot; runat=&quot;server&quot; Text=&quot;Cancel&quot; onclick=&quot;btnCancel_Click&quot; /&gt;
    &lt;/div&gt;
    &lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>Please notice the <strong>&lt;base target=&#8221;-self&#8221;/&gt;</strong> tag in the header. Without this tag, all postbacks will open a new window.</p>
<p>The codebehind for the OK and Cancel button are the same, except for 2 things:</p>
<ul>
<li>When pressing the &#8220;OK&#8221; button i set the data to return from the modal window in a <a href="http://msdn.microsoft.com/en-us/library/ms178581.aspx" target="_blank">Session variable</a>.</li>
<li>The modal window return value is &#8220;OK&#8221; if I pressed <strong>btnOK</strong> or &#8220;Cancel&#8221; if I pressed <strong>btnCancel</strong>.</li>
</ul>
<p>When pressing a button I simply generate a <a href="http://msdn.microsoft.com/en-us/library/system.web.ui.page.registerclientscriptblock.aspx" target="_blank">client script block</a> that will close my window:</p>
<pre class="brush: csharp;">protected void btnOK_Click(object sender, EventArgs e)
{
  Session[&quot;MySession&quot;] = &quot;this is the data to return from my modal window&quot;;
  StringBuilder sb = new StringBuilder();
  sb.AppendLine(@&quot;&lt;script language=&quot;&quot;javascript&quot;&quot; type=&quot;&quot;text/javascript&quot;&quot;&gt;&quot;);
  sb.AppendLine(@&quot;  window.returnValue = &quot;&quot;OK&quot;&quot;&quot;);
  sb.AppendLine(@&quot;  window.close();&quot;);
  sb.AppendLine(@&quot;&lt;/script&gt;&quot;);
  ClientScript.RegisterClientScriptBlock(GetType(), &quot;close&quot;, sb.ToString());
}

protected void btnCancel_Click(object sender, EventArgs e)
{
  StringBuilder sb = new StringBuilder();
  sb.AppendLine(@&quot;&lt;script language=&quot;&quot;javascript&quot;&quot; type=&quot;&quot;text/javascript&quot;&quot;&gt;&quot;);
  sb.AppendLine(@&quot;  window.returnValue = &quot;&quot;Cancel&quot;&quot;&quot;);
  sb.AppendLine(@&quot;  window.close();&quot;);
  sb.AppendLine(@&quot;&lt;/script&gt;&quot;);
  ClientScript.RegisterClientScriptBlock(GetType(), &quot;close&quot;, sb.ToString());
}</pre>
<p><strong>Step 2: The calling code</strong></p>
<p>The modal window is called by pressing a button from a <a href="http://msdn.microsoft.com/en-us/library/65tcbxz3(VS.71).aspx" target="_blank">Web Form</a>.</p>
<pre class="brush: xml;">&lt;head runat=&quot;server&quot;&gt;
  &lt;title&gt;&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
  &lt;form id=&quot;form1&quot; runat=&quot;server&quot;&gt;
    &lt;div&gt;
      &lt;asp:Button ID=&quot;btnOpen&quot; runat=&quot;server&quot; Text=&quot;Open Modal Window&quot; onclick=&quot;btnOpen_Click&quot; /&gt;
    &lt;/div&gt;
    &lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>The button also generates a startup script when clicked:</p>
<pre class="brush: csharp;">protected void btnOpen_Click(object sender, EventArgs e)
{
  StringBuilder sb = new StringBuilder();
  sb.AppendLine(@&quot;&lt;script language=&quot;&quot;javascript&quot;&quot; type=&quot;&quot;text/javascript&quot;&quot;&gt;&quot;);
  sb.AppendLine(@&quot;  var result = window.showModalDialog(&quot;&quot;/MyModalWindow.aspx&quot;&quot;, &quot;&quot;&quot;&quot;, &quot;&quot;status:no&quot;&quot;);&quot;);
  sb.AppendLine(@&quot;  if (result == &quot;&quot;OK&quot;&quot;)&quot;);
  sb.AppendLine(@&quot;    &quot; + Page.ClientScript.GetPostBackEventReference(form1, &quot;MyArgument&quot;));
  sb.AppendLine(@&quot;&lt;/script&gt;&quot;);
  ClientScript.RegisterStartupScript(GetType(), &quot;btnOpen&quot;, sb.ToString());
}</pre>
<p>The Javascript does the following:</p>
<ul>
<li>Opens the modal window and waits for a return value.</li>
<li>If the return value is &#8220;OK&#8221; (= the user clicked the &#8220;OK&#8221; button in the modal window) I do a client-side postback, posting an argument called &#8220;MyArgument&#8221; (it is the <a href="http://msdn.microsoft.com/en-us/library/system.web.ui.clientscriptmanager.getpostbackeventreference.aspx" target="_blank">GetPostBackEventReference</a> that handles the postback for me).</li>
</ul>
<p>The postback can be intercepted on the <a href="http://www.w3schools.com/aspnet/aspnet_events.asp" target="_blank">Page_Load</a> event by looking for the value &#8220;MyArgument&#8221; in the <a href="http://www.codeproject.com/KB/aspnet/htmlelementclick.aspx" target="_blank">__EVENTARGUMENT</a> querystring. If such value exist, I can retrieve the value from the modal dialog:</p>
<pre class="brush: csharp;">protected void Page_Load(object sender, EventArgs e)
{
  if (!string.IsNullOrEmpty(Request[&quot;__EVENTARGUMENT&quot;]) &amp;&amp; Request[&quot;__EVENTARGUMENT&quot;] == &quot;MyArgument&quot;)
  {
    string value = Session[&quot;MySession&quot;];
    // now I can work with the value from the modal window
  }
}</pre>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/briancaos.wordpress.com/479/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/briancaos.wordpress.com/479/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/briancaos.wordpress.com/479/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/briancaos.wordpress.com/479/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/briancaos.wordpress.com/479/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/briancaos.wordpress.com/479/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/briancaos.wordpress.com/479/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/briancaos.wordpress.com/479/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/briancaos.wordpress.com/479/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/briancaos.wordpress.com/479/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=briancaos.wordpress.com&blog=4258391&post=479&subd=briancaos&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://briancaos.wordpress.com/2009/12/02/using-modal-windows-from-c-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/25db0dbe9728e65c205cb902b4aa9741?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">briancaos</media:title>
		</media:content>
	</item>
		<item>
		<title>Creating items from branches in Sitecore</title>
		<link>http://briancaos.wordpress.com/2009/12/01/creating-items-from-branches-in-sitecore/</link>
		<comments>http://briancaos.wordpress.com/2009/12/01/creating-items-from-branches-in-sitecore/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 10:33:34 +0000</pubDate>
		<dc:creator>briancaos</dc:creator>
				<category><![CDATA[Sitecore 6]]></category>
		<category><![CDATA[Branch]]></category>
		<category><![CDATA[Sitecore]]></category>

		<guid isPermaLink="false">http://briancaos.wordpress.com/?p=475</guid>
		<description><![CDATA[The branch concept in Sitecore is a method for creating multiple items at once. A branch consists of a branch item and below that item is several items. All of these items will be created when adding the branch item.
To do this in C# code is very simple:
using Sitecore.Data.Items;
using Sitecore.Diagnostics;

private const string _BRANCH_ITEM = &#34;/sitecore/templates/Branches/MyBranches/MyBranch&#34;;

public void [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=briancaos.wordpress.com&blog=4258391&post=475&subd=briancaos&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p>The <a href="http://contenttree.blogspot.com/2008/08/organizing-branch-templates.html" target="_blank">branch</a> concept in <a href="http://www.sitecore.net" target="_blank">Sitecore</a> is a method for creating multiple items at once. A branch consists of a branch item and below that item is several items. All of these items will be created when adding the branch item.</p>
<p>To do this in C# code is very simple:</p>
<pre class="brush: csharp;">using Sitecore.Data.Items;
using Sitecore.Diagnostics;

private const string _BRANCH_ITEM = &quot;/sitecore/templates/Branches/MyBranches/MyBranch&quot;;

public void Create(Item parent, string name)
{
  BranchItem branch = globalDataFolder.Database.GetItem(_BRANCH_ITEM);
  Assert.IsNotNull(branch, &quot;Could not find Data branch at &quot; + _BRANCH_ITEM);
  parent.Add(name, branch);
}</pre>
<p>The <strong>BranchItem</strong> class wraps the Sitecore item as a branch item. And the standard <strong>Add</strong> function on an item will take a branch item as parameter, creating the branch as subitems below the item.</p>
<p>As you can see there really is no difference from creating items based on branches compared to items created on templates, as the Add function takes both a <strong>TemplateItem</strong> and a <strong>BranchItem</strong> as parameter.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/briancaos.wordpress.com/475/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/briancaos.wordpress.com/475/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/briancaos.wordpress.com/475/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/briancaos.wordpress.com/475/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/briancaos.wordpress.com/475/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/briancaos.wordpress.com/475/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/briancaos.wordpress.com/475/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/briancaos.wordpress.com/475/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/briancaos.wordpress.com/475/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/briancaos.wordpress.com/475/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=briancaos.wordpress.com&blog=4258391&post=475&subd=briancaos&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://briancaos.wordpress.com/2009/12/01/creating-items-from-branches-in-sitecore/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/25db0dbe9728e65c205cb902b4aa9741?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">briancaos</media:title>
		</media:content>
	</item>
		<item>
		<title>Sitecore: Linking to Sitecore editor from an .aspx page</title>
		<link>http://briancaos.wordpress.com/2009/11/13/sitecore-linking-to-sitecore-editor-from-an-aspx-page/</link>
		<comments>http://briancaos.wordpress.com/2009/11/13/sitecore-linking-to-sitecore-editor-from-an-aspx-page/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 08:14:32 +0000</pubDate>
		<dc:creator>briancaos</dc:creator>
				<category><![CDATA[Sitecore 6]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[Editor]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[Sitecore]]></category>

		<guid isPermaLink="false">http://briancaos.wordpress.com/?p=471</guid>
		<description><![CDATA[This tip comes from Thomas Stern, who got the tip from the Sitecore support team. I am not very well founded in the Sitecore XAML development, so I often find myself using an .aspx page to extend the Sitecore shell.
And sometimes I need my own .aspx page to open the Sitecore editor at a certain [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=briancaos.wordpress.com&blog=4258391&post=471&subd=briancaos&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p>This tip comes from <a href="http://istern.dk/blog.aspx" target="_blank">Thomas Stern</a>, who got the tip from the Sitecore support team. I am not very well founded in the Sitecore XAML development, so I often find myself using an .aspx page to extend the Sitecore shell.<br />
And sometimes I need my own .aspx page to open the Sitecore editor at a certain Sitecore item. I thought that was impossible, untill Thomas Stern showed me how to do that.</p>
<p>In order to run the Sitecore content editor from an .aspx page, you need to be logged into Sitecore in the shell domain. Then you call the Sitecore client like this:</p>
<pre class="brush: plain;">/sitecore/shell/Applications/Content Manager/Default.aspx?fo={AA7D559F-ABA5-8F6A-ABCD-0ABDF7E74EE1}</pre>
<p>This opens the Sitecore editor at the item specified in the &#8220;<strong>fo</strong>&#8221; parameter.<br />
There are more parameters:</p>
<pre class="brush: plain;">/sitecore/shell/Applications/Content%20Manager/default.aspx?fo={id}[&amp;la={language}][&amp;vs={version}]&amp;mo=preview</pre>
<ul>
<li>fo = The item to open the Sitecore editor at</li>
<li>la = The language to open</li>
<li>vs = The version to open</li>
<li>mo=preview. This parameter removes the content tree at the left side.</li>
</ul>
<p>To open the Sitecore editor in a new window by clicking a button from your own .aspx page, you can do the following: Create an ordinary <a href="http://www.w3schools.com/ASPNET/aspnet_button.asp" target="_blank">asp:Button</a> control and extend the <a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.button.onclientclick.aspx" target="_blank">OnClientClick</a> property:</p>
<pre class="brush: csharp;">Item myItem = MySitecoreItemToOpen();
myButton.OnClientClick = &quot;javascript:window.open('/sitecore/shell/Applications/Content Manager/Default.aspx?fo=&quot; + myItem.ID + &quot;'); return false;&quot;;</pre>
<p>&nbsp;</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/briancaos.wordpress.com/471/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/briancaos.wordpress.com/471/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/briancaos.wordpress.com/471/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/briancaos.wordpress.com/471/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/briancaos.wordpress.com/471/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/briancaos.wordpress.com/471/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/briancaos.wordpress.com/471/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/briancaos.wordpress.com/471/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/briancaos.wordpress.com/471/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/briancaos.wordpress.com/471/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=briancaos.wordpress.com&blog=4258391&post=471&subd=briancaos&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://briancaos.wordpress.com/2009/11/13/sitecore-linking-to-sitecore-editor-from-an-aspx-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/25db0dbe9728e65c205cb902b4aa9741?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">briancaos</media:title>
		</media:content>
	</item>
		<item>
		<title>Advanced Sitecore Google Maps (WCAG Edition)</title>
		<link>http://briancaos.wordpress.com/2009/10/30/advanced-sitecore-google-maps-wcag-edition/</link>
		<comments>http://briancaos.wordpress.com/2009/10/30/advanced-sitecore-google-maps-wcag-edition/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 12:39:30 +0000</pubDate>
		<dc:creator>briancaos</dc:creator>
				<category><![CDATA[Sitecore 6]]></category>
		<category><![CDATA[508]]></category>
		<category><![CDATA[AA]]></category>
		<category><![CDATA[Google maps]]></category>
		<category><![CDATA[Sitecore]]></category>
		<category><![CDATA[WCAG]]></category>

		<guid isPermaLink="false">http://briancaos.wordpress.com/?p=461</guid>
		<description><![CDATA[Advanced Sitecore Google Maps (WCAG Edition) is a new module for Sitecore. The module provides maps, that are accessible and meet the Section 508 requirements. The module is very easy to use for your Sitecore editors.
Google Maps from Google is a great tool, that you can make to your tool with this module. Users are [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=briancaos.wordpress.com&blog=4258391&post=461&subd=briancaos&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p><a href="http://www.pentia.net/en/Kompetencer_og_produkter/Produkter/Sitecore_Google_Maps_WCAG.aspx?submenu" target="_blank">Advanced Sitecore Google Maps (WCAG Edition)</a> is a new module for <a href="http://www.sitecore.net" target="_blank">Sitecore</a>. The module provides maps, that are accessible and meet the Section 508 requirements. The module is very easy to use for your Sitecore editors.</p>
<p>Google Maps from Google is a great tool, that you can make to your tool with this module. Users are familiar with Google Maps, from many other sites. They know how to zoom in and out and switch between various map types. There is a possibility to show the geodesic maps, terrain maps, satellite maps and combinations.</p>
<p>It is becoming increasingly more important that websites are accessible. The Advanced Sitecore Google Maps module expands Google Maps features to also be accessible and meet the requirements of WCAG 2.0 level AA and Section 508. This module is the only map solution for Sitecore, that meets the WCAG 2.0 Level AA.</p>
<p>The module provides multiple ways of viewing a Google Map, including several filters and accessibility lists. As a developer, you can develop your own views:</p>
<div id="attachment_463" class="wp-caption aligncenter" style="width: 310px"><a href="http://briancaos.files.wordpress.com/2009/10/googlemaps01.jpg"><img class="size-medium wp-image-463" title="GoogleMaps01" src="http://briancaos.files.wordpress.com/2009/10/googlemaps01.jpg?w=300&#038;h=227" alt="Google Maps view including 3-level filter and accessibility list" width="300" height="227" /></a><p class="wp-caption-text">Google Maps view including 3-level filter and accessibility list</p></div>
<p>The module is configured from Sitecore using custom Sitecore editors directly on the item that show the map. You can <strong>enter an address</strong>, or move the map marker to find the map center:</p>
<div id="attachment_462" class="wp-caption aligncenter" style="width: 310px"><a href="http://briancaos.files.wordpress.com/2009/10/googlemapsmap.jpg"><img class="size-medium wp-image-462" title="GoogleMapsMap" src="http://briancaos.files.wordpress.com/2009/10/googlemapsmap.jpg?w=300&#038;h=194" alt="Create a map in Sitecore" width="300" height="194" /></a><p class="wp-caption-text">Create a map in Sitecore</p></div>
<p>When creating a map you have full control over the zoom control, the map types to include (including moon, mars and sky views) and how the map should be displayed. You can even add the overview map and the Google search box to your map.</p>
<p>Markers, polygons and polylines are called &#8220;overlays&#8221;. These overlays can be grouped, and these groups can be used to filter overlays from the map, or to inherit marker icons. All overlays contain titles, text, alternative text and address information that can be used when presenting the overlay.</p>
<p>Markers are created similar to creating a map, by entering an address or moving a marker to the designated position.</p>
<div id="attachment_464" class="wp-caption aligncenter" style="width: 310px"><a href="http://briancaos.files.wordpress.com/2009/10/googlemapsmarker.jpg"><img class="size-medium wp-image-464" title="GoogleMapsMarker" src="http://briancaos.files.wordpress.com/2009/10/googlemapsmarker.jpg?w=300&#038;h=207" alt="Creating a marker in Sitecore" width="300" height="207" /></a><p class="wp-caption-text">Creating a marker in Sitecore</p></div>
<p>Polygons and polylines are created in a similar fashion, simply by clicking on the map untill the polygon or polyline is drawn. The polygon and polyline colors, line thickness and transparency are fully controllable:</p>
<div id="attachment_465" class="wp-caption aligncenter" style="width: 310px"><a href="http://briancaos.files.wordpress.com/2009/10/googlemapspolygon.jpg"><img class="size-medium wp-image-465" title="GoogleMapsPolygon" src="http://briancaos.files.wordpress.com/2009/10/googlemapspolygon.jpg?w=300&#038;h=213" alt="Adding a polygon to the overlays collection" width="300" height="213" /></a><p class="wp-caption-text">Adding a polygon to the overlays collection</p></div>
<p>In order to use Google Maps, you need to register your URL at Google. If your website has many URL&#8217;s, you need to register each of them, including sub-domains (<a href="http://www.mysite.com">www.mysite.com</a> and mysite.com for example). The module contains a key manager where you add all of your Google Maps keys, and the module automatically finds the correct key:</p>
<div id="attachment_466" class="wp-caption aligncenter" style="width: 310px"><a href="http://briancaos.files.wordpress.com/2009/10/googlemapskeys.jpg"><img class="size-medium wp-image-466" title="GoogleMapsKeys" src="http://briancaos.files.wordpress.com/2009/10/googlemapskeys.jpg?w=300&#038;h=150" alt="Multiple Google Maps key management" width="300" height="150" /></a><p class="wp-caption-text">Multiple Google Maps key management</p></div>
<p><a href="http://www.pentia.net/en/Kompetencer_og_produkter/Produkter/Sitecore_Google_Maps_WCAG.aspx?submenu" target="_blank">Click here to read more about the module</a>, or <a href="http://pt.googlemaps.test.pentia.net/" target="_blank">Click here to see a demo of the module</a>.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/briancaos.wordpress.com/461/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/briancaos.wordpress.com/461/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/briancaos.wordpress.com/461/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/briancaos.wordpress.com/461/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/briancaos.wordpress.com/461/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/briancaos.wordpress.com/461/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/briancaos.wordpress.com/461/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/briancaos.wordpress.com/461/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/briancaos.wordpress.com/461/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/briancaos.wordpress.com/461/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=briancaos.wordpress.com&blog=4258391&post=461&subd=briancaos&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://briancaos.wordpress.com/2009/10/30/advanced-sitecore-google-maps-wcag-edition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/25db0dbe9728e65c205cb902b4aa9741?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">briancaos</media:title>
		</media:content>

		<media:content url="http://briancaos.files.wordpress.com/2009/10/googlemaps01.jpg?w=300" medium="image">
			<media:title type="html">GoogleMaps01</media:title>
		</media:content>

		<media:content url="http://briancaos.files.wordpress.com/2009/10/googlemapsmap.jpg?w=300" medium="image">
			<media:title type="html">GoogleMapsMap</media:title>
		</media:content>

		<media:content url="http://briancaos.files.wordpress.com/2009/10/googlemapsmarker.jpg?w=300" medium="image">
			<media:title type="html">GoogleMapsMarker</media:title>
		</media:content>

		<media:content url="http://briancaos.files.wordpress.com/2009/10/googlemapspolygon.jpg?w=300" medium="image">
			<media:title type="html">GoogleMapsPolygon</media:title>
		</media:content>

		<media:content url="http://briancaos.files.wordpress.com/2009/10/googlemapskeys.jpg?w=300" medium="image">
			<media:title type="html">GoogleMapsKeys</media:title>
		</media:content>
	</item>
		<item>
		<title>Google Maps polyline encoding in C#</title>
		<link>http://briancaos.wordpress.com/2009/10/16/google-maps-polyline-encoding-in-c/</link>
		<comments>http://briancaos.wordpress.com/2009/10/16/google-maps-polyline-encoding-in-c/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 11:53:44 +0000</pubDate>
		<dc:creator>briancaos</dc:creator>
				<category><![CDATA[General .NET]]></category>
		<category><![CDATA[Sitecore 6]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[fromEncoded]]></category>
		<category><![CDATA[Google maps]]></category>
		<category><![CDATA[GPolyline]]></category>
		<category><![CDATA[Sitecore]]></category>

		<guid isPermaLink="false">http://briancaos.wordpress.com/?p=444</guid>
		<description><![CDATA[One of the new features in the Advanced Sitecore Google Maps (WCAG edition) is the ability to draw polylines. Polylines in Google Maps can be drawn using 2 methods: By creating a new GPolyline with the array of coordinates to draw, or by using the GPolyline.fromEncoded function which takes an encoded string of coordinates and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=briancaos.wordpress.com&blog=4258391&post=444&subd=briancaos&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p>One of the new features in the <a href="http://www.pentia.net/en/Kompetencer_og_produkter/Produkter/Sitecore_Google_Maps_WCAG.aspx" target="_blank">Advanced Sitecore Google Maps (WCAG edition)</a> is the ability to draw polylines. Polylines in <a href="http://maps.google.com/" target="_blank">Google Maps</a> can be drawn using 2 methods: By creating a new <a href="http://code.google.com/intl/da/apis/maps/documentation/reference.html#GPolyline" target="_blank">GPolyline</a> with the array of coordinates to draw, or by using the <a href="http://code.google.com/intl/da/apis/maps/documentation/reference.html#GPolyline.fromEncoded" target="_blank">GPolyline.fromEncoded</a> function which takes an <a href="http://code.google.com/intl/da/apis/maps/documentation/polylinealgorithm.html" target="_blank">encoded string of coordinates</a> and renders this as a line.</p>
<p>The encoded polyline function has the advantage of being faster and more compressed compared with feeding the GPolyline with an array of coordinates. However, some of the precision is lost, as the encoding algorithm only uses 5 digit coordinates. 5 digits is still a pretty good precision, so I decided to go with the encoded string.</p>
<p>I was looking for a method of encoded my coordinates in C# when i stumbled upon a solution on the <a href="http://soulsolutions.com.au/Default.aspx?tabid=96" target="_blank">SoulSolutions webpage</a>, where the developer demonstrates a Javascript and C# method to encode and decode polyline coordinates.</p>
<p>This is the C# method re-written. <a href="http://soulsolutions.com.au/" target="_blank">SoulSolutions</a> should be credited for the code. However, his code examples are incomplete, so I rewrote them. First I need a Coordinate class, which contains the latitude and longitude of a coordinate set (I have removed comments and other stuff to compress the code):</p>
<pre class="brush: csharp;">public class Coordinate
{
  public double Latitude { get; set; }
  public double Longitude { get; set; }
}</pre>
<p>The following function <strong>EncodeCoordinates</strong> encodes a list of coordinates into an encoded string:</p>
<pre class="brush: csharp;">/// &lt;summary&gt;
/// Encodes the list of coordinates to a Google Maps encoded coordinate string.
/// &lt;/summary&gt;
/// &lt;param name=&quot;coordinates&quot;&gt;The coordinates.&lt;/param&gt;
/// &lt;returns&gt;Encoded coordinate string&lt;/returns&gt;
public static string EncodeCoordinates(List&lt;Coordinate&gt; coordinates)
{
  int plat = 0;
  int plng = 0;
  StringBuilder encodedCoordinates = new StringBuilder();
  foreach (Coordinate coordinate in coordinates)
  {
    // Round to 5 decimal places and drop the decimal
    int late5 = (int)(coordinate.Latitude * 1e5);
    int lnge5 = (int)(coordinate.Longitude * 1e5);
    // Encode the differences between the coordinates
    encodedCoordinates.Append(EncodeSignedNumber(late5 - plat));
    encodedCoordinates.Append(EncodeSignedNumber(lnge5 - plng));
    // Store the current coordinates
    plat = late5;
    plng = lnge5;
  }
  return encodedCoordinates.ToString();
}
/// &lt;summary&gt;
/// Encode a signed number in the encode format.
/// &lt;/summary&gt;
/// &lt;param name=&quot;num&quot;&gt;The signed number&lt;/param&gt;
/// &lt;returns&gt;The encoded string&lt;/returns&gt;
private static string EncodeSignedNumber(int num)
{
  int sgn_num = num &lt;&lt; 1; //shift the binary value
  if (num &lt; 0) //if negative invert
  {
    sgn_num = ~(sgn_num);
  }
  return (EncodeNumber(sgn_num));
}

/// &lt;summary&gt;
/// Encode an unsigned number in the encode format.
/// &lt;/summary&gt;
/// &lt;param name=&quot;num&quot;&gt;The unsigned number&lt;/param&gt;
/// &lt;returns&gt;The encoded string&lt;/returns&gt;
private static string EncodeNumber(int num)
{
  StringBuilder encodeString = new StringBuilder();
  while (num &gt;= 0x20)
  {
    encodeString.Append((char)((0x20 | (num &amp; 0x1f)) + 63));
    num &gt;&gt;= 5;
  }
  encodeString.Append((char)(num + 63));
  // All backslashes needs to be replaced with double backslashes
  // before being used in a Javascript string.
  return encodeString.ToString().Replace(@&quot;\&quot;, @&quot;\\&quot;);
}</pre>
<p>Using the encoded string, I can draw a line surrounding Denmark like this:</p>
<pre class="brush: jscript;">var line = new GPolyline.fromEncoded({
               color: &quot;#0000FF&quot;,
               weight: 5,
               opacity: 0.5,
               points: &quot;kpgiI}{wt@{xeDfxv@ylqC|flAyfyDidPiioBoabD_fkAyjfDooZ{nyCtw_BihCnzlBzbyAl}XehjBfp`B_se@vdgAhdPya_BoabDipHoabDngiAsen@jz}@htcAzqt@itcAnha@|~eBdzh@qqnBf~w@zrlCjkx@fppAy{u@zflA{zRpeuC`zWh`]bmx@}byAlwn@ny{DncNn}nDsxd@uqG&quot;,
               levels: &quot;BBBBBBBBBBBBBBBBBBBBBBBBBBBB&quot;,
               zoomFactor: 32,
               numLevels: 4 });</pre>
<p>The line looks like this using 28 coordinates:</p>
<div id="attachment_452" class="wp-caption aligncenter" style="width: 310px"><a href="http://briancaos.files.wordpress.com/2009/10/denmark.jpg"><img class="size-medium wp-image-452" title="Denmark" src="http://briancaos.files.wordpress.com/2009/10/denmark.jpg?w=300&#038;h=165" alt="Line drawing using GPolyline.fromEncoded" width="300" height="165" /></a><p class="wp-caption-text">Line drawing using GPolyline.fromEncoded</p></div>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/briancaos.wordpress.com/444/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/briancaos.wordpress.com/444/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/briancaos.wordpress.com/444/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/briancaos.wordpress.com/444/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/briancaos.wordpress.com/444/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/briancaos.wordpress.com/444/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/briancaos.wordpress.com/444/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/briancaos.wordpress.com/444/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/briancaos.wordpress.com/444/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/briancaos.wordpress.com/444/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=briancaos.wordpress.com&blog=4258391&post=444&subd=briancaos&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://briancaos.wordpress.com/2009/10/16/google-maps-polyline-encoding-in-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/25db0dbe9728e65c205cb902b4aa9741?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">briancaos</media:title>
		</media:content>

		<media:content url="http://briancaos.files.wordpress.com/2009/10/denmark.jpg?w=300" medium="image">
			<media:title type="html">Denmark</media:title>
		</media:content>
	</item>
		<item>
		<title>Assigning Security to items in Sitecore 6 programatically</title>
		<link>http://briancaos.wordpress.com/2009/10/02/assigning-security-to-items-in-sitecore-6-programatically/</link>
		<comments>http://briancaos.wordpress.com/2009/10/02/assigning-security-to-items-in-sitecore-6-programatically/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 09:25:36 +0000</pubDate>
		<dc:creator>briancaos</dc:creator>
				<category><![CDATA[Sitecore 6]]></category>
		<category><![CDATA[AccessRuleCollection]]></category>
		<category><![CDATA[Membership]]></category>
		<category><![CDATA[Roles]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[Sitecore]]></category>

		<guid isPermaLink="false">http://briancaos.wordpress.com/?p=438</guid>
		<description><![CDATA[When Sitecore 6 came out, Sitecore changed the Security model dramatically. Sitecore now uses the .net security model, and on top of this they have built a set of classes to help with the assigning of roles and members.
You will find the helper classes in the Sitecore.Security namespace:
using Sitecore.Security.Accounts;
using Sitecore.Security.AccessControl;
Access rights to items can be added [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=briancaos.wordpress.com&blog=4258391&post=438&subd=briancaos&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p>When Sitecore 6 came out, <a href="http://www.sitecore.net" target="_blank">Sitecore</a> changed the Security model dramatically. Sitecore now uses the <a href="http://articles.sitepoint.com/article/asp-net-2-security" target="_blank">.net security model</a>, and on top of this they have built a set of classes to help with the assigning of roles and members.</p>
<p>You will find the helper classes in the <strong>Sitecore.Security</strong> namespace:</p>
<pre class="brush: csharp;">using Sitecore.Security.Accounts;
using Sitecore.Security.AccessControl;</pre>
<p>Access rights to items can be added programatically to any item using the <strong>AccessRuleCollection</strong> class. The following example demonstates how to apply read access to a role (group) using the AccessRuleCollection:</p>
<pre class="brush: csharp;">public void SetAccess(Item item)
{
  Role myRole = Role.FromName(&quot;sitecore\\myRole&quot;);

  // Get the current accessrules
  AccessRuleCollection accessRules = item.Security.GetAccessRules();

  // Apply read access for the &quot;myRole&quot; to the current item
  // and all it's children
  accessRules.Helper.AddAccessPermission(myRole,
     AccessRight.ItemRead,
     PropagationType.Any,
     AccessPermission.Allow);

  // Write the rules back to the item
  item.Editing.BeginEdit();
  item.Security.SetAccessRules(accessRules);
  item.Editing.EndEdit(); 
}</pre>
<p>As you already know, the Item in the function&#8217;s parameter must come from the &#8220;master&#8221; database.</p>
<p>The <strong>AddAccessPermission</strong> is pretty straight forward. In my example I grant access to a role, but the function will also take a user. Please also note that when retrieving a role or user from the user database, you must prefix the user or role name with the domain name.</p>
<p>The <strong>AccessRight</strong> class defines which right to apply to the item. If you need to grant more than one right, you will need to add them one by one. Like in this example:</p>
<pre class="brush: csharp;">PropagationType pt = PropagationType.Any;
AccessPermission ap = AccessPermission.Allow;
accessRules.Helper.AddAccessPermission(myRole, AccessRight.ItemRead, pt, ap);
accessRules.Helper.AddAccessPermission(myRole, AccessRight.ItemWrite, pt, ap);
accessRules.Helper.AddAccessPermission(myRole, AccessRight.ItemRename, pt, ap);
accessRules.Helper.AddAccessPermission(myRole, AccessRight.ItemCreate, pt, ap);
accessRules.Helper.AddAccessPermission(myRole, AccessRight.ItemDelete, pt, ap);
accessRules.Helper.AddAccessPermission(myRole, AccessRight.WorkflowStateDelete, pt, ap);
accessRules.Helper.AddAccessPermission(myRole, AccessRight.WorkflowStateWrite, pt, ap);
accessRules.Helper.AddAccessPermission(myRole, AccessRight.WorkflowCommandExecute, pt, ap);</pre>
<p>The <strong>PropagationType</strong> enumeration determines which items will be granted the access right. <strong>Any</strong> means the item and all items inheriting. <strong>Descendants</strong> applies rights to inheriting children only, and <strong>Entity</strong> applies right to the item only.</p>
<p>Finally, the <strong>AccessPermission</strong> enumeration determines whether to grant (allow) or deny the access right.</p>
<p>If you wish to know more about the Sitecore security model, you should read the <a href="http://sdn.sitecore.net/Reference/Sitecore%206/Security%20API%20Cookbook.aspx" target="_blank">Sitecore Security API Cookbook</a> (available for members of the <a href="http://sdn.sitecore.net/" target="_blank">Sitecore Developer Network</a> only).</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/briancaos.wordpress.com/438/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/briancaos.wordpress.com/438/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/briancaos.wordpress.com/438/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/briancaos.wordpress.com/438/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/briancaos.wordpress.com/438/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/briancaos.wordpress.com/438/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/briancaos.wordpress.com/438/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/briancaos.wordpress.com/438/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/briancaos.wordpress.com/438/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/briancaos.wordpress.com/438/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=briancaos.wordpress.com&blog=4258391&post=438&subd=briancaos&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://briancaos.wordpress.com/2009/10/02/assigning-security-to-items-in-sitecore-6-programatically/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/25db0dbe9728e65c205cb902b4aa9741?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">briancaos</media:title>
		</media:content>
	</item>
		<item>
		<title>Sitecore 6 addAspxExtension=&#8221;false&#8221; issue</title>
		<link>http://briancaos.wordpress.com/2009/09/21/sitecore-6-addaspxextensionfalse-issue/</link>
		<comments>http://briancaos.wordpress.com/2009/09/21/sitecore-6-addaspxextensionfalse-issue/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 10:53:24 +0000</pubDate>
		<dc:creator>briancaos</dc:creator>
				<category><![CDATA[Sitecore 6]]></category>

		<guid isPermaLink="false">http://briancaos.wordpress.com/?p=432</guid>
		<description><![CDATA[In my previous post (LinkManager &#8211; Working with URL&#8217;s in Sitecore 6) I was quite enthusiastic about the addAspxExtension feature, which allows you to disable the .aspx extension in Sitecore URL&#8217;s, as long as you provide an 404 handler or use IIS7.
Unfortunately the feature seemes to affect the Sitecore Client negatively, because when enabling it, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=briancaos.wordpress.com&blog=4258391&post=432&subd=briancaos&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p>In my previous post (<a href="http://briancaos.wordpress.com/2009/09/11/linkmanager-working-with-urls-in-sitecore-6/" target="_blank">LinkManager &#8211; Working with URL&#8217;s in Sitecore 6</a>) I was quite enthusiastic about the <strong>addAspxExtension</strong> feature, which allows you to disable the .aspx extension in Sitecore URL&#8217;s, as long as you provide an 404 handler or use IIS7.</p>
<p>Unfortunately the feature seemes to affect the Sitecore Client negatively, because when enabling it, it is no longer possible to edit Sitecore contents:</p>
<div id="attachment_433" class="wp-caption aligncenter" style="width: 310px"><a href="http://briancaos.files.wordpress.com/2009/09/scerror.jpg"><img class="size-medium wp-image-433" title="addAspxExtension=false" src="http://briancaos.files.wordpress.com/2009/09/scerror.jpg?w=300&#038;h=275" alt="addAspxExtension=false error" width="300" height="275" /></a><p class="wp-caption-text">addAspxExtension=false issue</p></div>
<p>The problem was found using a Sitecore 6.0.0 rev. 081222 running on a IIS6. If you are running this version of Sitecore, you should not set the addAspxExtension to false if your site requires the Sitecore editor to work. If your installation is a front-end server only, you should have no problems.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/briancaos.wordpress.com/432/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/briancaos.wordpress.com/432/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/briancaos.wordpress.com/432/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/briancaos.wordpress.com/432/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/briancaos.wordpress.com/432/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/briancaos.wordpress.com/432/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/briancaos.wordpress.com/432/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/briancaos.wordpress.com/432/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/briancaos.wordpress.com/432/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/briancaos.wordpress.com/432/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=briancaos.wordpress.com&blog=4258391&post=432&subd=briancaos&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://briancaos.wordpress.com/2009/09/21/sitecore-6-addaspxextensionfalse-issue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/25db0dbe9728e65c205cb902b4aa9741?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">briancaos</media:title>
		</media:content>

		<media:content url="http://briancaos.files.wordpress.com/2009/09/scerror.jpg?w=300" medium="image">
			<media:title type="html">addAspxExtension=false</media:title>
		</media:content>
	</item>
		<item>
		<title>LinkManager &#8211; Working with URL&#8217;s in Sitecore 6</title>
		<link>http://briancaos.wordpress.com/2009/09/11/linkmanager-working-with-urls-in-sitecore-6/</link>
		<comments>http://briancaos.wordpress.com/2009/09/11/linkmanager-working-with-urls-in-sitecore-6/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 09:43:00 +0000</pubDate>
		<dc:creator>briancaos</dc:creator>
				<category><![CDATA[Sitecore 6]]></category>
		<category><![CDATA[Google Analytics]]></category>
		<category><![CDATA[LinkManager]]></category>
		<category><![CDATA[Sitecore]]></category>
		<category><![CDATA[URL]]></category>

		<guid isPermaLink="false">http://briancaos.wordpress.com/?p=418</guid>
		<description><![CDATA[Have you noticed that a page in Sitecore 6 can be accessed through several URL&#8217;s? This is an example of the products page on the Sitecore website. The following URL&#8217;s are all valid and points to the same page and the same language:
http://www.sitecore.net/en/Products.aspx
http://www.sitecore.net/Products.aspx
http://www.sitecore.net/Products.aspx?sc_lang=en
http://www.sitecore.net/Products
http://www.sitecore.net/?sc_itemid={5D8489BF-419B-4336-B9DA-CA704C682B51}
This can confuse statistical tools like Google Analytics, as the statistical data is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=briancaos.wordpress.com&blog=4258391&post=418&subd=briancaos&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p>Have you noticed that a page in Sitecore 6 can be accessed through several URL&#8217;s? This is an example of the products page on the Sitecore website. The following URL&#8217;s are all valid and points to the same page and the same language:</p>
<p><a href="http://www.sitecore.net/en/Products.aspx">http://www.sitecore.net/en/Products.aspx</a><br />
<a href="http://www.sitecore.net/Products.aspx">http://www.sitecore.net/Products.aspx</a><br />
<a href="http://www.sitecore.net/Products.aspx?sc_lang=en">http://www.sitecore.net/Products.aspx?sc_lang=en</a><br />
<a href="http://www.sitecore.net/Products">http://www.sitecore.net/Products</a><br />
<a href="http://www.sitecore.net/?sc_itemid={5D8489BF-419B-4336-B9DA-CA704C682B51">http://www.sitecore.net/?sc_itemid={5D8489BF-419B-4336-B9DA-CA704C682B51</a>}</p>
<p>This can confuse statistical tools like <a href="http://www.google.com/intl/en_ALL/analytics/" target="_blank">Google Analytics</a>, as the statistical data is collected per URL basis. Sitecore&#8217;s own <a href="http://www.sitecore.net/en/Products/Sitecore-Online-Marketing-Suite.aspx" target="_blank">Online Marketing Suite</a> does not have this problem, but all tools that collects data from Javascripts inserted on the page will get confused. It is hard to get a total number of hits for one page, as you have to collect the statistics scattered over many URL&#8217;s.</p>
<p>So how can you limit the number of URL&#8217;s to one page? The solution lies within the <strong>linkManager</strong> setting in web.config:</p>
<pre class="brush: xml;">&lt;linkManager defaultProvider=&quot;sitecore&quot;&gt;
  &lt;providers&gt;
    &lt;clear /&gt;
    &lt;add name=&quot;sitecore&quot; type=&quot;Sitecore.Links.LinkProvider, Sitecore.Kernel&quot;
         addAspxExtension=&quot;true&quot;
         alwaysIncludeServerUrl=&quot;false&quot;
         encodeNames=&quot;true&quot;
         languageEmbedding=&quot;asNeeded&quot;
         languageLocation=&quot;filePath&quot;
         shortenUrls=&quot;true&quot;
         useDisplayName=&quot;false&quot; /&gt;
  &lt;/providers&gt;
&lt;/linkManager&gt;</pre>
<p>These are the default settings in the web.config, which allows the widest range of available URL&#8217;s per page. But this is not always a good thing. The following settings caught my eye:</p>
<pre class="brush: xml;">languageEmbedding=&quot;asNeeded&quot;</pre>
<p>This setting allows Sitecore to add the language as a part of the URL &#8220;as needed&#8221;. In practice this means &#8220;as the wind blows&#8221; because it is very hard to find a pattern for when the language is added and not. My recommentation is to use &#8220;<strong>always</strong>&#8221; for multiple language sites, and &#8220;<strong>never</strong>&#8221; for single language sites.</p>
<p>Another cool setting is this:</p>
<pre class="brush: xml;">addAspxExtension=&quot;true&quot;</pre>
<p>Setting this to &#8220;<strong>false</strong>&#8221; removes the .aspx extension for all URL&#8217;s. In order for this to work you will need to use <a href="http://learn.iis.net/page.aspx/244/how-to-take-advantage-of-the-iis7-integrated-pipeline/" target="_blank">IIS7</a> and map all incomming requests to ASP.NET, or write your own 404 error handler that redirects any incomming request to the correct .aspx page.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/briancaos.wordpress.com/418/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/briancaos.wordpress.com/418/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/briancaos.wordpress.com/418/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/briancaos.wordpress.com/418/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/briancaos.wordpress.com/418/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/briancaos.wordpress.com/418/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/briancaos.wordpress.com/418/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/briancaos.wordpress.com/418/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/briancaos.wordpress.com/418/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/briancaos.wordpress.com/418/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=briancaos.wordpress.com&blog=4258391&post=418&subd=briancaos&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://briancaos.wordpress.com/2009/09/11/linkmanager-working-with-urls-in-sitecore-6/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/25db0dbe9728e65c205cb902b4aa9741?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">briancaos</media:title>
		</media:content>
	</item>
	</channel>
</rss>