<?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/"
	>

<channel>
	<title>Marker - Full Service Digital Agency &#187; Our Blog</title>
	<atom:link href="http://www.markerstudio.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.markerstudio.com</link>
	<description>Full Service Digital Agency</description>
	<lastBuildDate>Wed, 17 Feb 2010 00:30:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>WebKit is the most popular browser on mobile devices</title>
		<link>http://www.markerstudio.com/design/2010/02/webkit-is-the-most-popular-browser-on-mobile-devices/</link>
		<comments>http://www.markerstudio.com/design/2010/02/webkit-is-the-most-popular-browser-on-mobile-devices/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 00:30:18 +0000</pubDate>
		<dc:creator>Darren</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[Usability]]></category>

		<guid isPermaLink="false">http://www.markerstudio.com/?p=2213</guid>
		<description><![CDATA[
What would you prefer me to do? Spend my time hacking around issues in older technologies like Internet Explorer 6 or would you like that time spent making the site look the best that it can on better desktop browsers, as well as on the iPhone, iPod Touch, iPad, Blackberry and a whole host of [...]]]></description>
			<content:encoded><![CDATA[<blockquote>
<p>What would you prefer me to do? Spend my time hacking around issues in older technologies like Internet Explorer 6 or would you like that time spent making the site look the best that it can on better desktop browsers, as well as on the iPhone, iPod Touch, iPad, Blackberry and a whole host of other mobile devices?</p>
</blockquote>
<p> &#8212; <a href="http://forabeautifulweb.com/blog/about/do_try_this_at_work/">Andy Clarke makes a very interesting point</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.markerstudio.com/design/2010/02/webkit-is-the-most-popular-browser-on-mobile-devices/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Introducing the Marker Kentico Business Library (MKB)</title>
		<link>http://www.markerstudio.com/technical/2010/02/introducing-the-marker-kentico-business-library-mkb/</link>
		<comments>http://www.markerstudio.com/technical/2010/02/introducing-the-marker-kentico-business-library-mkb/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 01:45:03 +0000</pubDate>
		<dc:creator>Keith</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[CMS]]></category>
		<category><![CDATA[Kentico]]></category>
		<category><![CDATA[repository]]></category>

		<guid isPermaLink="false">http://www.markerstudio.com/?p=2183</guid>
		<description><![CDATA[A complete business layer facade for  the kentico document and custom table apis. Offers strongly typed access to the custom document types and custom tables along with best practice business entities repository approach to working with kentico data.]]></description>
			<content:encoded><![CDATA[<div id="attachment_2198" class="wp-caption alignleft" style="width: 130px"><a href="http://www.markerstudio.com/wp-content/uploads/2010/02/mkb.png"><img class="size-full wp-image-2198" title="Marker Kentico Business Library" src="http://www.markerstudio.com/wp-content/uploads/2010/02/mkb.png" alt="Marker Kentico Business Library" width="120" height="120" /></a><p class="wp-caption-text">Marker Kentico Business Library</p></div>
<p>Marker have created a complete business layer facade for working across the kentico document apis. Why would we do such a crazy thing? Well, we found that on larger and more complex web applications that we had a certain amount of trouble with the standard approach.</p>
<p>When you use custom document types in Kentico, your rows are either returned as a CMS.TreeEngine.TreeNode or a System.Data.DataRow depending on what part of the api you are using. So the first main driver for our business layer was to be able to have a business entity class that mapped directly to a custom document type in Kentico. This means we know exactly  how a particular document type is represented in our application and know exactly what properties it has.</p>
<p>Also, you have different apis depending on whether or not you are using workflow/versioning or not.  All of the recommended development articles within the Kentico documentation generally assume you are working with published documents on your site which might not always be the case.</p>
<p>It should be noted that this approach is really for aspx template advocates looking to get the maximum control and performance from Kentico. This approach is likely overkill for smaller sites and is not applicable for the portal engine approach.</p>
<p>This article will focus on the basics of creating an entity class mapping to your custom document type and using the generic repository to perform some standard operations. There&#8217;s a lot of functionality in the MKB library beyond what is shown here and we doubt there is anything you can do with the kentico document api that you can&#8217;t do more easily and cleanly with the MKB library, if there is, let us know!</p>
<p><span style="color: #ff0000;"><strong>This library works against v5 with the 5.0.5 hot fix applied only. Just drop it in your bin folder and off you go..</strong></span></p>
<h2><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: small;"><span style="line-height: 19px; white-space: normal;">Let&#8217;s create our first document entity class&#8230;</span></span></h2>
<p>You can see a sample entity below which maps to a custom document type in our application. You will need to create this for each custom document type in your application. Note that we are currently working on code generation which will automatically generate these classes for you against the Kentico database. We think this would be a great feature to have within Kentico itself at some point.</p>
<p>Make sure you entity class inherits from the DocumentEntity class (Marker.Kentico.Business.Entities.DocumentEntity). This class includes all the core fields for a kentico document instance.</p>
<p>Next, you should apply a special<strong> table attribute</strong>. The table attribute allows you to set the<em> class name </em>(maps to kentico document type&#8217;s class name) and <em>default alias path</em> (the default alias path which forms the basis of all data access for the entity by default). In addition (not shown below) there is the possibility of setting the<em> default site code </em>(default site code for all data access for the entity by default if required with multi site solutions and also a <em>default wildcard alias key (</em>for automatically loading the entity based on a wildcard alias. If you don&#8217;t set this it&#8217;s the name of the entity lowercased, in this case &#8217;supplier&#8217;).</p>
<p>Next, apply special <strong>field attributes</strong> for each property you want to map to a kentico document type. Note that your property names can be different from the underlying field if you want, and you can specific the nature of the binding (read, insert, update, all) as required.</p>
<p>This is all that is required to start using MKB, create a simply entity and move on to the next step, where the fun begins!</p>
<pre><code>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 35px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">using Marker.Kentico.Business.Attributes;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 35px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">using Marker.Kentico.Business.Enumeration</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 35px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">using Marker.Kentico.Business.Entitie</div>

using Marker.Kentico.Business.Attributes;
using Marker.Kentico.Business.Enumerations;
using Marker.Kentico.Business.Entities;</code></pre>
<pre><code>
   <span style="color: #ff0000;"> </span><strong><span style="color: #ff0000;">[Table("SMS.Supplier",@"/data/suppliers")]</span></strong>
    public class Supplier : <span style="color: #ff0000;"><strong>DocumentEntity</strong></span>
    {

        private string _companyName = string.Empty;

        public Supplier()
        { }

        <strong><span style="color: #ff0000;">[Field("CustomerCode", FieldBindingType.All)]</span></strong>
        public string CustomerCode { get; set; }

        [Field("CompanyName", FieldBindingType.All)]
        public string CompanyName {
            get { return _companyName; }
            set
            {
                _companyName = value;
                this.DocumentName = value;
            }
        }

        [Field("ImageThumb", FieldBindingType.All)]
        public Guid ImageThumb { get; set; }

        [Field("Url", FieldBindingType.All)]
        public string Url { get; set; }

        [Field("Address", FieldBindingType.All)]
        public string Address { get; set; }

        [Field("Phone", FieldBindingType.All)]
        public string Phone { get; set; }

    }

</code></pre>
<pre><code><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 19px; white-space: normal; font-size: 13px;">
<h2 style="font-size: 1.5em; "><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: small;"><span style="line-height: 19px; white-space: normal;">Let's work with our entities using the document repository...</span></span></h2>
<div><span style="font-size: small;"><span style="font-size: 13px;">
<pre style="font: normal normal normal 12px/18px Consolas, Monaco, 'Courier New', Courier, monospace; "><code><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 19px; white-space: normal; font-size: 13px;">All you need to do is to put a using statement to the entities and repository namespaces</span></code></pre>
<p></span></span></div>
<div>
<pre style="font: normal normal normal 12px/18px Consolas, Monaco, 'Courier New', Courier, monospace; "><code>using Marker.Kentico.Business.Repository;
using Marker.Kentico.Business.Entities;</code></pre>
<pre style="font: normal normal normal 12px/18px Consolas, Monaco, 'Courier New', Courier, monospace; "><code><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 19px; white-space: normal; font-size: 13px;">
<pre style="font: normal normal normal 12px/18px Consolas, Monaco, 'Courier New', Courier, monospace; "><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;"><span style="line-height: 19px; white-space: normal; font-size: small;"><span style="font-size: 13px;">
<pre style="font: normal normal normal 12px/18px Consolas, Monaco, 'Courier New', Courier, monospace; "><code><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 19px; white-space: normal; font-size: 13px;">Then you can retrieve a strongly typed repository to work with your supplier entities as follows. This retrieves a singleton instance of the repository class, it could also be created using dependency injection if preferred, but this is the simplest api to be offered.</span></code></pre>
<p></span></span></span></pre>
<p></span></code></pre>
<pre style="font: normal normal normal 12px/18px Consolas, Monaco, 'Courier New', Courier, monospace; "><code>var repository = RepositoryFactory&lt;DocumentRepository&lt;<strong><span style="color: #ff0000;">Supplier</span></strong>&gt;&gt;.Instance;</code></pre>
<pre style="font: normal normal normal 12px/18px Consolas, Monaco, 'Courier New', Courier, monospace; "><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;"><span style="line-height: 19px; white-space: normal; font-size: small; "><span style="font-size: 13px; ">
<pre style="font: normal normal normal 12px/18px Consolas, Monaco, 'Courier New', Courier, monospace; "><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;"><span style="line-height: 19px; white-space: normal; font-size: small; ">Once you have your repository you can then load entities or get the current entity (if it is a supplier otherwise it will be null)</span></span></pre>
<pre style="font: normal normal normal 12px/18px Consolas, Monaco, 'Courier New', Courier, monospace; "><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;"><span style="line-height: 19px; white-space: normal; font-size: x-small; "><span style="font-size: 13px; ">
<pre style="font: normal normal normal 12px/18px Consolas, Monaco, 'Courier New', Courier, monospace; "><code>Supplier supplier = repository.Load(string aliasPath);
Supplier supplier = repository.GetCurrent();

</code></pre>
<pre style="font: normal normal normal 12px/18px Consolas, Monaco, 'Courier New', Courier, monospace; "><code><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 19px; white-space: normal; font-size: 13px; ">
<pre style="font: normal normal normal 12px/18px Consolas, Monaco, 'Courier New', Courier, monospace; "><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;"><span style="line-height: 19px; white-space: normal; font-size: small; ">Here are some other thigns you can do...</span></span></pre>
<p></span></code></pre>
<pre style="font: normal normal normal 12px/18px Consolas, Monaco, 'Courier New', Courier, monospace; "><code><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 19px; white-space: normal; font-size: 13px; ">
<h2 style="font-size: 1.5em; "><span style="font-size: xx-small; "><span style="font-weight: normal; font-size: 13px; ">
<h2 style="font-size: 1.5em; "><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: small;"><span style="line-height: 19px; white-space: normal;">Saving and Deleting</span></span></h2>
<div><span style="font-size: small; "><span style="font-size: 13px; ">
<pre style="font: normal normal normal 12px/18px Consolas, Monaco, 'Courier New', Courier, monospace; "><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;"><span style="line-height: 19px; white-space: normal; font-size: small; ">Just update your entity's properties and call the save method</span></span></pre>
<p></span></span></div>
<p></span></span></h2>
<p></span></code></pre>
<pre style="font: normal normal normal 12px/18px Consolas, Monaco, 'Courier New', Courier, monospace; "><code>supplier.Url = "http://newurl.com";
repository.Save(supplier);</code></pre>
<pre style="font: normal normal normal 12px/18px Consolas, Monaco, 'Courier New', Courier, monospace; "><code><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 19px; white-space: normal; font-size: 13px; ">
<pre style="font: normal normal normal 12px/18px Consolas, Monaco, 'Courier New', Courier, monospace; "><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;"><span style="line-height: 19px; white-space: normal; font-size: xx-small; "><span style="font-size: 13px; ">
<pre style="font: normal normal normal 12px/18px Consolas, Monaco, 'Courier New', Courier, monospace; "><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;"><span style="line-height: 19px; white-space: normal; font-size: small; ">Deletion is just as easy: </span></span></pre>
<p></span></span></span></pre>
<pre style="font: normal normal normal 12px/18px Consolas, Monaco, 'Courier New', Courier, monospace; "><code>repository.Delete(supplier.DocumentID);</code></pre>
<pre style="font: normal normal normal 12px/18px Consolas, Monaco, 'Courier New', Courier, monospace; "><code><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 19px; white-space: normal; font-size: 13px; ">
<h2 style="font-size: 1.5em; "><span style="font-size: xx-small; "><span style="font-weight: normal; font-size: 13px; ">
<h2 style="font-size: 1.5em; "><span style="font-size: small;">Custom Query Support with Paging!</span></h2>

</span></span></h2>

</span></code></pre>
<pre style="font: normal normal normal 12px/18px Consolas, Monaco, 'Courier New', Courier, monospace; "><span style="font-family: monospace;"><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 19px; white-space: normal; font-size: 13px; ">
<pre style="font: normal normal normal 12px/18px Consolas, Monaco, 'Courier New', Courier, monospace; "><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;"><span style="line-height: 19px; white-space: normal; font-size: small; ">You can see below that our repsitory enables querying with paging support (returning the total results)</span></span></pre>
<p></span></span></pre>
<pre style="font: normal normal normal 12px/18px Consolas, Monaco, 'Courier New', Courier, monospace; "><code>var searchCriteria = new QueryFindCriteria();
searchCriteria.QueryName = "FindSuppliers"; // set the query name here
searchCriteria.SelectOnlyPublished = false; // let's include unpublished nodes
searchCriteria.Take = 10; // take 10 rows
searchCriteria.Skip = 10; // start at row 11
int totalCount = 0;
List&lt;Supplier&gt; suppliers = repository.Find(searchCriteria, out totalCount);
</code></pre>
<pre style="font: normal normal normal 12px/18px Consolas, Monaco, 'Courier New', Courier, monospace; "><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;"><span style="line-height: 19px; white-space: normal; font-size: small; ">To support this you must be running SQL 2005 or above and simply structure your query as follows, noting the skeleton structure in highlighted yellow below.</span></span></pre>
<p style="MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: 'courier new'; BACKGROUND: yellow; COLOR: blue; FONT-SIZE: 10pt">WITH</span><span style="FONT-FAMILY: 'courier new'; BACKGROUND: yellow; FONT-SIZE: 10pt"> AllResults <span style="COLOR: blue">AS</span> </span></p>
<p style="MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: 'courier new'; BACKGROUND: yellow; COLOR: gray; FONT-SIZE: 10pt">(</span><span style="FONT-FAMILY: 'courier new'; FONT-SIZE: 10pt"> </span></p>
<p style="MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: 'courier new'; FONT-SIZE: 10pt"> <span style="COLOR: green">-- core paged query should go in here</span> </span></p>
<p style="MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: 'courier new'; FONT-SIZE: 10pt"> <span style="COLOR: blue">select</span> SupplierView<span style="COLOR: gray">.*,</span> <span style="BACKGROUND: yellow; COLOR: fuchsia">Row_Number</span><span style="BACKGROUND: yellow; COLOR: gray">()</span><span style="BACKGROUND: yellow"> <span style="COLOR: blue">over </span><span style="COLOR: gray">(</span><span style="COLOR: blue">order</span> <span style="COLOR: blue">by</span> ##ORDERBY## <span style="COLOR: blue">as</span> RowIndex</span> <em> </em></span></p>
<p style="MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: 'courier new'; FONT-SIZE: 10pt"> <span style="COLOR: blue">FROM</span> View_SMS_Supplier_Joined <span style="COLOR: blue">as</span> SupplierView </span></p>
<p style="MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: 'courier new'; FONT-SIZE: 10pt"> <span style="COLOR: green">##WHERE##</span> </span></p>
<p style="MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: 'courier new'; COLOR: gray; FONT-SIZE: 10pt">)</span></p>
<p style="MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: 'courier new'; COLOR: gray; FONT-SIZE: 10pt"> </span></p>
<p style="MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: 'courier new'; BACKGROUND: yellow; COLOR: blue; FONT-SIZE: 10pt">SELECT  (SELECT COUNT(NodeID) FROM AllResults ) As TotalResults, *<br />
FROM  AllResults<br />
WHERE RowIndex &gt; @skip AND RowIndex &lt;= (@skip +  @take)</span></p>
<p style="MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: 'courier new'; BACKGROUND: yellow; COLOR: blue; FONT-SIZE: 10pt"><span style="color: #000000; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; "> </span></span></p>
<h2 style="font-size: 1.5em; "><span style="font-size: small;">Criteria objects (not overloads)</span></h2>
<div>You will likely have noticed that Kentico has dozens of overloads for it's core methods. MKB gets round this by having a limited number of overloads with criteria objects that contain properties with sensible defaults for all core operations.</div>
<div>For example, the <strong>QueryFindCriteria </strong>mentioned above has the following properties.</div>
<div>
<ul>
<li>SiteName (defaults to current site)</li>
<li>CultureCode</li>
<li>Where</li>
<li>TopN</li>
<li>SelectOnlyPublished</li>
<li>OrderBy</li>
<li>CheckUserPermissions</li>
<li>QueryName</li>
<li>Parameters</li>
</ul>
<p>And there is a simpler <strong>TreeFindCriteria</strong> accepted as an overload to the Find method on any repository with these properties:</div>
<div>
<ul>
<li>SiteName (defaults to current site)</li>
<li>CultureCode</li>
<li>Where</li>
<li>TopN</li>
<li>SelectOnlyPublished</li>
<li>OrderBy</li>
<li>CheckUserPermissions</li>
<li>AliasPath</li>
<li>CombineWithDefaultCulture</li>
<li>MaxRelativeLevel</li>
<li>SelectLatestVersion - allows you to work with latest version of document under workflow, no need to change your api!</li>
</ul>
</div>
<div>We hope you can see how much simpler this is as you just need to set the properties you explcitly need for any query rather than being forced to use a particular overload.</div>
<div><strong><br />
</strong></div>
<div><strong>Conclusion</strong></div>
<div><span style="font-size: small;"><span style="font-size: 13px; "></p>
<h2 style="font-size: 1.5em; "><span style="font-size: x-small; "><span style="font-weight: normal; font-size: small; "> We are sharing this library because we believe that it will be of value for kentico developers and partners to assess and make use of. We hope that it will also be useful for Kentico themselves who might consider the development of such an api to make it easier to work with Kentico. </span></span></h2>
<div><span style="font-size: x-small; "><span style="font-weight: normal; font-size: small; ">This code base is provided as is and we recommend you use it for testing purposes at this stage (although we feel the api coverage is pretty good). We'll support and answer questions as best we can. There's lots not covered here that is offered with the library that i'll cover in future posts if the interest is there!</span></span></div>
<p></span></span></div>
<p></span></code></pre>
<p></span></span></span></pre>
<p></span></span></span></pre>
</div>
<div>
<h2 style="font-size: 1.5em; "><span style="font-size: small;">Get the code!</span></h2>
</div>
<p></span></code></pre>
<p>We are providing a debug compiled version of our business assembly to solicit feedback on the apis offered. If there is sufficient interest we will release the code base on codeplex.</p>
<p>Download the latest version here: <a href="http://www.markerstudio.com/wp-content/uploads/2010/02/Marker.Kentico.Business.v3.zip">Marker.Kentico.Business.v3</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.markerstudio.com/technical/2010/02/introducing-the-marker-kentico-business-library-mkb/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>IIS7 Extensionless Urls and Kentico CMS 5.0</title>
		<link>http://www.markerstudio.com/technical/2010/01/iis7-extensionless-urls-and-kentico-cms-5-0/</link>
		<comments>http://www.markerstudio.com/technical/2010/01/iis7-extensionless-urls-and-kentico-cms-5-0/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 12:07:12 +0000</pubDate>
		<dc:creator>Keith</dc:creator>
				<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://www.markerstudio.com/?p=2175</guid>
		<description><![CDATA[How to combine the IIS7 rewrite module with Kentico CMS 5.0]]></description>
			<content:encoded><![CDATA[<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 20px; padding-left: 0px; margin: 0px;">Base System Requirements: IIS 7.0 with .net 3.5 SP1 on a Windows Vista dev machine or Windows 2008 server to utilise extensionless urls.</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 20px; padding-left: 0px; margin: 0px;">Firstly, install the marvellous IIS 7.0 URL Rewrite Module<br />
Get it here: <a style="text-decoration: none; outline-style: none; outline-width: initial; outline-color: initial; color: #ad1230;" href="http://www.iis.net/downloads/default.aspx?tabid=34&amp;g=6&amp;i=1692">http://www.iis.net/downloads/default.aspx?tabid=34&amp;g=6&amp;i=1692</a><br />
Learn about it here: <a style="text-decoration: none; outline-style: none; outline-width: initial; outline-color: initial; color: #ad1230;" href="http://learn.iis.net/page.aspx/460/using-url-rewrite-module/">http://learn.iis.net/page.aspx/460/using-url-rewrite-module/</a></p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 20px; padding-left: 0px; margin: 0px;">Now, all you have to do is tell Kentico not to use extensions on postback urls. I had to delve into the actual source code to locate this little gem of a setting. Set it to false and stick in AppSettings.config to ensure Kentico will not write out form actions which end in .aspx.</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 20px; padding-left: 0px; margin: 0px;"><em>CMSUseExtensionOnPostback = false</em></p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 20px; padding-left: 0px; margin: 0px;">Next, make sure Kentico is configured to not add friendly url extensions when it generates urls.</p>
<ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 50px; padding-top: 0px; padding-right: 25px; padding-bottom: 0px; padding-left: 25px;">
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px;">Site Manager &gt; Settings &gt; Urls&gt;</li>
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px;">Ensure the Friendly Url Extensions value is blank</li>
</ul>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 20px; padding-left: 0px; margin: 0px;">Now all you need to do now is apply the rewriting rules  within the web.config, utilising the IIS Rewrite Module’s capabilities. (Note that you don’t need to do anything within IIS, you can manage everything within the web.config and simply deploy it out to target servers without worrying about any additional configuration).</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 20px; padding-left: 0px; margin: 0px;">For example, the <strong>EnforceTrailingSlash</strong> rule below will ensure that a trailing slash is added to all urls without extensions, performing a 301 redirect in the process. This is so to avoid multiple urls (ones with and without slashes) returning the same content which isn’t ideal from an SEO perspective.</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 20px; padding-left: 0px; margin: 0px;">The <strong>TrailingSlashToAspx</strong> rule below will ensure that a trailing slash is rewritten internally to .aspx, so that the kentico rewriting engine can take over. Note that the Kentico CMS folders are ignored (ones starting with CMS..)</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 20px; padding-left: 0px; margin: 0px;">&lt;system.webServer&gt;<br />
&lt;rewrite&gt;<br />
&lt;rules&gt;<br />
&lt;rule name=”EnforceTrailingSlash”&gt;<br />
&lt;match url=”^(.*)$” ignoreCase=”false” /&gt;<br />
&lt;conditions&gt;<br />
&lt;add input=”{REQUEST_FILENAME}” matchType=”IsFile” negate=”true” /&gt;<br />
&lt;add input=”{REQUEST_URI}” negate=”true” pattern=”(.*)\.([a-zA-Z]+)(/.*)?$” /&gt;<br />
&lt;add input=”{REQUEST_URI}” negate=”true” pattern=”(.*)\.([a-zA-Z]+)(\?.*)?$” /&gt;<br />
&lt;add input=&#8221;{REQUEST_URI}&#8221; negate=&#8221;true&#8221; pattern=&#8221;(.*)/(\?.*)?$&#8221;/&gt;<br />
&lt;/conditions&gt;<br />
&lt;action type=”Redirect” url=”{R:1}/” redirectType=”Permanent” /&gt;<br />
&lt;/rule&gt;</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 20px; padding-left: 0px; margin: 0px;">&lt;rule name=”TrailingSlashToAspx”&gt;<br />
&lt;match url=”^(.*)/$” /&gt;<br />
&lt;conditions&gt;<br />
&lt;add input=”{REQUEST_FILENAME}” matchType=”IsFile” negate=”true” /&gt;<br />
&lt;add input=”{REQUEST_URI}” negate=”true” pattern=”/cms(.*)$” /&gt;<br />
&lt;add input=&#8221;{REQUEST_URI}&#8221; negate=&#8221;true&#8221; pattern=&#8221;/getattachment/(.*)$&#8221;/&gt;<br />
&lt;add input=&#8221;{REQUEST_URI}&#8221; negate=&#8221;true&#8221; pattern=&#8221;/getfile/(.*)$&#8221;/&gt;<br />
&lt;/conditions&gt;<br />
&lt;action type=”Rewrite” url=”{R:1}.aspx” /&gt;<br />
&lt;/rule&gt;<br />
&lt;/rules&gt;<br />
&lt;/rewrite&gt;<br />
&lt;/system.webServer&gt;</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 20px; padding-left: 0px; margin: 0px;">And so there you have it, a relatively painless way to get yourself all SEOd with IIS 7.0 and Kentico CMS 5.0.</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 20px; padding-left: 0px; margin: 0px;"><strong>So what about the Kentico 5.0 SEO Features? mmm&#8230;maybe not</strong></p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 20px; padding-left: 0px; margin: 0px;">Kentico makes available 2 settings in v5.0 which are &#8220;Always apply trailing slash to urls&#8221; and &#8220;Always lower case url names&#8221; which in theory sound great, but i still recommend the above approach for control.</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 20px; padding-left: 0px; margin: 0px;">The first one only really makes sense if you are using extensionless urls anyway (which you need to configure separately from this setting, see below). When you set &#8220;Always apply trailing slash to urls&#8221; this ensures all urls generated by Kentico end with a trailing slash, which is a good thing. However, it also means that Kentico will attempt to add a trailing slash to our rewritten url above!</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 20px; padding-left: 0px; margin: 0px;">When this happens you get an infinite loop occuring<em> </em>where the rewrite module is attempting to rewrite the url to .aspx for Kentico to process and for some reason (and this is clearly in my view a bug) Kentico is attempting to put a trailing slash on a rewritten url which ends in an aspx. Kentico should IMHO leave this already rewritten url alone and only apply 301s and trailing slashes if the url actually requires it.</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 20px; padding-left: 0px; margin: 0px;">We&#8217;re still therefore waiting on a solution that just has Kentico generate all urls with trailing slashes and nothing else!</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 20px; padding-left: 0px; margin: 0px;">Upon investigation with support, Kentico still appear to recommend that you use the old IIS 6.x approach of assigning custom 404 error page to a Kentico handler page in order to implement extensionless urls. If you are using IIS 6, by all means use this approach if you must, but i don&#8217;t really like the extra configuration effort and it&#8217;s always felt a bit hacky to do this. 404 errors should be generated when a page is actually not found. This older approach is obviously not compatible with what i&#8217;m suggesting above.</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 20px; padding-left: 0px; margin: 0px;">Another problem we discovered with the Kentico SEO settings was when used in combination with aliasing. Aliasing is a Kentico feature wherby you can specifiy a url such as /articles/{article-title}, where {article-title} is any piece of text (the alias) and that these alias url requests all point to some underlying url such as /articles/article/.</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 20px; padding-left: 0px; margin: 0px;">If you switch on the &#8220;Always lower case url names&#8221; and you request a dynamic alias such as /articles/MY-ARTICLE/ it will redirect to the underlying url /articles/article/ breaking the aliasing approach. This appear to be a core bug in kentico 5.0.</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 20px; padding-left: 0px; margin: 0px;">
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 20px; padding-left: 0px; margin: 0px;">
]]></content:encoded>
			<wfw:commentRss>http://www.markerstudio.com/technical/2010/01/iis7-extensionless-urls-and-kentico-cms-5-0/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>St John NZ CPR iPhone App &#8211; Top App</title>
		<link>http://www.markerstudio.com/miscellaneous/2009/12/st-john-nz-cpr-iphone-app-top-app/</link>
		<comments>http://www.markerstudio.com/miscellaneous/2009/12/st-john-nz-cpr-iphone-app-top-app/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 21:17:54 +0000</pubDate>
		<dc:creator>Jon Beattie</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[st john]]></category>

		<guid isPermaLink="false">http://www.markerstudio.com/?p=2167</guid>
		<description><![CDATA[
The St John NZ CPR iPhone App that we have developed in partnership with St John is in the top 25 free apps overall, in the Apple App Store in New Zealand today. 
Earlier this week we posted about being top in the Healthcare &#38; Fitness category, however, to be in the top 25 overall [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://itunes.apple.com/nz/app/st-john-nz-cpr/id333191630?mt=8"><img src="http://www.markerstudio.com/wp-content/uploads/2009/12/St-John-NZ-CPR-iPhone-app-Top-25.jpg" alt="St John NZ CPR iPhone app - Top 25" title="St John NZ CPR iPhone app - Top 25" width="320" height="480" class="alignright size-full wp-image-2168" /></a><br />
The St John NZ CPR iPhone App that we have developed in partnership with <a href="http://www.stjohn.co.nz/news/article.aspx?docid=103294">St John</a> is in the top 25 free apps overall, in the Apple App Store in New Zealand today. </p>
<p>Earlier this week we posted about being top in the Healthcare &amp; Fitness category, however, to be in the top 25 overall is even more significant. </p>
<p>We appreciate all the feedback and will be looking to incorporate these suggestions into the next version. </p>
<p><a href="http://itunes.apple.com/nz/app/st-john-nz-cpr/id333191630?mt=8"><img src="http://www.markerstudio.com/wp-content/uploads/2009/08/marketing_badge.png" alt="Available on the App Store" title="Available on the App Store" width="121" height="61" class="alignnone size-full wp-image-2127" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.markerstudio.com/miscellaneous/2009/12/st-john-nz-cpr-iphone-app-top-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>St John NZ CPR iPhone App &#8211; most popular app in it&#8217;s category</title>
		<link>http://www.markerstudio.com/miscellaneous/2009/12/st-john-nz-cpr-iphone-app-most-popular-app-in-its-category/</link>
		<comments>http://www.markerstudio.com/miscellaneous/2009/12/st-john-nz-cpr-iphone-app-most-popular-app-in-its-category/#comments</comments>
		<pubDate>Fri, 18 Dec 2009 19:32:45 +0000</pubDate>
		<dc:creator>Jon Beattie</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://www.markerstudio.com/?p=2139</guid>
		<description><![CDATA[
The St John NZ CPR iPhone App that we have developed in partnership with St John is number 1 in the Healthcare &#038; Lifestyle category of the Apple App Store in New Zealand today. 
We are pleased that people seem to like the app. We believe everyone should have this on your phone, just in [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.markerstudio.com/wp-content/uploads/2009/12/photo.jpg" alt="St John NZ CPR iPhone App" title="St John NZ CPR iPhone App" width="320" height="480" class="alignright size-full wp-image-2140" /><br />
The St John NZ CPR iPhone App that we have developed in partnership with <a href="http://www.stjohn.co.nz/news/article.aspx?docid=103294">St John</a> is number 1 in the Healthcare &#038; Lifestyle category of the Apple App Store in New Zealand today. </p>
<p>We are pleased that people seem to like the app. We believe everyone should have this on your phone, just in case you need it. </p>
<p>The app has also been featured on <a href="http://tvnz.co.nz/technology-news/heart-attack-find-iphone-user-3313680">TVNZ</a> and <a href="http://www.newstalkzb.co.nz/newsdetail1.asp?storyID=168127">Newstalk ZB</a> this week. </p>
<p>The app is free for all iPhone and iPod touch users. </p>
<p><a href="http://itunes.apple.com/nz/app/st-john-nz-cpr/id333191630?mt=8"><img src="http://www.markerstudio.com/wp-content/uploads/2009/08/marketing_badge.png" alt="Available on the App Store" title="Available on the App Store" width="121" height="61" class="alignnone size-full wp-image-2127"></a></p>
<p><img src="http://www.markerstudio.com/wp-content/uploads/2009/12/St-John-iPhone-Reviews.png" alt="St John NZ CPR iPhone App reviews" title="St John NZ CPR iPhone App reviews" width="410" height="395" class="size-full wp-image-2148" /></p>
<h4>Other Links</h4>
<ul>
<li><a href="http://www.allvoices.com/news/4823773-iphone-user-application-save">iPhone application could save lives</a></li>
<li><a href="http://www.voxy.co.nz/national/heart-attack-find-iphone-user/5/33661">Heart attack? Find an iPhone user</a></li>
<li><a href="http://www.mobileguys.co.nz/st-john-nz-cpr-app-for-the-iphone/">St John NZ CPR app for the iPhone</a></li>
<li><a href="http://sec.11alive.com/article/08gD6qecuG4kp">11Alive.com</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.markerstudio.com/miscellaneous/2009/12/st-john-nz-cpr-iphone-app-most-popular-app-in-its-category/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Launch of the St John NZ CPR iPhone App</title>
		<link>http://www.markerstudio.com/miscellaneous/2009/12/launch-of-the-st-john-nz-cpr-iphone-app/</link>
		<comments>http://www.markerstudio.com/miscellaneous/2009/12/launch-of-the-st-john-nz-cpr-iphone-app/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 19:35:07 +0000</pubDate>
		<dc:creator>Jon Beattie</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[free app]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://www.markerstudio.com/?p=2132</guid>
		<description><![CDATA[
We are proud to announce the launch of the St John NZ CPR iPhone App in the Apple App Store this week. This was a partnership with St John, the leading provider of first aid training in New Zealand as well providing ambulance services to 85% of the population.
The St John NZ CPR iPhone App [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://itunes.apple.com/nz/app/st-john-nz-cpr/id333191630?mt=8"><img src="http://www.markerstudio.com/wp-content/uploads/2009/12/iCPR.png" alt="St John NZ CPR iPhone App" title="St John NZ CPR iPhone App" width="414" height="770" class="alignleft size-full wp-image-2134" /></a><br />
We are proud to announce the launch of the St John NZ CPR iPhone App in the Apple App Store this week. This was a partnership with St John, the leading provider of first aid training in New Zealand as well providing ambulance services to 85% of the population.</p>
<p>The St John NZ CPR iPhone App teaches the life saving skills of cardio-pulmonary resuscitation, commonly known as CPR. Knowing how to save a life of a family member, friend or colleague is vital, so why not get this application now so you have it on your phone. </p>
<p>If you have an iPhone or iPod touch, you can download the app for free.<br />
<a href="http://itunes.apple.com/nz/app/st-john-nz-cpr/id333191630?mt=8"><img src="http://www.markerstudio.com/wp-content/uploads/2009/08/marketing_badge.png" alt="Available on the App Store" title="Available on the App Store" width="121" height="61" class="alignnone size-full wp-image-2127"></a></p>
<p>You can read more on the <a href="http://www.stjohn.co.nz/news/article.aspx?docid=103294">St John website</a> and also on <a href="http://www.stuff.co.nz/technology/3173166/St-John-iPhone-CPR-app">Stuff.co.nz</a>. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.markerstudio.com/miscellaneous/2009/12/launch-of-the-st-john-nz-cpr-iphone-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Submit once asp.net buttons with validation group support</title>
		<link>http://www.markerstudio.com/technical/2009/11/submit-once-asp-net-buttons-with-validation-group-support/</link>
		<comments>http://www.markerstudio.com/technical/2009/11/submit-once-asp-net-buttons-with-validation-group-support/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 08:19:07 +0000</pubDate>
		<dc:creator>Keith</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.markerstudio.com/?p=2112</guid>
		<description><![CDATA[Got buttons you don’t want the user to click twice, want to disable them site-wide and have support for .net validation groups?
Here’s the code, we use a class to do the selection and the rel attribute to help define the validation group so we can only hide the button if the form has been validated [...]]]></description>
			<content:encoded><![CDATA[<p>Got buttons you don’t want the user to click twice, want to disable them site-wide and have support for .net validation groups?</p>
<p>Here’s the code, we use a class to do the selection and the rel attribute to help define the validation group so we can only hide the button if the form has been validated successfully.</p>
<p>&lt;asp:Button ID=&#8221;btnProceed&#8221; runat=&#8221;server&#8221; <strong>CssClass=&#8221;submit-once&#8221;</strong> rel=&#8221;UserProfile&#8221; ValidationGroup=&#8221;UserProfile&#8221;  Text=&#8221;Proceed&#8221; OnClick=&#8221;btnProceed_Click&#8221;  /&gt;</p>
<p>And here&#8217;s the sprinkling of jquery you will need (stick it in you base master page for example).</p>
<p>$(document).ready(function() {</p>
<p>// ensure that buttons are only clicked once with this class</p>
<p>$(&#8221;.submit-once&#8221;).click(function() {</p>
<p>if (Page_ClientValidate($(this).attr(&#8221;rel&#8221;))) {</p>
<p>$(this).after(&#8221;Please wait..&#8221;).hide();</p>
<p>}</p>
<p>});</p>
<p>});</p>
]]></content:encoded>
			<wfw:commentRss>http://www.markerstudio.com/technical/2009/11/submit-once-asp-net-buttons-with-validation-group-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Marker Finalist in Kentico Site of the Year for Yellow Maps</title>
		<link>http://www.markerstudio.com/marketing/2009/11/marker-finalist-in-kentico-site-of-the-year-for-yellow-maps/</link>
		<comments>http://www.markerstudio.com/marketing/2009/11/marker-finalist-in-kentico-site-of-the-year-for-yellow-maps/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 08:13:07 +0000</pubDate>
		<dc:creator>Keith</dc:creator>
				<category><![CDATA[Marketing]]></category>
		<category><![CDATA[awards]]></category>
		<category><![CDATA[Kentico]]></category>
		<category><![CDATA[yellow maps]]></category>

		<guid isPermaLink="false">http://www.markerstudio.com/?p=2115</guid>
		<description><![CDATA[Vote now to help us win Kentico Site of the Year!]]></description>
			<content:encoded><![CDATA[<div id="attachment_2116" class="wp-caption alignleft" style="width: 160px"><a href="http://www.kentico.com/Company/Site-of-the-Year-2009-Contest.aspx"><br />
<img class="size-full wp-image-2116" src="http://www.markerstudio.com/wp-content/uploads/2009/11/silver_150x150.gif" alt="Marker is Kentico Site of the Year Finalist" width="150" height="150" /></a><p class="wp-caption-text">Marker is Kentico Site of the Year Finalist</p></div>
<p><span style="background-color: #ffffff">Marker is a finalist in the Kentico Site of the Year contest for our work on <a href="http://maps.yellow.co.nz" target="_blank">Yellow Maps</a>.</span></p>
<p>We are the only Kiwi company in the battle for prizes so every vote counts in the online voting that will be carried out this month.</p>
<p>Please <a href="http://www.kentico.com/Company/Site-of-the-Year-2009-Contest.aspx" target="_blank">vote now</a>, there are 12 categories to vote for and we are on Page 9 of 12 under the &#8220;Best Other/At Large Site&#8221; on the right hand side under &#8216;Yellow Maps&#8217;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.markerstudio.com/marketing/2009/11/marker-finalist-in-kentico-site-of-the-year-for-yellow-maps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kentico Cultures Demystified</title>
		<link>http://www.markerstudio.com/technical/2009/11/kentico-cultures-demystified/</link>
		<comments>http://www.markerstudio.com/technical/2009/11/kentico-cultures-demystified/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 00:28:58 +0000</pubDate>
		<dc:creator>Keith</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[CMS]]></category>
		<category><![CDATA[Kentico]]></category>
		<category><![CDATA[multilingual]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.markerstudio.com/?p=2099</guid>
		<description><![CDATA[The Kentico CMS Developers guide provides good information on how to configure a multilingual site, however it does not seem to provide a quick reference on how to set up and configure the default UI and content cultures in one document.]]></description>
			<content:encoded><![CDATA[<p>The Kentico CMS Developers Guide provides good information on how to configure a multilingual site, however it does not seem to provide a quick reference on how to set up and configure the default User Interface (UI) and content cultures in one document.</p>
<h3>Culture Options – UI and Content Cultures</h3>
<p>The Administration &gt; Users section allows the setting of the Preferred content culture and the Preferred user interface culture. These values normally set at (default) but what does all this actually mean?</p>
<p><em>It is recommended to not explicitly set the culture for users and to let the defaults be used. Unless a user explicitly wishes to override, assuming this culture is supported.</em></p>
<h3>Content Culture</h3>
<p>Content cultures determine the actual content culture stored against Kentico documents as they are saved. If you have a multilingual site there are multiple documents stored for each culture against a single ‘node’.</p>
<p><strong>N.B</strong><em> There is always a default content culture for a Kentico site. </em></p>
<h4>List of all content cultures</h4>
<p>The available list of all available content cultures are at Site Manager &gt; Development &gt; Cultures. All major cultures are provided here and you shouldn’t need to modify this list.</p>
<h4>Setting the default content culture</h4>
<p>You can set this in two ways (both have the same effect).</p>
<ul>
<li>Site Manager &gt; Sites &gt; [Site Instance] &gt; Default content culture</li>
<li>Site Manager -&gt; Settings -&gt; (select site) -&gt; Web site -&gt; Default culture of the content</li>
</ul>
<p>What this means is that the default culture for all documents will be this value (e.g. en-NZ). If a user has (default) saved against their ‘Preferred content culture’ they will then see the default content culture for the Site they are viewing if they are logged in.</p>
<p><em>The default content culture should be set first in any Kentico implementation.</em></p>
<h4>Setting the default visitor culture</h4>
<p>You can set this in the following ways:</p>
<ul>
<li>Site Manager &gt; Sites &gt; [Site Instance] &gt; Default visitor culture</li>
<li>Site Manager &gt; Sites &gt; [Site Instance] &gt; Domain Aliases &gt; [Domain Alias Instance] &gt; Default visitor culture</li>
</ul>
<p>What this means is, if a user comes to the site anonymously, this is the culture that will be used by default to display to visitors and this can be managed on a domain alias level also.</p>
<p>For a site without multilingual capabilities it would normally be the same as the default content culture, but one may wish to have a French version of a site under a different domain in which case the default visitor culture setting would be set to French.</p>
<p>If this is not set, then the user’s browser settings will be used to determine the default visitor culture.</p>
<p><em>It is recommended that the default visitor culture always be set to match the default content culture by default.</em></p>
<p>Site manage &gt; Sites &gt; [Site Instance] &gt; Cultures</p>
<p>This section allows you to set all the cultures that are being supported for a particular Kentico site. Note that this will affect the selectable cultures from within the cmsdesk administration interface for a particular website.</p>
<p><em>It is recommended that these  values always be explicitly set when setting up a Kentico instance. If not a multilingual site allow only a single culture which matches the supported default content culture.</em></p>
<h3>UI Culture</h3>
<p>The UI Culture is the culture of the CMSDesk administration interface. Out of the box (OOTB), Kentico uses en-us (US English).</p>
<p>UI Cultures are stored within Site Manager &gt; Development &gt; UI Cultures. You will see there is an ‘English’ option, but this actually corresponds to en-us (US English). If you want to allow users to select between this and UK English for example within CMSDesk you should create a new UI Culture called English (NZ) and set the code to en-NZ.</p>
<p>If a user has (default) saved against their ‘Preferred user interface culture’ they will then see the CMS Desk interface using the culture defined in the AppSetting.config file for that website (there doesn’t appear to be a corresponding value within Site Manager). This value should be set to a sensible default to avoid users having to change it themselves. For a site managed from New Zealand it should be:</p>
<p>&lt;add key=&#8221;CMSDefaultUICulture&#8221; value=&#8221;en-NZ&#8221;/&gt;</p>
<p><em>It is recommended that this value always be explicitly set when setting up a Kentico instance. </em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.markerstudio.com/technical/2009/11/kentico-cultures-demystified/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>.Net OAuth Sample &#8211; Working with Justin.TV</title>
		<link>http://www.markerstudio.com/technical/2009/09/net-oauth-sample-working-with-justintv/</link>
		<comments>http://www.markerstudio.com/technical/2009/09/net-oauth-sample-working-with-justintv/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 04:42:26 +0000</pubDate>
		<dc:creator>Keith</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[.Net]]></category>
		<category><![CDATA[Justin.TV]]></category>
		<category><![CDATA[OAuth]]></category>

		<guid isPermaLink="false">http://www.markerstudio.com/?p=1830</guid>
		<description><![CDATA[sample code for using OAuth and .Net to work with the justin.tv rest apis]]></description>
			<content:encoded><![CDATA[<p>This sample uses the excellent <a href="http://code.google.com/p/devdefined-tools/wiki/OAuth" target="_blank">DevDefined OAuth .Net Implementation</a> along with the <a href="http://www.justin.tv/p/api" target="_blank">Justin.TV rest apis</a> for working with streaming and archived video.</p>
<p>Here&#8217;s some sample .net code to create a channel and user in justin.tv. The OAuthRequest wrapping class is then presented which acts as a core facade to justin.tv apis which secures the calls via a <a href="http://hueniverse.com/2008/10/beginners-guide-to-oauth-part-iii-security-architecture/" target="_blank">direct 2-legged request. </a></p>
<p>You should be able to modify the OAuthRequest and sample code for any OAuth based rest api as required.</p>
<h3>Sample code to create new channel and user</h3>
<pre>
// create new OAuthRequest and session
var oauthRequest = new OAuthRequest();
var oauthSession = oauthRequest.CreateSession();

// build up thepost  request
oauthSession.WithFormParameters(
	new
	{
		login = "[LOGIN]",
		password = "[PASSWORD]",
		birthday = "[DATEOFBIRTH]",
		email = "[EMAIL]",
		category = "[CATEGORY]",
		subcategory = "[SUBCATEGORY]",
		title = "[TITLE]",
		publisher_guard = "[PUBLISHER_GUARD]"
	}
);

// make the post request get the response as xml
HttpWebResponse results = oauthSession.Request().Post().ForUrl("http://api.justin.tv/api/channel/create.xml").ToWebResponse();
XDocument xdoc =oauthRequest.GetWebResponseAsXml(results);

// continue processing...
</pre>
<h3>OAuthRequest facade class</h3>
<pre>
using DevDefined.OAuth;
using DevDefined.OAuth.Consumer;
using DevDefined.OAuth.Framework;
using System.Xml;
using System.Xml.Linq;
using System.Net;
using System.IO;
using System.Text;

public class OAuthRequest
{
	private string requestUrl = "http://api.justin.tv/oauth/request_token";
	private string userAuthorizeUrl = "http://api.justin.tv/oauth/authorize";
	private string accessUrl = "http://api.justin.tv/oauth/access_token";

	public OAuthSession CreateSession()
	{
		var consumerContext = new OAuthConsumerContext
		{
			ConsumerKey = "YOURCONSUMERKEY",
			ConsumerSecret = "YOURCONSUMERSECRET",
			SignatureMethod = SignatureMethod.HmacSha1,
			UseHeaderForOAuthParameters = true
		};
		var session = new OAuthSession(consumerContext, requestUrl, userAuthorizeUrl, accessUrl);
		return session;
	}

	public XDocument GetWebResponseAsXml(HttpWebResponse response)
	{
		XmlReader xmlReader = XmlReader.Create(response.GetResponseStream());
		XDocument xdoc = XDocument.Load(xmlReader);
		xmlReader.Close();
		return xdoc;
	}

	public string GetWebResponseAsString(HttpWebResponse response)
	{
		Encoding enc = System.Text.Encoding.GetEncoding(1252);
		StreamReader loResponseStream = new
		StreamReader(response.GetResponseStream(), enc);
		return loResponseStream.ReadToEnd();
	}
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.markerstudio.com/technical/2009/09/net-oauth-sample-working-with-justintv/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
