<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title type="text">Blog posts by Jacob Khan</title><link href="http://world.optimizely.com" /><updated>2016-04-05T22:52:06.0000000Z</updated><id>https://world.optimizely.com/blogs/Jacob-Khan/</id> <generator uri="http://world.optimizely.com" version="2.0">Optimizely World</generator> <entry><title>Preview Content in View Mode</title><link href="https://world.optimizely.com/blogs/Jacob-Khan/Dates/2016/4/preview-content-in-view-mode/" /><id>&lt;p&gt;One of our enterprise customers recently approached me with an interesting challenge. They wanted to generate a URL of unpublished content and send it to an external party for validation of look and feel and an obligatory “thumbs up” before publishing. &lt;/p&gt;  &lt;p&gt;In CMS 6 this could be achieved by going to the template URL and adding the version id. &lt;a href=&quot;http://www.alloy.com/templates/pages/standardpage.aspx?id=5_5&quot;&gt;www.alloy.com/templates/pages/standardpage.aspx?id=5_5&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;However editors wouldn’t know the template / controller in newer version of Episerver, so I needed a different way of accomplishing this. &lt;/p&gt;  &lt;p&gt;I used partial routing to fetch the previous version and show that in the URL. &lt;/p&gt;  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt; public class PreviewPartialRouter : IPartialRouter&amp;lt;SitePageData, PageVersion&amp;gt;
    {

        public PartialRouteData GetPartialVirtualPath(PageVersion version, string language, RouteValueDictionary routeValues, RequestContext requestContext)
        {
            var contentLink = ContentRoute.GetValue(&amp;quot;node&amp;quot;, requestContext, routeValues) as ContentReference;
         
            if (PageEditing.PageIsInEditMode)
            {
                return null;
            }

            return new PartialRouteData
            {
                BasePathRoot = contentLink,
                PartialVirtualPath = String.Format(&amp;quot;{0}/&amp;quot;, version.ToString())
            };

        }


        public object RoutePartial(SitePageData content, EPiServer.Web.Routing.Segments.SegmentContext segmentContext)
        {
            var namePart = segmentContext.GetNextValue(segmentContext.RemainingPath);
            if (!String.IsNullOrEmpty(namePart.Next))
            {
                var version = HttpUtility.UrlDecode(namePart.Next);
                try
                {
                    var versionNumber = new ContentReference(version);

                    if (versionNumber != null)
                    {
                        var remaingPath = namePart.Remaining;
                        //Update RemainingPath on context.
                        segmentContext.RemainingPath = remaingPath;
                        var versionRepository = EPiServer.ServiceLocation.ServiceLocator.Current.GetInstance&amp;lt;IContentVersionRepository&amp;gt;();

                        var ActualVersion = versionRepository.Load(versionNumber);

                        segmentContext.RoutedContentLink = ActualVersion.ContentLink;
                        var contentRepository = EPiServer.ServiceLocation.ServiceLocator.Current.GetInstance&amp;lt;IContentLoader&amp;gt;();
                        var pd = contentRepository.Get&amp;lt;SitePageData&amp;gt;(ActualVersion.ContentLink);
                        segmentContext.SetCustomRouteData&amp;lt;PageVersion&amp;gt;(&amp;quot;version&amp;quot;, (PageVersion)ActualVersion);


                        return pd;
                    }        
                 }catch{
                    return content;
                 }

              

                       
            }

            return null;
        }	&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This example is with Alloy, where I use sitepagedata as my base. As you can see, I am getting a request in for a partial route meaning the main page url /”something”. “Something” refers to ContentReference.ID + “_” + Version Workid (5_18). This enables me to switch the current version to an older one. &lt;/p&gt;

&lt;p&gt;I also need to register my partial route:&lt;/p&gt;

&lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt; [InitializableModule]
    [ModuleDependency(typeof(EPiServer.Web.InitializationModule))]
    public class PreviewInitialization : IInitializableModule
    {
        public void Initialize(InitializationEngine context)
        {
          
            var partialRouter = new PreviewPartialRouter();

            RouteTable.Routes.RegisterPartialRouter&amp;lt;SitePageData, PageVersion&amp;gt;(partialRouter);

        }

      
        public void Preload(string[] parameters) { }

        public void Uninitialize(InitializationEngine context)
        {
           
    
        }
    }&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Rather simple if you ask me, but works well. To get the version ID, go into the version gadget and pick the previous version you would like to send. Since it isn’t always super easy to find a version and work id, I created a gadget which creates a simple version link for you &lt;/p&gt;
&lt;a href=&quot;/link/489f5a6cb2294a9aa154c031ed40b2e6.aspx&quot;&gt;&lt;img title=&quot;PreviewContent&quot; style=&quot;display: inline&quot; alt=&quot;PreviewContent&quot; src=&quot;/link/577fe531c1294a38806a883eaaabe760.aspx&quot; width=&quot;554&quot; height=&quot;286&quot; /&gt;&lt;/a&gt; 

&lt;p&gt;You can download the code here. Just place it in your project under the Business folder if you are using Alloy. In your own project, make sure to fix the path for the PreviewComponent and any namespace or SitePageData issues to your base&lt;/p&gt;
&lt;a title=&quot;https://drive.google.com/open?id=0B_XVbM6ery9FcXEzbkZ4Skt3YUE&quot; href=&quot;https://drive.google.com/open?id=0B_XVbM6ery9FcXEzbkZ4Skt3YUE&quot;&gt;https://drive.google.com/open?id=0B_XVbM6ery9FcXEzbkZ4Skt3YUE&lt;/a&gt;</id><updated>2016-04-05T22:52:06.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>Blog Template for EPiServer CMS 7.5</title><link href="https://world.optimizely.com/blogs/Jacob-Khan/Dates/2014/9/Blog-Template-for-EPiServer-CMS-75/" /><id>  &lt;p&gt;   &lt;p&gt;The Alloy Templates are widely used by partners and customers as well as&lt;a href=&quot;/link/a2e572cb680c4f1db0a20604754627b9.png&quot;&gt;&lt;img title=&quot;pagetree&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: right; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;pagetree&quot; align=&quot;right&quot; src=&quot;/link/21c23db26ca94d48a7f7136094f7dc9a.png&quot; width=&quot;139&quot; height=&quot;244&quot; /&gt;&lt;/a&gt; internally at EPiServer. They create a good starting point for projects and showcase some simple page types. Blogs is something available in the EPiServer Social Packages but the blogs I built are made in EPiServer CMS and available in both MVC and Webforms. These blogs are based on a hierarchical placement with the year and month being listing pages. Read more about the advantages of hierarchical content and large scale sites here&amp;#160; &lt;a title=&quot;http://joelabrahamsson.com/building-large-scale-episerver-sites/&quot; href=&quot;http://joelabrahamsson.com/building-large-scale-episerver-sites/&quot;&gt;http://joelabrahamsson.com/building-large-scale-episerver-sites/&lt;/a&gt;.       &lt;br /&gt;The templates come with three page types, Blog Start, Blog List and Blog Item. It also comes with three block types, Blog Listing, Blog Archive and Blog Tags.       &lt;br /&gt;&lt;a href=&quot;/link/234a4262660e4231a53d9c3330d93072.png&quot;&gt;&lt;img title=&quot;Blogstart&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;Blogstart&quot; src=&quot;/link/5d0606b95b764322915de70bdb75400a.png&quot; width=&quot;380&quot; height=&quot;209&quot; /&gt;&lt;/a&gt;       &lt;br /&gt;I also created a walkthrough video of package from a users perspective.       &lt;br /&gt;&lt;a title=&quot;https://www.youtube.com/watch?v=CSAZkUPd7VM&quot; href=&quot;https://www.youtube.com/watch?v=CSAZkUPd7VM&quot;&gt;https://www.youtube.com/watch?v=CSAZkUPd7VM&lt;/a&gt;       &lt;br /&gt;Best way to install the code is to setup a new Alloy Project using the VS integration and add the code in the root of your site, Include in project and build. Email me if you have any questions or issues.      &lt;br /&gt;      &lt;div id=&quot;scid:8eb9d37f-1541-4f29-b6f4-1eea890d4876:943f894d-a4ac-4f65-b38b-a2a96e525f6f&quot; class=&quot;wlWriterEditableSmartContent&quot; style=&quot;float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px&quot;&gt;&lt;p&gt;&lt;div&gt;&lt;a href=&quot;/link/25a74c2ba166402ab79069b21eb481ea.zip&quot; target=&quot;_self&quot;&gt;EPiServer.Templates.Blog.Mvc.Webform.zip&lt;/a&gt;&lt;/div&gt;&lt;/p&gt;&lt;/div&gt;   &lt;/p&gt;    &lt;p&gt;     &lt;br /&gt;&lt;/p&gt; &lt;/p&gt;  &lt;div id=&quot;scid:8eb9d37f-1541-4f29-b6f4-1eea890d4876:15c54f6f-970c-4ff1-83a5-ccabe25b310b&quot; class=&quot;wlWriterEditableSmartContent&quot; style=&quot;float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px&quot;&gt;&lt;p&gt;&lt;div&gt;&lt;a href=&quot;/link/714ccc6168ec4ae48c94b032908bda12.zip&quot; target=&quot;_self&quot;&gt;EPiServer.Templates.Blog.Mvc.Webform.zip&lt;/a&gt;&lt;/div&gt;&lt;/p&gt;&lt;/div&gt;</id><updated>2014-09-26T20:17:07.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>Menu Provider for EPiServer Top Navigation</title><link href="https://world.optimizely.com/blogs/Jacob-Khan/Dates/2013/1/Menu-Provider-for-EPiServer-Top-Navigation/" /><id>&lt;p&gt;There are lot of great blog posts regarding how to add something to the top level navigation in EPiServer. &lt;/p&gt;  &lt;p&gt;&lt;a title=&quot;http://www.dnasir.com/2012/05/15/episerver-cms-custom-top-menu-for-multiple-plugins/&quot; href=&quot;http://www.dnasir.com/2012/05/15/episerver-cms-custom-top-menu-for-multiple-plugins/&quot;&gt;http://www.dnasir.com/2012/05/15/episerver-cms-custom-top-menu-for-multiple-plugins/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title=&quot;http://world.episerver.com/Blogs/Dung-Le/Dates/2010/2/Create-Global-Navigation-in-EPiServer-CMS-6-RC1/&quot; href=&quot;http://world.episerver.com/Blogs/Dung-Le/Dates/2010/2/Create-Global-Navigation-in-EPiServer-CMS-6-RC1/&quot;&gt;http://world.episerver.com/Blogs/Dung-Le/Dates/2010/2/Create-Global-Navigation-in-EPiServer-CMS-6-RC1/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title=&quot;http://world.episerver.com/Documentation/Items/Tech-Notes/EPiServer-CMS-6/EPiServer-CMS-60/OnlineCenter-Developer-Documentation/&quot; href=&quot;http://world.episerver.com/Documentation/Items/Tech-Notes/EPiServer-CMS-6/EPiServer-CMS-60/OnlineCenter-Developer-Documentation/&quot;&gt;http://world.episerver.com/Documentation/Items/Tech-Notes/EPiServer-CMS-6/EPiServer-CMS-60/OnlineCenter-Developer-Documentation/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;It is extremely flexible and powerful. One small thing that we often encounter is that we want to reuse the menu on the top and want to include the new script files and styles needed for CMS 7 when we create plugins. &lt;/p&gt;  &lt;p&gt;Accomplishing this is extremely easy. First we need to add four import statements in our markup. &lt;/p&gt;  &lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;&amp;lt;%@ Import Namespace=&lt;span class=&quot;str&quot;&gt;&amp;quot;EPiServer.Framework.Web.Resources&amp;quot;&lt;/span&gt; %&amp;gt;
&amp;lt;%@ Import Namespace=&lt;span class=&quot;str&quot;&gt;&amp;quot;EPiServer.Framework.Web.Mvc.Html&amp;quot;&lt;/span&gt; %&amp;gt;
&amp;lt;%@ Import Namespace=&lt;span class=&quot;str&quot;&gt;&amp;quot;EPiServer&amp;quot;&lt;/span&gt; %&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;style type=&quot;text/css&quot;&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, &quot;Courier New&quot;, courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;style type=&quot;text/css&quot;&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, &quot;Courier New&quot;, courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;We also need to register our Menu User Control &lt;/p&gt;

&lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;&amp;lt;%@ Register TagPrefix=&lt;span class=&quot;str&quot;&gt;&amp;quot;sc&amp;quot;&lt;/span&gt; Assembly=&lt;span class=&quot;str&quot;&gt;&amp;quot;EPiServer.Shell&amp;quot;&lt;/span&gt; Namespace=&lt;span class=&quot;str&quot;&gt;&amp;quot;EPiServer.Shell.Web.UI.WebControls&amp;quot;&lt;/span&gt; %&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;style type=&quot;text/css&quot;&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, &quot;Courier New&quot;, courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;In the head tag of our ASPX we need to add our styles &lt;/p&gt;

&lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;asp:PlaceHolder&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;ID&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&amp;quot;shellScripts&amp;quot;&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;runat&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;asp&quot;&gt;&amp;lt;%&lt;/span&gt;=Page.ClientResources(&lt;span class=&quot;str&quot;&gt;&amp;quot;Dojo&amp;quot;&lt;/span&gt;, &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt;[] &lt;br /&gt;{ ClientResourceType.Style })&lt;span class=&quot;asp&quot;&gt;%&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;asp&quot;&gt;&amp;lt;%&lt;/span&gt;=Page.ClientResources(&lt;span class=&quot;str&quot;&gt;&amp;quot;ShellCore&amp;quot;&lt;/span&gt;)&lt;span class=&quot;asp&quot;&gt;%&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;asp&quot;&gt;&amp;lt;%&lt;/span&gt;=Page.ClientResources(&lt;span class=&quot;str&quot;&gt;&amp;quot;ShellWidgets&amp;quot;&lt;/span&gt;)&lt;span class=&quot;asp&quot;&gt;%&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;asp&quot;&gt;&amp;lt;%&lt;/span&gt;=Page.ClientResources(&lt;span class=&quot;str&quot;&gt;&amp;quot;ShellCoreLightTheme&amp;quot;&lt;/span&gt;)&lt;span class=&quot;asp&quot;&gt;%&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;asp&quot;&gt;&amp;lt;%&lt;/span&gt;=Page.ClientResources(&lt;span class=&quot;str&quot;&gt;&amp;quot;ShellWidgetsLightTheme&amp;quot;&lt;/span&gt;)&lt;span class=&quot;asp&quot;&gt;%&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;asp&quot;&gt;&amp;lt;%&lt;/span&gt;=Page.ClientResources(&lt;span class=&quot;str&quot;&gt;&amp;quot;Navigation&amp;quot;&lt;/span&gt;)&lt;span class=&quot;asp&quot;&gt;%&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;kwrd&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;asp:PlaceHolder&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;style type=&quot;text/css&quot;&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, &quot;Courier New&quot;, courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;We also need to add our Menu to the page, after that we are done&lt;/p&gt;

&lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt; &lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;div&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&amp;quot;epi-globalNavigationContainer&amp;quot;&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;sc:ShellMenu&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;ID&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&amp;quot;ShellMenu2&amp;quot;&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;runat&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&amp;quot;server&amp;quot;&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;SelectionPath&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&amp;quot;/global/fb/main&amp;quot;&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;kwrd&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;div&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;style type=&quot;text/css&quot;&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, &quot;Courier New&quot;, courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;I used a MenuProvider since I dont really like making web.config changes. &lt;/p&gt;

&lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt; [MenuProvider]
    &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;class&lt;/span&gt; MenuProvider : IMenuProvider
    {
        &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; IEnumerable&amp;lt;MenuItem&amp;gt; GetMenuItems()
        {
            SectionMenuItem sectionMenuItem = &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; SectionMenuItem(&lt;span class=&quot;str&quot;&gt;&amp;quot;Facebook&amp;quot;&lt;/span&gt;, &lt;span class=&quot;str&quot;&gt;&amp;quot;/global/fb&amp;quot;&lt;/span&gt;);
            sectionMenuItem.IsAvailable = ((RequestContext request) =&amp;gt; PrincipalInfo.Current.HasPathAccess(UriSupport.Combine(&lt;span class=&quot;str&quot;&gt;&amp;quot;/Facebook&amp;quot;&lt;/span&gt;, &lt;span class=&quot;str&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;)));
            SectionMenuItem sectionMenuItem2 = sectionMenuItem;
            UrlMenuItem urlMenuItem = &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; UrlMenuItem(&lt;span class=&quot;str&quot;&gt;&amp;quot;Main&amp;quot;&lt;/span&gt;, &lt;span class=&quot;str&quot;&gt;&amp;quot;/global/fb/main&amp;quot;&lt;/span&gt;, &lt;span class=&quot;str&quot;&gt;&amp;quot;/modules/TopBarPlugin/MainMenuPlugin.aspx&amp;quot;&lt;/span&gt;);
            urlMenuItem.IsAvailable = ((RequestContext request) =&amp;gt; &lt;span class=&quot;kwrd&quot;&gt;true&lt;/span&gt;);
            urlMenuItem.SortIndex = 100;
            UrlMenuItem urlMenuItem2 = urlMenuItem;
           
            &lt;span class=&quot;kwrd&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; MenuItem[]
            {
                sectionMenuItem2, 
                urlMenuItem2
            };
        }
    }&lt;/code&gt;&lt;/pre&gt;
&lt;style type=&quot;text/css&quot;&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, &quot;Courier New&quot;, courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;&lt;a href=&quot;/link/1cdc3f99db0643f5b66c96b48cd7e723.png&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;Screen Shot 2013-01-02 at 2.40.41 PM&quot; border=&quot;0&quot; alt=&quot;Screen Shot 2013-01-02 at 2.40.41 PM&quot; src=&quot;/link/e6346fdef69747618faacee8f7551308.png&quot; width=&quot;369&quot; height=&quot;197&quot; /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;I am attaching my files in case someone wants the entire code&lt;/p&gt;

&lt;div style=&quot;padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px&quot; id=&quot;scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:031012a7-62ae-412c-b432-93fba7f786b0&quot; class=&quot;wlWriterEditableSmartContent&quot;&gt;&lt;p&gt; &lt;a href=&quot;/link/293422694d9d49789f4854362472ba4e.zip&quot; target=&quot;_blank&quot;&gt;Zipped Code Example&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</id><updated>2013-01-03T20:33:31.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>MobilePack 1.0</title><link href="https://world.optimizely.com/blogs/Jacob-Khan/Dates/2012/2/MobilePack-10/" /><id>&lt;p&gt;Frederik Vig, Allan Thraen and I are proud to announce MobilePack 1.0. For more information about the release read &lt;a href=&quot;http://www.frederikvig.com/2012/02/open-source-mobilepack-version-1-0/&quot;&gt;here&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;MobilePack 1.0 is the first stable release of MobilePack for EPiServer CMS 6 R2. To Install: download it from nuget or &lt;a href=&quot;http://mobilepack.codeplex.com&quot;&gt;codeplex&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Here are some of the new features/bug fixes:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Storing resized images for 7 days (default) in VPP for faster access &lt;/li&gt;    &lt;li&gt;Added ability to disable server image resizing &lt;/li&gt;    &lt;li&gt;Offline Manifest for using the site offline &lt;/li&gt;    &lt;li&gt;Ability to have different redirects for different language versions of a page &lt;/li&gt;    &lt;li&gt;Ability to turn off server-side image resizing &lt;/li&gt;    &lt;li&gt;Now running jQuery Mobile 1.0.1 &lt;/li&gt;    &lt;li&gt;Switching between normal/mobile and mobile/normal site now works for sub-domains as well &lt;/li&gt;    &lt;li&gt;Better language support for Google Maps location page type &lt;/li&gt;    &lt;li&gt;Not trying to resize images the user does not have access to &lt;/li&gt;    &lt;li&gt;Turned off all HTTP caching of resized images to avoid proxies storing and serving the same resized image to multiple devices running different resolutions &lt;/li&gt;    &lt;li&gt;Refactored and cleaned up code base &lt;/li&gt;    &lt;li&gt;Refactored Google Maps property as NuGet package &lt;/li&gt;    &lt;li&gt;Easier installation and setup on new and existing sites &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;To upgrade from 0.9 to 1.0 is very easy and can be done in two steps. Since the EPiServer.Labs.MobilePack.Core is a separate project we can simply choose to only upgrade the Core and utilize the new features without affecting our templates.&lt;/p&gt;  &lt;p&gt;It is recommended to upgrade using whatever way you first installed MobilePack with. &lt;/p&gt;  &lt;p&gt;Using Nuget go to manage packages and update the MobilePack.Core package only. &lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;/link/a56b72b173f54943b98a6ae0d5fa3629.png&quot;&gt;&lt;img style=&quot;background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px&quot; title=&quot;Screen shot 2012-02-09 at 2.55.08 PM&quot; border=&quot;0&quot; alt=&quot;Screen shot 2012-02-09 at 2.55.08 PM&quot; src=&quot;/link/0259d98713b14801b04d8b08240ba5eb.png&quot; width=&quot;534&quot; height=&quot;294&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;(If you only have the standard package demo installed just upgrade the entire thing)&lt;/p&gt;  &lt;p&gt;When you are done make sure to build. &lt;/p&gt;  &lt;p&gt;If you receive this error: GetLanguageIcon&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;/link/741b06cee2f34f5a8eecfb2b519c8852.png&quot;&gt;&lt;img style=&quot;background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px&quot; title=&quot;Screen shot 2012-02-09 at 2.54.14 PM&quot; border=&quot;0&quot; alt=&quot;Screen shot 2012-02-09 at 2.54.14 PM&quot; src=&quot;/link/a98e94ce39994a6abb169f760869c8ac.png&quot; width=&quot;531&quot; height=&quot;213&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This means the dll for 0.9 is still in your bin and you should use the 1.0 dll located in packages folder in the root of your site. &lt;/p&gt;  &lt;p&gt;To update using an EPiModule simply use the deployment tools and download the EPiModule from &lt;a href=&quot;http://mobilepack.codeplex.com&quot;&gt;http://mobilepack.codeplex.com&lt;/a&gt; . Then run the compressed file installer and select the epimodule. &lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;/link/63d58d92cba246f3b868ab8ebe995f1b.png&quot;&gt;&lt;img style=&quot;background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px&quot; title=&quot;Screen shot 2012-02-08 at 10.00.39 AM&quot; border=&quot;0&quot; alt=&quot;Screen shot 2012-02-08 at 10.00.39 AM&quot; src=&quot;/link/6f2b92fba33f4a019030722d48481aec.png&quot; width=&quot;464&quot; height=&quot;236&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Important to note is that this doesn’t upgrade the references to JQueryMobile 1.0. This needs to be done manually either using Nuget, downloading the files or visiting &lt;a href=&quot;http://jquerymobile.com&quot;&gt;http://jquerymobile.com&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Please give feedback and information on &lt;a href=&quot;http://mobilepack.codeplex.com&quot;&gt;http://mobilepack.codeplex.com&lt;/a&gt;&lt;/p&gt;</id><updated>2012-02-09T22:43:30.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>Commerce Manager filter meta properties by language</title><link href="https://world.optimizely.com/blogs/Jacob-Khan/Dates/2011/11/Commerce-Manager-filter-meta-properties-by-language/" /><id>&lt;p&gt;I was recently asked by a Partner to assist them in an issue they have with EPiServer Commerce and multiple languages. They run around 15 languages and have around 10 xhtlm meta properties on a single product/sku. This means that every time they are editing a sku they see all the language properties.&lt;/p&gt;
&lt;p&gt;I made a simple little drop down list that switches between the languages and only loads the classes needed for each language. This makes it easier for the editors when working with multiple languages.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;/link/aa21a24c4c644ba987b80dfced739a80.png&quot;&gt;&lt;img style=&quot;background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;&quot; title=&quot;Capture&quot; src=&quot;/link/9ea6d4c65ec1408b9924484ac7754c7b.png&quot; border=&quot;0&quot; alt=&quot;Capture&quot; width=&quot;440&quot; height=&quot;97&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Meta fields will be fetched as they are needed depending on the language. The loading time is decreased and it is easier to understand for editors. However if you are moving between languages without saving nothing is stored in memory so remember to save in between changing languages.&lt;/p&gt;
&lt;p&gt;The plugin needs some configuration but is real easy to use. Since it is added to the eCommerceFramework and not the site there is no epimodule installation. Of course, these are the kinds of things EPiServer is considering for enhancements in a future release.&amp;nbsp; In the mean time you can get started with this add-on by downloading the code and configuring it. Roger Cevung has also written an article on how to extend the commerce manager &lt;a href=&quot;http://world.episerver.com/Articles/Items/Customizations-of-EPiServer-Commerce-Manager-/&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In the zip there is a readme that will help you install the feature. Please add comments to the blog for questions and ideas.&lt;/p&gt;
&lt;p&gt;If you have problems with the compiling because it cannot find the usercontrols simply remove them from the designer files and add them manually to the codebehind.&lt;/p&gt;
&lt;p&gt;This plugin works for CMS 6 R2 with Commerce 1 R2 SP1&lt;/p&gt;
&lt;p&gt;Thanks to Nansen for testing this out&lt;/p&gt;
&lt;div id=&quot;scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:c6e7e30a-2cbb-4de4-b25d-08b4d1342891&quot; class=&quot;wlWriterEditableSmartContent&quot; style=&quot;margin: 0px; display: inline; float: none; padding: 0px;&quot;&gt;
&lt;p&gt;&lt;a href=&quot;/link/91167dbe5cf54bf28396790f6a953fbe.zip&quot;&gt;Download Code Here: SourceProject &lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;</id><updated>2011-11-11T17:28:00.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>Add Page Guide from code</title><link href="https://world.optimizely.com/blogs/Jacob-Khan/Dates/2010/10/Add-Page-Guide-from-code/" /><id>&lt;p&gt;Today I got a question from &lt;a href=&quot;http://bigfinger.se/&quot;&gt;Stephan Kvart&lt;/a&gt; who wants to add Page Guides (Quick Publishing) from code. If you are not familiar with the concept of Page guides I recommend reading about it &lt;a href=&quot;http://world.episerver.com/Articles/Items/Streamline-Your-Daily-Work-with-EPiServer-CMS-6/&quot;&gt;here&lt;/a&gt;. He is as many others a &lt;a href=&quot;http://pagetypebuilder.codeplex.com/&quot;&gt;PTB&lt;/a&gt; user and does not like the idea of adding guides in web.config. Using Reflector and some smart EPiServer people I was able to create page guides from code. &lt;/p&gt;  &lt;p&gt;You need to add a reference to this dll EPiServer.Research.PageGuideHelper.dll. Then you can create a class, inherit from PageGuideExtension and add the attribute PageGuideAttribute.&lt;/p&gt;  &lt;div style=&quot;border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 98.95%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; height: 210px; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px&quot; id=&quot;codeSnippetWrapper&quot;&gt;   &lt;div style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot; id=&quot;codeSnippet&quot;&gt;     &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;[PageGuideAttribute]&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;class&lt;/span&gt; CreateNewsGuide : PageGuideExtension&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;    {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;        &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;override&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt; Name&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;        {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;            get&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;            {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;                &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Create News&amp;quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;            }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;        }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;        &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;override&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt; Title&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;        {   get&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;            {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;                &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Create News Title&amp;quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;            }       }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;        &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;override&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt; PageTypeName&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;        {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;            get&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;            {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;                &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;[Public] News item&amp;quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;            }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;        }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;        &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;override&lt;/span&gt; EPiServer.Core.PageReference DestinationPage&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;        {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;            get { &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; PageReference(4); }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;        }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;        &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;override&lt;/span&gt; System.Collections.Generic.List&amp;lt;&lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt;&amp;gt; Properties&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;        {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;            get { &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; System.Collections.Generic.List&amp;lt;&lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt;&amp;gt; { &lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;PageName&amp;quot;&lt;/span&gt;, &lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;MainBody&amp;quot;&lt;/span&gt; }; }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;        }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;    }&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;They are automatically registered and it works well on my machine. &lt;/p&gt;

&lt;p&gt;This code is provided as is without support.&lt;/p&gt;

&lt;div style=&quot;padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px&quot; id=&quot;scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:3ad703d4-2361-455b-8c1a-0e440ed90885&quot; class=&quot;wlWriterEditableSmartContent&quot;&gt;&lt;p&gt; &lt;a href=&quot;/link/70159e3d1173466e923b5ecf43112885.zip&quot; target=&quot;_blank&quot;&gt;dll&lt;/a&gt;&lt;br /&gt; &lt;a href=&quot;/link/7822694c6c8b47c0931b44ae33b0bddf.zip&quot; target=&quot;_blank&quot;&gt;full code&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</id><updated>2010-10-13T14:55:00.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>XForms validation</title><link href="https://world.optimizely.com/blogs/Jacob-Khan/Dates/2010/5/XForms-validation/" /><id>&lt;p&gt;I recently got a question from a partner if it is possible to add validation to check if two fields are equal to each other. The scenario was that a user is asked for their email address and then asked to confirm it. I have already blogged about how to add a simple regular expression validation but this requires a bit more code but not much. &lt;a href=&quot;http://world.episerver.com/Blogs/Anders-Hattestad/Dates/2010/5/Extend-EPiServer-XForm/&quot;&gt;Anders Hattestad&lt;/a&gt; wrote a great blog post on how to extend XForms and with the help of his blog post I got my validation working. &lt;/p&gt;  &lt;p&gt;I start by adding a regular expression validation in my global.asax. &lt;/p&gt;  &lt;div style=&quot;border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px&quot; id=&quot;codeSnippetWrapper&quot;&gt;   &lt;div style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot; id=&quot;codeSnippet&quot;&gt;     &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum1&quot;&gt;   1:&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;protected&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; Application_Start(Object sender, EventArgs e)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum2&quot;&gt;   2:&lt;/span&gt;         {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum3&quot;&gt;   3:&lt;/span&gt;             EPiServer.XForms.DataTypes.Types.Add(&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Similar&amp;quot;&lt;/span&gt;, &lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;aretheysimilar&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum4&quot;&gt;   4:&lt;/span&gt;             XFormControl.ControlSetup += &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; EventHandler(XForm_ControlSetup);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum5&quot;&gt;   5:&lt;/span&gt;         }&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;This is only done to get the validation to show up in our drop down list.&lt;a href=&quot;/link/b44450e84b2f4c6da0ee16d628500f22.png&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;xformssim&quot; border=&quot;0&quot; alt=&quot;xformssim&quot; src=&quot;/link/379a80f77b96437cb3205d5b916b5582.png&quot; width=&quot;367&quot; height=&quot;263&quot; /&gt;&lt;/a&gt; &lt;/p&gt;



&lt;p&gt;When I select two different textboxes I mark both as similar in the drop down list. &lt;/p&gt;

&lt;p&gt;On the event control.ControlsCreated += I attach and add some code. &lt;/p&gt;

&lt;p&gt;First thing I do is that I try to find the regular expression validation added with my dummy regex.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;div style=&quot;border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px&quot; id=&quot;codeSnippetWrapper&quot;&gt;
  &lt;div style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot; id=&quot;codeSnippet&quot;&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum1&quot;&gt;   1:&lt;/span&gt; List&amp;lt;&lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt;&amp;gt; equalcontrolstocheck = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; List&amp;lt;&lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt;&amp;gt;();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum2&quot;&gt;   2:&lt;/span&gt;           List&amp;lt;&lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt;&amp;gt; removecontrols = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; List&amp;lt;&lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt;&amp;gt;();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum3&quot;&gt;   3:&lt;/span&gt;           &lt;span style=&quot;color: #0000ff&quot;&gt;foreach&lt;/span&gt; (Control item &lt;span style=&quot;color: #0000ff&quot;&gt;in&lt;/span&gt;  formControl.Controls)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum4&quot;&gt;   4:&lt;/span&gt;           {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum5&quot;&gt;   5:&lt;/span&gt;               &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (item &lt;span style=&quot;color: #0000ff&quot;&gt;is&lt;/span&gt; System.Web.UI.WebControls.RegularExpressionValidator)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum6&quot;&gt;   6:&lt;/span&gt;               {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum7&quot;&gt;   7:&lt;/span&gt;                   &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (((RegularExpressionValidator)item).ValidationExpression == &lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;aretheysimilar&amp;quot;&lt;/span&gt;)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum8&quot;&gt;   8:&lt;/span&gt;                   {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum9&quot;&gt;   9:&lt;/span&gt;                       Control c = formControl.FindControl(((RegularExpressionValidator)item).ControlToValidate);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum10&quot;&gt;  10:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum11&quot;&gt;  11:&lt;/span&gt;                       equalcontrolstocheck.Add(c.ID);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum12&quot;&gt;  12:&lt;/span&gt;                       removecontrols.Add(item.ID);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum13&quot;&gt;  13:&lt;/span&gt;                   }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum14&quot;&gt;  14:&lt;/span&gt;               }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum15&quot;&gt;  15:&lt;/span&gt;           }&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;I then add the controls to a list and the controls they validate. I then remove the regular expression validation controls and add a compare control saying that both controls should be equal&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;div style=&quot;border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px&quot; id=&quot;codeSnippetWrapper&quot;&gt;
  &lt;div style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot; id=&quot;codeSnippet&quot;&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum1&quot;&gt;   1:&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (equalcontrolstocheck.Count &amp;gt; 1)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum2&quot;&gt;   2:&lt;/span&gt;           {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum3&quot;&gt;   3:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum4&quot;&gt;   4:&lt;/span&gt;               formControl.Controls.Remove(formControl.FindControl(removecontrols[0]));&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum5&quot;&gt;   5:&lt;/span&gt;               formControl.Controls.Remove(formControl.FindControl(removecontrols[1]));&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum6&quot;&gt;   6:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum7&quot;&gt;   7:&lt;/span&gt;               CompareValidator comparevalid = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; CompareValidator();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum8&quot;&gt;   8:&lt;/span&gt;               comparevalid.ControlToValidate = equalcontrolstocheck[0];&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum9&quot;&gt;   9:&lt;/span&gt;               comparevalid.ControlToCompare = equalcontrolstocheck[1];&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum10&quot;&gt;  10:&lt;/span&gt;               comparevalid.Type = ValidationDataType.String;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum11&quot;&gt;  11:&lt;/span&gt;               comparevalid.Operator = ValidationCompareOperator.Equal;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum12&quot;&gt;  12:&lt;/span&gt;               comparevalid.Text = &lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;They do not match&amp;quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum13&quot;&gt;  13:&lt;/span&gt;               comparevalid.ID = &lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;emailisequal&amp;quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum14&quot;&gt;  14:&lt;/span&gt;               comparevalid.Display = ValidatorDisplay.Dynamic;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum15&quot;&gt;  15:&lt;/span&gt;               comparevalid.ValidationGroup = &lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;XForm&amp;quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum16&quot;&gt;  16:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum17&quot;&gt;  17:&lt;/span&gt;               formControl.Controls.Add(comparevalid);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum18&quot;&gt;  18:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum19&quot;&gt;  19:&lt;/span&gt;           }&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;The end results are that if they are not equal it will show&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/link/0a8793c269684d169a390c14108d6894.png&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;similar&quot; border=&quot;0&quot; alt=&quot;similar&quot; src=&quot;/link/e7beab2c3a864734acbf6a464d891bf6.png&quot; width=&quot;324&quot; height=&quot;189&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</id><updated>2010-05-31T17:08:15.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>Failed to load root node – Live Monitor</title><link href="https://world.optimizely.com/blogs/Jacob-Khan/Dates/2010/5/Failed-to-load-root-node--Live-Monitor/" /><id>&lt;p&gt;Today I installed live monitor on a CMS 6 site with PageTypeBuilder, PageTypeIcons and alot of other cool stuff. After following the installation I ran into the issue of “Failed to load root node”. This was also the issue that &lt;a href=&quot;http://blog.bigfinger.se/archive.aspx&quot;&gt;Kvart&lt;/a&gt; ran into when he installed live monitor. Libardo gave me the tip of using fiddler to see where it actually went wrong. Fiddler told me that it found the correct startpageid which was my startpage. But it could not find the page it self. My bindings of the site was setup to be “* :17020” which meant I could use the computers name and 17020 to access the site. I changed it so that the the binding was jacobkhan-imac and put that url in the web.config as stated by the instructions on world and there we have it.&lt;/p&gt;  &lt;p&gt;In other words it could not find the site since I put in an ambigous url in web.config&lt;/p&gt;  &lt;p&gt;Now everything works like a charm&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;/link/132a18ef6c3344db8812a7ab6748e76e.png&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;/link/bea30ea861f24f43a8004af51c38c551.png&quot; width=&quot;400&quot; height=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</id><updated>2010-05-27T15:16:07.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>Compare in Edit mode CMS 6</title><link href="https://world.optimizely.com/blogs/Jacob-Khan/Dates/2010/3/Compare-in-Edit-mode-CMS-6/" /><id>&lt;p&gt;In CMS 6 a new editorial feature is available making it easier to compare versions in EPiServer. When listing versions there is a new tab showing three different compare options. Compare the old way, side by side, compare properties also side by side and merge using EPiDiff and highlight changes. We hope that these three options will make it easier for editors to be able to see changes in their documents and be able to track changes easier.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;/link/9a5fd86eaf434f649887d9ef6a460d3f.png&quot;&gt;&lt;img style=&quot;BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;/link/3040baa53df94c6cba905d7263bf51fd.png&quot; width=&quot;374&quot; height=&quot;123&quot; /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;EPiDiff is the default comparer added by EPiServer through code. When doing comparison it is important to render correct html based on the premise that the html already given is correct. The first thing it does is fix html and make it xhtml friendly using the html parser is EPiServer.Core.Html.HTMLParser. This will give a XMLDocument and we use its XMLNodes. We also fix script tags so that //CDATA is correct. By this I mean that if script tags don’t have CDATA we add it, if they are commented out for earlier browser versions we remove the comments. If we do not do this we cannot render correct XML which is needed in order to traverse through the xhtml.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;/link/0b658c79d6de4e3e868a9c7958517994.png&quot;&gt;&lt;img style=&quot;BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;/link/57df6e853e91420988c00d3d3d3f9a4f.png&quot; width=&quot;359&quot; height=&quot;278&quot; /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;It starts comparing the nodes inside the body tag because we cannot show changes in Meta tags anyways so it seems unnecessary to compare them. It goes through each node and checks if their html is equal to each other. If they are equal the node is added to our final concatenated string. If they are not equal we recursively call ourselves with the selected child as parameter. &lt;/p&gt;
&lt;p&gt;Most texts in the xml are considered as a whole and individual words will not be compared unless the html tag is added to our list AnalyzeTextBasedOnTheseBlocks. In the default provider it includes &amp;lt;span&amp;gt; and &amp;lt;p&amp;gt;. &lt;/p&gt;
&lt;p&gt;If we encounter html tags that are in this list we automatically compare individual words and their relative position. This algorithm looks at individual words and sees if they can find the word later in the text. If the word can be found the words before it is considered inserted or deleted. In reality this function is more complex but this is the simple explanation of it. The summary is that the text based comparison handles moved words whilst the xml based comparison does not handle moved tags. Why is because moved html is tricky and in a composer environment this could easily render correct html by math but to an editor it looks odd and breaks design. We show changed information using &amp;lt;ins&amp;gt; and &amp;lt;del&amp;gt; tags. &lt;/p&gt;
&lt;p&gt;Since this is a provider model most of this can be changed. The provider needs to inherit from the abstract class called “PageCamparerProviderBase” in the namespace “EPiServer.UI.Edit.PageCompare.Core”, and implement the abstract method called “GetDiffOfHtml”. The method takes two strings as argument. The strings contain the html from a page, and the method should return an html string showing the differences between the two pages.&lt;/p&gt;&lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;&lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;class&lt;/span&gt; PageCompareAlgorithm : PageComparerProviderBase
{
&lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;override&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; GetDiffOfHtml(&lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; html1, &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; html2)
{}}

&lt;/code&gt;&lt;/pre&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;![CDATA[UNKNOWN {
	BACKGROUND-COLOR: #ffffff; FONT-FAMILY: consolas, &quot;Courier New&quot;, courier, monospace; COLOR: black; FONT-SIZE: small
}
.csharpcode PRE {
	MARGIN: 0em
}
.csharpcode .rem {
	COLOR: #008000
}
.csharpcode .kwrd {
	COLOR: #0000ff
}
.csharpcode .str {
	COLOR: #006080
}
.csharpcode .op {
	COLOR: #0000c0
}
.csharpcode .preproc {
	COLOR: #cc6633
}
.csharpcode .asp {
	BACKGROUND-COLOR: #ffff00
}
.csharpcode .html {
	COLOR: #800000
}
.csharpcode .attr {
	COLOR: #ff0000
}
.csharpcode .alt {
	BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; WIDTH: 100%
}
.csharpcode .lnum {
	COLOR: #606060
}
]]&gt;&lt;/style&gt;


&lt;h5&gt;&lt;a name=&quot;_Toc245171915&quot;&gt;&lt;/a&gt;&lt;/h5&gt;EPiServers implementation is called “PageCompareAlgorithm” and can be found in the namespace “EPiServer. EPiServer.UI.Edit.PageCompare.Core.Providers”. This class inherits from “PageCamparerProviderBase”. 
&lt;p&gt;The PageCompareAlgorithm implementation has a lot of virtual methods that can be overridden. This makes it easy for developers to change small pieces of the default implementation.The example below makes it possible to change the &amp;lt;ins style=”background:…&amp;gt; to whatever color and you want to.&lt;/p&gt;&lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;&lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;class&lt;/span&gt; TestProvider : PageCompareAlgorithm
{
 &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;override&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; AddedBeginTag
{}
}
&lt;/code&gt;&lt;/pre&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;![CDATA[UNKNOWN {
	BACKGROUND-COLOR: #ffffff; FONT-FAMILY: consolas, &quot;Courier New&quot;, courier, monospace; COLOR: black; FONT-SIZE: small
}
.csharpcode PRE {
	MARGIN: 0em
}
.csharpcode .rem {
	COLOR: #008000
}
.csharpcode .kwrd {
	COLOR: #0000ff
}
.csharpcode .str {
	COLOR: #006080
}
.csharpcode .op {
	COLOR: #0000c0
}
.csharpcode .preproc {
	COLOR: #cc6633
}
.csharpcode .asp {
	BACKGROUND-COLOR: #ffff00
}
.csharpcode .html {
	COLOR: #800000
}
.csharpcode .attr {
	COLOR: #ff0000
}
.csharpcode .alt {
	BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; WIDTH: 100%
}
.csharpcode .lnum {
	COLOR: #606060
}
]]&gt;&lt;/style&gt;

&lt;style type=&quot;text/css&quot;&gt;&lt;![CDATA[UNKNOWN {
	BACKGROUND-COLOR: #ffffff; FONT-FAMILY: consolas, &quot;Courier New&quot;, courier, monospace; COLOR: black; FONT-SIZE: small
}
.csharpcode PRE {
	MARGIN: 0em
}
.csharpcode .rem {
	COLOR: #008000
}
.csharpcode .kwrd {
	COLOR: #0000ff
}
.csharpcode .str {
	COLOR: #006080
}
.csharpcode .op {
	COLOR: #0000c0
}
.csharpcode .preproc {
	COLOR: #cc6633
}
.csharpcode .asp {
	BACKGROUND-COLOR: #ffff00
}
.csharpcode .html {
	COLOR: #800000
}
.csharpcode .attr {
	COLOR: #ff0000
}
.csharpcode .alt {
	BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; WIDTH: 100%
}
.csharpcode .lnum {
	COLOR: #606060
}
]]&gt;&lt;/style&gt;

&lt;p&gt;To add a provider through the configuration file, open web.config for the site and add the following section:&lt;/p&gt;&lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;configSections&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;
…
&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;section&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;episerver.pageComaprer&quot;&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;EPiServer.UI.Edit.PageCompare.Configuration.PageCompareSection, EPiServer.UI&quot;&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;/&amp;gt;&lt;/span&gt;
…
&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;configSections&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;episerver.pageComaprer&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;pageComparer&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;defaultProvider&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;DefaultPageComparer&quot;&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;providers&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;add&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;MyProvider&quot;&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;description&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;&quot;&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;MyNamespace.MyClass, MyAssembly&quot;&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;AnalyzeTextBasedOnTheseBlocks&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;p; span&quot;&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;/&amp;gt;&lt;/span&gt;
&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;providers&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;pageComparer&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;episerver.pageComaprer&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;![CDATA[UNKNOWN {
	BACKGROUND-COLOR: #ffffff; FONT-FAMILY: consolas, &quot;Courier New&quot;, courier, monospace; COLOR: black; FONT-SIZE: small
}
.csharpcode PRE {
	MARGIN: 0em
}
.csharpcode .rem {
	COLOR: #008000
}
.csharpcode .kwrd {
	COLOR: #0000ff
}
.csharpcode .str {
	COLOR: #006080
}
.csharpcode .op {
	COLOR: #0000c0
}
.csharpcode .preproc {
	COLOR: #cc6633
}
.csharpcode .asp {
	BACKGROUND-COLOR: #ffff00
}
.csharpcode .html {
	COLOR: #800000
}
.csharpcode .attr {
	COLOR: #ff0000
}
.csharpcode .alt {
	BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; WIDTH: 100%
}
.csharpcode .lnum {
	COLOR: #606060
}
]]&gt;&lt;/style&gt;

&lt;p&gt;The section element must be placed inside the “configSections” element, and the “episerver.pageComparer” section must be placed inside the “configuration” element. &lt;/p&gt;
&lt;p&gt;In the provider, we have an optional attribute called “AnalyzeTextBasedOnTheseBlocks” that can be added. This will be loaded into a property with the same name in the provider base when the provider gets initialized. &lt;/p&gt;
&lt;p&gt;The default provider will set the “p” and the “span” element as analyze blocks if nothing else is configured in the configuration file. By adding the section in web.config and setting EPiServers provider as the default provider, it’s possible to change this property. &lt;/p&gt;
&lt;p&gt;There is a possibility to use a custom provider without adding anything to the configuration file. It can be done by creating a “ProviderSettings” object with the type as parameter. It will not be possible to use the provider this way with the default plug-in, but it can be useful when making tests. &lt;/p&gt;
&lt;div class=&quot;csharpcode&quot;&gt;&lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;&lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; providerName = &lt;span class=&quot;str&quot;&gt;&quot;TestProvider&quot;&lt;/span&gt;;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;&amp;nbsp;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;ProviderSettings providerSettings = &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; ProviderSettings(providerName, &lt;span class=&quot;str&quot;&gt;&quot;EPiServerUnitTest.EPiDiff.TestProviders.TestProvider, EPiServerUnitTest&quot;&lt;/span&gt;);&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;&amp;nbsp;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;providerSettings.Parameters.Add(&lt;span class=&quot;str&quot;&gt;&quot;AnalyzeTextBasedOnTheseBlocks&quot;&lt;/span&gt;, &lt;span class=&quot;str&quot;&gt;&quot;p; span; div&quot;&lt;/span&gt;);&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;&amp;nbsp;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;DiffComparerProviderBase diffComparerProvider = DiffComparerProviderBase.CreateInstance(providerSettings);&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;![CDATA[UNKNOWN {
	BACKGROUND-COLOR: #ffffff; FONT-FAMILY: consolas, &quot;Courier New&quot;, courier, monospace; COLOR: black; FONT-SIZE: small
}
.csharpcode PRE {
	MARGIN: 0em
}
.csharpcode .rem {
	COLOR: #008000
}
.csharpcode .kwrd {
	COLOR: #0000ff
}
.csharpcode .str {
	COLOR: #006080
}
.csharpcode .op {
	COLOR: #0000c0
}
.csharpcode .preproc {
	COLOR: #cc6633
}
.csharpcode .asp {
	BACKGROUND-COLOR: #ffff00
}
.csharpcode .html {
	COLOR: #800000
}
.csharpcode .attr {
	COLOR: #ff0000
}
.csharpcode .alt {
	BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; WIDTH: 100%
}
.csharpcode .lnum {
	COLOR: #606060
}
]]&gt;&lt;/style&gt;

&lt;p&gt;We hope that this feature will be used and is appreciated by our editors. We are constantly trying to improve this algorithm and find new ways of showing changes made such as image changes and dynamic content changes. &lt;/p&gt;
&lt;p&gt;/Jacob&lt;/p&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;![CDATA[UNKNOWN {
	BACKGROUND-COLOR: #ffffff; FONT-FAMILY: consolas, &quot;Courier New&quot;, courier, monospace; COLOR: black; FONT-SIZE: small
}
.csharpcode PRE {
	MARGIN: 0em
}
.csharpcode .rem {
	COLOR: #008000
}
.csharpcode .kwrd {
	COLOR: #0000ff
}
.csharpcode .str {
	COLOR: #006080
}
.csharpcode .op {
	COLOR: #0000c0
}
.csharpcode .preproc {
	COLOR: #cc6633
}
.csharpcode .asp {
	BACKGROUND-COLOR: #ffff00
}
.csharpcode .html {
	COLOR: #800000
}
.csharpcode .attr {
	COLOR: #ff0000
}
.csharpcode .alt {
	BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; WIDTH: 100%
}
.csharpcode .lnum {
	COLOR: #606060
}
]]&gt;&lt;/style&gt;</id><updated>2010-03-08T15:20:00.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>Exchange gadget</title><link href="https://world.optimizely.com/blogs/Jacob-Khan/Dates/2009/11/Exchange-gadget/" /><id>&lt;p&gt;Here is my contribution to the Open Gadget Contest 2009. I previously created an integration to Exchange syncing exchange tasks into EPiServer. A similar integration was done on the old research site showing calendar events.&lt;/p&gt;  &lt;p&gt;This Gadget uses some of the old with some of the new. I made three “smaller gadgets” but they all use the same library and should therefore be considered as one gadget. It is an integration with Exchange 2007 which uses Web Services to interact with my gadgets. &lt;/p&gt;  &lt;p&gt;Three gadgets were made: Calendar, Tasks and Mail. &lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;/link/7b0cd5f95f144a70bca12ded6b3098ad.png&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;/link/64ee5606684a48a58d4ed95c8a999b2e.png&quot; width=&quot;452&quot; height=&quot;71&quot; /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Calendar uses the old flash calendar from r.ep.se. One restriction here is that you cannot book a meeting. &lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;/link/f5f80faa136148dcad12abfc01be88a0.png&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;/link/69aa94ea11d1471bbd735c59e2479c80.png&quot; width=&quot;343&quot; height=&quot;281&quot; /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Tasks will show tasks from Exchange just like the EPiServer task gadget. &lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;/link/8a664985de1f40dabb99f68a773544a1.png&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;/link/472d46becd484a0f9b8e69db248a6a2e.png&quot; width=&quot;344&quot; height=&quot;243&quot; /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Last but not least is Mail which will get the 10 latest emails from your inbox and show them. &lt;a href=&quot;/link/e7ccd664be434e73a4509f664141a928.png&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;/link/16add5745f2548be88257b0120d4abbd.png&quot; width=&quot;345&quot; height=&quot;234&quot; /&gt;&lt;/a&gt;&amp;#160; &lt;/p&gt;          &lt;p&gt;All of these use the same user settings saved in DDS. They are retrieved by User name and therefore you cannot have multiple of the same gadget. An upside is that you only need to update on of them to have all of them use the same settings&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;/link/e6bdec32303b48fcb0aa3384883ef143.png&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;/link/a03eb1951deb41a595811f385f3e99d7.png&quot; width=&quot;369&quot; height=&quot;191&quot; /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The settings are: url to Webservice that your Exchange 2007 uses, what email to open, useraccount that has access to read, password and domain. For Example see image above.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;To install download source, copy to your site, compile and add this to the web.config, or run run the installer module through &lt;/p&gt;  &lt;div style=&quot;border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px&quot; id=&quot;codeSnippetWrapper&quot;&gt;   &lt;div style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot; id=&quot;codeSnippet&quot;&gt;     &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum1&quot;&gt;   1:&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000&quot;&gt;add&lt;/span&gt; &lt;span style=&quot;color: #ff0000&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;=&amp;quot;BiggieSmalls&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum2&quot;&gt;   2:&lt;/span&gt;        &lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000&quot;&gt;assemblies&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum3&quot;&gt;   3:&lt;/span&gt;          &lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000&quot;&gt;add&lt;/span&gt; &lt;span style=&quot;color: #ff0000&quot;&gt;assembly&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;=&amp;quot;BiggieSmalls&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum4&quot;&gt;   4:&lt;/span&gt;        &lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000&quot;&gt;assemblies&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum5&quot;&gt;   5:&lt;/span&gt;      &lt;span style=&quot;color: #0000ff&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000&quot;&gt;add&lt;/span&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;//Updated&lt;/p&gt;

&lt;p&gt;Fixed a bug with mail and added an installer module. Install it using the Deployment Center.&lt;/p&gt;



&lt;div style=&quot;padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px&quot; id=&quot;scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:6bf7822b-1db4-4a02-aabf-944e082dc291&quot; class=&quot;wlWriterEditableSmartContent&quot;&gt;&lt;p&gt; &lt;a href=&quot;/link/ec753473a3134b579cb2e331a62a2b70.zip&quot; target=&quot;_blank&quot;&gt;source&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;





&lt;div style=&quot;padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px&quot; id=&quot;scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:e3e67d76-4eba-4957-95ac-9ba8fa1b18b6&quot; class=&quot;wlWriterEditableSmartContent&quot;&gt;&lt;p&gt; &lt;a href=&quot;/link/d4ea70645b7c4b7ebbf0fd57ef01edac.epimodule&quot; target=&quot;_blank&quot;&gt;zip installer&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;



&lt;p&gt;/Jacob&lt;/p&gt;</id><updated>2009-11-11T14:55:52.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>Scheduled backup of your site</title><link href="http://labs.episerver.com/en/Blogs/Jacob-Khan/Dates/2009/8/Scheduled-backup-of-your-site/" /><id>I wanted to make a tool that would help me backup my content. I decided to make a scheduled service that would export my content from EPiServer and put it with the code. I could then save it in the TFS with the code. After having a little chat wit...</id><updated>2009-08-25T13:11:47.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>Am I in Edit or View mode</title><link href="http://labs.episerver.com/en/Blogs/Jacob-Khan/Dates/2009/8/Am-I-in-Edit-or-View-mode/" /><id>My first blog post as graduated will be a short one, but I promise more is coming. I recently got a question about how do you know if you are in Edit or Admin mode. Say you have a usercontrol that is used in both an Admin plugin and on a Template...</id><updated>2009-08-21T18:10:04.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>Add validation to XForms textbox</title><link href="http://labs.episerver.com/en/Blogs/Jacob-Khan/Dates/2009/7/Add-validation-to-XForms-textbox/" /><id>&amp;#160; I recently came across a partner that needed to add custom validation in the Editor making it possible to validate for such things as emails ending with .dk are not allowed. After some failure in digging around I went to the back-end team and...</id><updated>2009-07-29T01:28:06.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>WikiX update and Relate integration</title><link href="http://labs.episerver.com/en/Blogs/Jacob-Khan/Dates/2009/6/WikiX-update-and-Relate-integration/" /><id>WikiX is the open source Wiki solution based on EPiServer CMS. It is available on codeplex and our first beta release was made in December 2008. Allan Thraen has previously blogged about some of the features in WIkiX and so have I. Five months lat...</id><updated>2009-06-11T16:02:51.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>Registered Download</title><link href="http://labs.episerver.com/en/Blogs/Jacob-Khan/Dates/2009/5/Registered-Download/" /><id>Before labs.episerver.com we had a research site called r.ep.se. On this site we had bloggers, our calendars and different projects. When people wanted to download our projects they had to register their email and we would send them a link to the...</id><updated>2009-05-18T18:37:56.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>How to make your EPiServer site mobile</title><link href="http://labs.episerver.com/en/Blogs/Jacob-Khan/Dates/2009/4/How-to-make-your-EPiServer-site-mobile/" /><id>This is a question very suitable for almost everyone working with websites. But how do you do it. I would say you can spend a lot of time and money building special implementations for iPhone ( my blog ) and Android (soon) but what about all the...</id><updated>2009-04-08T17:12:23.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>Internet Explorer 8</title><link href="http://labs.episerver.com/en/Blogs/Jacob-Khan/Dates/2009/3/Internet-Explorer-8/" /><id>Now that Microsoft is releasing a stable version of IE8 I thought it was time we at EPiServer show how you can use some of the new features with the browser. A few things to check is the toolbar search using Wikipedia, in private browsing and the...</id><updated>2009-03-18T18:45:26.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>TinyMce Adapter for EPiServer CMS</title><link href="http://labs.episerver.com/en/Blogs/Jacob-Khan/Dates/2009/2/TinyMce-Adapter-for-EPiServer-CMS/" /><id>The EPiServer CMS editor is a great editor. It is easy to use, simple yet gives you all the complicated features it should. The only issue is that it doesn’t work for non IE browsers. I know that the dev team is working hard on a solution for r3 b...</id><updated>2009-02-20T17:00:13.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>Search Engine Sitemaps</title><link href="http://labs.episerver.com/en/Blogs/Jacob-Khan/Dates/2009/1/Search-Engine-Sitemaps/" /><id>Another module has been added to our Open Source initiative. Search Engine Sitemaps is the old EPiGoogleSitemaps but now you can make your own changes that fits your needs. The project can be found on epicode . This module makes it easy for search...</id><updated>2009-01-30T18:19:13.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>EPiServer CMS 5 R2 on Windows 7</title><link href="http://labs.episerver.com/en/Blogs/Jacob-Khan/Dates/2009/1/EPiServer-CMS-5-R2-on-Windows-7/" /><id>This week Microsoft announced they would release a Beta of Windows 7 build 7000. Some had the privilege of getting Windows 7 build 6801 before everyone else when they went to PDC in October 2008. In order to run EPiServer CMS 5 R2 on a fresh Windo...</id><updated>2009-01-09T16:17:30.0000000Z</updated><summary type="html">Blog post</summary></entry></feed>