<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <language>en</language>
        <title>Blogs</title>
        <link>http://world.episerver.com</link>
        <description></description>
        <ttl>60</ttl>
        <generator>EPiServer World</generator>
        <item>
            <title>Add some reactive signaling to your Relate+ site</title>
            <link>http://www.tech-fellow.lv/?p=6582</link>
            <description>Guys at Microsoft Open Technologies have been doing a really great job and brought us&#160;SignalR library a while ago. Essentially SignalR is library making you create a real-time applications amazingly fast and easy. I&amp;#8217;ll be not covering a basic parts of SignalR library here in this post, but will try to take a look at &lt;span class=&quot;ellipsis&quot;&gt;&amp;#8230;&lt;/span&gt; &lt;span class=&quot;more-link-wrap&quot;&gt;&lt;a href=&quot;http://www.tech-fellow.lv/2013/06/add-some-reactive-signaling-to-your-relate-site/&quot; class=&quot;more-link&quot;&gt;&lt;span&gt;Read More ...&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;</description>
            <guid>http://www.tech-fellow.lv/?p=6582</guid>
            <pubDate>Tue, 18 Jun 2013 22:46:03 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>EPiServer Composer serving up &quot;old&quot; versions of pages</title>
            <link>http://www.david-tec.com/2013/06/EPiServer-Composer-serving-up-old-versions-of-pages/</link>
            <description>I recently encountered an issue where EPiServer Composer appeared to be serving up old versions of pages, even after they have been published. This was identified on EPiServer CMS 6 R2 and Composer 4. The issue was traced to a particular behaviour where editors copy/pasted a Composer page that contained global Composer blocks. After this operation the newly created page would revert back to an...</description>
            <guid>http://www.david-tec.com/2013/06/EPiServer-Composer-serving-up-old-versions-of-pages/</guid>
            <pubDate>Tue, 18 Jun 2013 17:06:00 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>Disqus for EPiServer</title>
            <link>http://dmytroduk.com/techblog/disqus-for-episerver</link>
            <description>&lt;p&gt;Let me introduce &lt;a href=&quot;http://dmytroduk.com/projects/disqus-for-episerver&quot;&gt;Disqus for EPiServer&lt;/a&gt;, a &lt;a href=&quot;http://disqus.com/for-websites/&quot;&gt;Disqus comments&lt;/a&gt; integration for EPiServer-based websites. The module consists of two add-ons which enable discussions on pages and provide user interface for configuration.&lt;/p&gt; &lt;p&gt;Now Disqus for EPiServer add-ons are available in the Third-Party Add-ons section in the official EPiServer Add-on Store.&lt;/p&gt; &lt;h2&gt;Enabling Disqus comments&lt;/h2&gt; &lt;p&gt;There are several ways to display Disqus comments on pages:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;a href=&quot;http://dmytroduk.com/projects/disqus-for-episerver/adding-disqus-comments-on-pages#SharedBlock&quot;&gt;Adding comments as a shared block&lt;/a&gt; (target user: editor)  &lt;li&gt;&lt;a href=&quot;http://dmytroduk.com/projects/disqus-for-episerver/adding-disqus-comments-on-pages#DynamicContent&quot;&gt;Adding comments as a dynamic content&lt;/a&gt; (target user: editor)  &lt;li&gt;&lt;a href=&quot;http://dmytroduk.com/projects/disqus-for-episerver/adding-disqus-comments-on-pages#RenderingAreas&quot;&gt;Displaying discussions in the rendering areas defined in the templates&lt;/a&gt; (target user: developer)  &lt;li&gt;&lt;a href=&quot;http://dmytroduk.com/projects/disqus-for-episerver/adding-disqus-comments-on-pages#BlockProperty&quot;&gt;Rendering comments block as a content property&lt;/a&gt; (target user: geeky developer)&lt;/li&gt;&lt;/li&gt;&lt;/li&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;a href=&quot;http://dmytroduk.com/Media/Default/Windows-Live-Writer/Disqus-for-EPiServer_63DF/DropBlockOnPage_2.png&quot;&gt;&lt;img title=&quot;&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;Dropping Disqus comments block on a page&quot; src=&quot;http://dmytroduk.com/Media/Default/Windows-Live-Writer/Disqus-for-EPiServer_63DF/DropBlockOnPage_thumb.png&quot; width=&quot;320&quot; height=&quot;268&quot; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href=&quot;http://dmytroduk.com/Media/Default/Windows-Live-Writer/Disqus-for-EPiServer_63DF/DisqusComments_2.png&quot;&gt;&lt;img title=&quot;&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;Disqus comments on a page&quot; src=&quot;http://dmytroduk.com/Media/Default/Windows-Live-Writer/Disqus-for-EPiServer_63DF/DisqusComments_thumb.png&quot; width=&quot;228&quot; height=&quot;290&quot; /&gt;&lt;/a&gt;&lt;/p&gt; &lt;h2&gt;Configuration UI and Edit mode extensions&lt;/h2&gt; &lt;p&gt;Configuration user interface allows to edit Disqus settings for the current website and provides quick links to moderation tools in Disqus Admin.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;http://dmytroduk.com/Media/Default/Windows-Live-Writer/Disqus-for-EPiServer_63DF/DisqusCommentsSettings_2.png&quot;&gt;&lt;img title=&quot;&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;Disqus comments settings&quot; src=&quot;http://dmytroduk.com/Media/Default/Windows-Live-Writer/Disqus-for-EPiServer_63DF/DisqusCommentsSettings_thumb.png&quot; width=&quot;280&quot; height=&quot;350&quot; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href=&quot;http://dmytroduk.com/Media/Default/Windows-Live-Writer/Disqus-for-EPiServer_63DF/IssueIndication_2.png&quot;&gt;&lt;img title=&quot;&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;Issue indication&quot; src=&quot;http://dmytroduk.com/Media/Default/Windows-Live-Writer/Disqus-for-EPiServer_63DF/IssueIndication_thumb.png&quot; width=&quot;280&quot; height=&quot;343&quot; /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Edit UI extensions help to work with Disqus blocks when editing a content. Warnings are displayed when Disqus configuration is not complete or there are problematic blocks on the current page. These indicators are not rendered in view mode.&lt;/p&gt; &lt;h2&gt;Basic installation scenario&lt;/h2&gt; &lt;ol&gt; &lt;li&gt;Signup on Disqus and choose a shortname for the site  &lt;li&gt;Install Disqus for EPiServer add-ons  &lt;li&gt;Set shortname and enable discussions on website using Disqus configuration UI.  &lt;li&gt;Start adding Disqus comments on pages.&lt;/li&gt;&lt;/li&gt;&lt;/li&gt;&lt;/li&gt;&lt;/ol&gt; &lt;h2&gt;System requirements&lt;/h2&gt; &lt;p&gt;EPiServer 7.x.x CMS, Add-on system (EPiServer.Packaging). EPiServer UI Platform (Shell) is required to install configuration UI and Edit mode extensions.&lt;/p&gt; &lt;p&gt;MVC and WebForms sites are supported. &lt;a href=&quot;http://world.episerver.com/Articles/Items/EPiServer-7---Patch-3/&quot;&gt;EPiServer 7 Patch 3&lt;/a&gt; is required on MVC sites.&lt;/p&gt; &lt;h2&gt;More information&lt;/h2&gt; &lt;p&gt;Please refer documentation on the &lt;a href=&quot;http://dmytroduk.com/projects/disqus-for-episerver&quot;&gt;project page&lt;/a&gt;.&lt;/p&gt; &lt;h2&gt;Source code and feedback&lt;/h2&gt; &lt;p&gt;Source code is &lt;a href=&quot;https://github.com/dmytroduk/Duk.EPiServer.Disqus&quot;&gt;available on GitHub&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;Feel free to report bugs, ask questions and request features &lt;a href=&quot;https://github.com/dmytroduk/Duk.EPiServer.Disqus/issues&quot;&gt;on GitHub&lt;/a&gt; or here in comments. Your feedback is highly appreciated.&lt;/p&gt;</description>
            <guid>http://dmytroduk.com/techblog/disqus-for-episerver</guid>
            <pubDate>Tue, 18 Jun 2013 10:59:06 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>Slides from the London EPiServer Meetup Summer 2013</title>
            <link>http://www.markeverard.com/?p=2472</link>
            <description>Below are the three presentations we had from the London EPiServer Meetup Summer 2013 hosted at Syzygy. Thanks to all that came and especially to Youtse @EPiServer for organising refreshments, and to Fabio and Syzygy for being generous hosts and of course to Phil and Mark who presented. Phil Pursglove gave us a glimpse into [...]</description>
            <guid>http://www.markeverard.com/?p=2472</guid>
            <pubDate>Fri, 14 Jun 2013 13:52:23 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>Cloud Talk : A walk through the clouds</title>
            <link>http://tech-rash.blogspot.com/2013/06/cloud-talk-walk-through-clouds.html</link>
            <description>Thanks &lt;a href=&quot;https://twitter.com/syzygyuk&quot; target=&quot;_blank&quot;&gt;@syzygyuk&lt;/a&gt; for hosting the &lt;a href=&quot;http://www.meetup.com/EPiServer-London/&quot; target=&quot;_blank&quot;&gt;EPiServer meetup.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I&#39;ve uploaded my slides from my talk on the Cloud to the Cloud:&lt;br /&gt;&lt;br /&gt;&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;356&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; mozallowfullscreen=&quot;&quot; scrolling=&quot;no&quot; src=&quot;http://www.slideshare.net/slideshow/embed_code/22965607&quot; style=&quot;border-width: 1px 1px 0; border: 1px solid #CCC; margin-bottom: 5px;&quot; webkitallowfullscreen=&quot;&quot; width=&quot;427&quot;&gt; &lt;/iframe&gt; &lt;br /&gt;&lt;div style=&quot;margin-bottom: 5px;&quot;&gt;&lt;strong&gt; &lt;a href=&quot;http://www.slideshare.net/markrodseth/the-cloud-and-microsoft-windows-azure-a-walk-through-the-clouds&quot; target=&quot;_blank&quot; title=&quot;The Cloud and Microsoft Windows Azure - A Walk through the clouds&quot;&gt;The Cloud and Microsoft Windows Azure - A Walk through the clouds&lt;/a&gt; &lt;/strong&gt; from &lt;strong&gt;&lt;a href=&quot;http://www.slideshare.net/markrodseth&quot; target=&quot;_blank&quot;&gt;Mark Rodseth&lt;/a&gt;&lt;/strong&gt; &lt;/div&gt;</description>
            <guid>http://tech-rash.blogspot.com/2013/06/cloud-talk-walk-through-clouds.html</guid>
            <pubDate>Fri, 14 Jun 2013 13:49:00 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>Credit Card Number Storage and PCI</title>
            <link>http://world.episerver.com/Blogs/Shannon-Gray/Dates/2013/6/Credit-Card-Number-Storage-and-PCI/</link>
            <description>  &lt;p&gt;&lt;em&gt;&lt;font size=&quot;1&quot;&gt;The opinions, estimates and projections in this article accurately constitute the current judgment and culmination of views of industry practices at the date of the article. They do not form any form of warranty, assurance or advice and do not necessarily reflect the opinions of EPiServer AB and are subject to change without notice.&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;[This is an edited version of the original]&lt;/em&gt;&amp;#160; &lt;br /&gt;Storing credit card details in a database is obviously a very sensitive issue because of the threat of credit card data theft. So the question naturally arises - what should one do with credit card information in your implementation? All too often, the issue of credit card security has been overlooked on a rushed site and its later discovered that credit card information is accidentally stored unencrypted in the commerce database. Credit card data compromise is a big liability (in the form of penalties and bad press) that should be addressed early on in the design phase of developing a commerce site - regardless of the framework used to build an ECommerce site. EPiServer Commerce *enables* you to be PCI-compliant... but it doesn&#39;t ensure it without action and planning on the part of those designing and building the site. This blog is to introduce PCI and cover one way to reduce your PCI-compliance exposure - namely how to ensure that credit card information is never stored in your EPiServer Commerce system. &lt;/p&gt;      &lt;p&gt;&lt;strong&gt;What is PCI?&lt;/strong&gt;     &lt;br /&gt;Because of the security issues surrounding credit cards, a standard called Payment Card Industry Data Security Standard, commonly referred to as PCI (or PCI DSS), was developed by the major credit card processors through the PCI Security Standards Council (&lt;a href=&quot;http://www.pcisecuritystandards.org&quot;&gt;www.pcisecuritystandards.org&lt;/a&gt;). The PCI standard requires a number of security measures be in place for any business that handles credit card information to ensure the data is well protected from theft. PCI compliance is a requirement in using payment providers to process credit card payments. &lt;/p&gt;    &lt;p&gt;The PCI standard consists of 12 requirements that pertain to the processing, storing, and transmission of credit card information. The requirements cover how credit card information should to be handled including database encryption, encrypting data transmission (SSL), system access management practices, system modification logging, firewall configuration, anti-virus software, and physical access to hardware containing credit card information. There are also different levels of monitoring and reporting required based on the number of credit card transactions that a business handles annually. The PCI standard isn&#39;t limited to web site credit card processing - it relates to all credit card handling and processing. That&#39;s a really high-level overview of PCI and there are a lot of great sites and articles that provide much great insight and direction for how to be PCI compliant (see below for several of those links).&lt;/p&gt;  &lt;p&gt;&amp;#160; &lt;br /&gt;Note that, in addition to PCI compliance, there are also often state and national laws regarding reporting credit card data compromise depending on where consumers who purchase items/services from your site live. Its also important to be be aware of and, of course, comply with these requirements. The European Data Protection Act and personal data theft reporting laws in almost all US states are some examples of this.     &lt;br /&gt;&lt;/p&gt;          &lt;p&gt;&lt;strong&gt;Is EPiServer Commerce PCI-Compliant?&lt;/strong&gt;     &lt;br /&gt;As stated above, EPiServer Commerce enables you to be PCI-compliant (&lt;a href=&quot;http://www.episerver.com/Commerce/Security/)&quot;&gt;http://www.episerver.com/Commerce/Security/)&lt;/a&gt;. However, no software comes with hardware access restriction policies or firewall configuration or most of what is in the PCI standard. PCI compliance is really a more holistic view of how your business practices can ensure credit card security, rather than simply whether your deployed site and database meets the standard. Its safe to say that storing credit card information unencrypted in your Commerce database is not PCI-compliant. &lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;&lt;strong&gt;How credit card data should be handled in EPiServer Commerce sites&lt;/strong&gt;     &lt;br /&gt;In most cases, credit card information shouldn&#39;t be stored in the database at any time. Storing this information is not only a liability for security reasons, but it results in more compliance actions that need to be taken to be PCI-compliant. Credit card information is stored by the credit card provider you integrate with (Paypal, DataCash, DIBS, etc), which are required to be PCI-compliant. There are ways that these providers allow you to access those cards for processing later in certain circumstances (more on this later). Simply using a third-party credit card processing company is not sufficient to ensure full PCI-compliance by itself - but it reduces the number of measures you&#39;ll need to implement to be PCI compliant.&lt;/p&gt;      &lt;p&gt;&amp;#160; &lt;br /&gt;&lt;strong&gt;The Technical Stuff&lt;/strong&gt;     &lt;br /&gt;First a little background on how credit card information is processed in EPiServer Commerce…Some basics on this topic include:     &lt;br /&gt;Order System documentation:     &lt;br /&gt;&lt;a href=&quot;http://sdk.episerver.com/commerce/1.1.2/Content/Developers%20Guide/Order%20System/Order%20System.htm&quot;&gt;http://sdk.episerver.com/commerce/1.1.2/Content/Developers%20Guide/Order%20System/Order%20System.htm&lt;/a&gt;     &lt;br /&gt;Aspects of checkout in EPiServer Commerce:     &lt;br /&gt;&lt;a href=&quot;http://sdk.episerver.com/commerce/1.1.2/Content/Developers%20Guide/Order%20System/devOrderSystem/Checkout%20Process/Checkout%20Process.htm&quot;&gt;http://sdk.episerver.com/commerce/1.1.2/Content/Developers%20Guide/Order%20System/devOrderSystem/Checkout%20Process/Checkout%20Process.htm&lt;/a&gt;     &lt;br /&gt;Order system explanation by Roger Cevung:     &lt;br /&gt;&lt;a href=&quot;http://world.episerver.com/Articles/Items/Fundamental-Order-System-Classes-in-EPiServer-Commerce/&quot;&gt;http://world.episerver.com/Articles/Items/Fundamental-Order-System-Classes-in-EPiServer-Commerce/&lt;/a&gt;     &lt;br /&gt;&lt;/p&gt;    &lt;p&gt;Fundamentally, the most important task in preventing credit card data from being saved to the database is to clear out the CreditCardPayment properties containing sensitive data after processing the payments and prior to saving the cart. If you use the EPiServer Commerce payment provider model, payment processing occurs when the CartCheckout workflow is executed. At no time during the workflow is data saved to the database (unless a custom activity is added in an implementation which does this, which is counter to the design of the workflow). The CartCheckout workflow has activities in it to process order payment with the associated payment provider, update catalog item inventory, and update promotion usage properties. After the workflow is run, the sensitive data must be set to innocuous values. Only then should the cart be saved/updated in the database.    &lt;br /&gt;&lt;/p&gt;    &lt;p&gt;Here&#39;s a code example that demonstrates this:    &lt;br /&gt;&lt;/p&gt;    &lt;p&gt;&amp;#160; //put credit card details in the cart    &lt;br /&gt;&amp;#160; CreditCardPayment pymt = new CreditCardPayment();     &lt;br /&gt;&amp;#160; pymt.CardType = ddlCardType.SelectedValue;     &lt;br /&gt;&amp;#160; pymt.CreditCardNumber = txtCardNumber.Text;     &lt;br /&gt;&amp;#160; //... other details added     &lt;br /&gt;&amp;#160; ch.Cart.OrderForms[0].Payments.Add(pymt);     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160; //It&#39;s vital that a try/catch wrapper be put around this statement to    &lt;br /&gt;&amp;#160; //ensure that the credit card details are *always* cleared     &lt;br /&gt;&amp;#160; try     &lt;br /&gt;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; //now the payments can be processed and the order completed     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; ch.RunWorkflow(OrderGroupWorkflowManager.CartCheckOutWorkflowName);     &lt;br /&gt;&amp;#160; }     &lt;br /&gt;&amp;#160; catch (Exception ex)     &lt;br /&gt;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; //whatever other handling of errors you need to add...&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; //if another exeception is going to be thrown in this &#39;catch&#39; to exit&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; //this method, call the ClearCCDetails method just to be sure the credit&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; //card details are removed     &lt;br /&gt;&amp;#160; } &lt;/p&gt;                    &lt;p&gt;&amp;#160; //This method removes sensitive credit card data    &lt;br /&gt;&amp;#160; ClearCCDetails(ch.Cart);     &lt;br /&gt;&lt;/p&gt;    &lt;p&gt;&amp;#160; //now you can finally save the order to the database    &lt;br /&gt;&amp;#160; ch.Cart.AcceptChanges();     &lt;br /&gt;} &lt;/p&gt;    &lt;p&gt;   &lt;br /&gt;private void ClearCCDetails(Cart cart)     &lt;br /&gt;{     &lt;br /&gt;&amp;#160; //clear out the credit card details for all credit card payments in the order     &lt;br /&gt;&amp;#160; foreach (Payment payment in cart.OrderForms[0].Payments)     &lt;br /&gt;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; CreditCardPayment cc = payment as CreditCardPayment;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; if (cc != null)     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; cc.CreditCardNumber = string.Empty;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; cc.CardType = string.Empty;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; cc.CreditCardSecurityCode = string.Empty;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; cc.CustomerName = string.Empty;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; cc.ExpirationMonth = 0;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; cc.ExpirationYear = 0;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&gt;&amp;#160; }     &lt;br /&gt;} &lt;/p&gt;    &lt;p&gt;   &lt;br /&gt;Deleting this information from the order naturally raises a few concerns :     &lt;br /&gt;&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;But what about showing the last 4 digits on the &amp;quot;thank you&amp;quot; page?      &lt;br /&gt;&lt;/strong&gt;If you need to do this, one way to handle this is to put that information in the session before deleting it. After its retrieved in the thank you page, make sure to empty the session variable. For example:     &lt;br /&gt;...     &lt;br /&gt;pymt.CreditCardNumber = txtCardNumber.Text;     &lt;br /&gt;ch.Cart.OrderForms[0].Payments.Add(pymt);     &lt;br /&gt;string lastFour = pymt.CreditCardNumber;     &lt;br /&gt;lastFour = string.Format(&amp;quot;{0}{1}&amp;quot;, (string.Empty).PadLeft(lastFour.Length - 4, &#39;*&#39;),     &lt;br /&gt;&amp;#160; lastFour.Substring(lastFour.Length - 4));     &lt;br /&gt;Session[&amp;quot;LastFour&amp;quot;] = lastFour; &lt;/p&gt;    &lt;p&gt;   &lt;br /&gt;&lt;strong&gt;How about getting access to that credit card information later for charging the card (when only authorization is done during checkout)?      &lt;br /&gt;&lt;/strong&gt;This is the purpose of the TransactionId response property associated with the payment provider transaction. The built-in providers (e.g. Klarna, Authorize.NET, etc) already accept that TransactionId property from successful credit card transactions and set it in the CreditCardPayment.TransactionId property. This value shouldn&#39;t be blanked out before saving the cart to the database - it should be retained (and is not considered sensitive credit card information). This is the reference id that allows you to do a capture on a credit card after an authorization. This TransactionId field maps to the credit card details stored by the payment provider. It&#39;s not a given that this is supported by all payment providers (and in this fashion) so check the provider&#39;s documentation.     &lt;br /&gt;To execute the charge aka capture of the credit card at a later time, the provider can be called, passing in the transactionid rather than the other credit card details with a transaction type of capture. &lt;/p&gt;    &lt;p&gt;   &lt;br /&gt;&lt;strong&gt;What about subscriptions?&lt;/strong&gt;     &lt;br /&gt;How this is handled depends on the payment handler. Here are the two ways I&#39;ve seen this handled:     &lt;br /&gt;* Some payment providers allow you to setup a recurring payment order through the API; once setup, the payment provider automatically performs the regular billing per the schedule specified. Of course, you can alter or cancel the recurring payment; however the recurring payments are then automatically managed by the payment provider. This option is great if you have pretty straight-forward monthly rates (including free trial periods) and want all of the charging done independently from your system. These offerings can include rich administrative interfaces and features to manage those subscriptions. Some examples of this are Paypal (&lt;a href=&quot;https://www.x.com/developers/paypal/documentation-tools/express-checkout/integration-guide/ECGettingStarted)&quot;&gt;https://www.x.com/developers/paypal/documentation-tools/express-checkout/integration-guide/ECGettingStarted)&lt;/a&gt;     &lt;br /&gt;(which also offers the other option below) and WorldPay (&lt;a href=&quot;http://www.worldpay.com/support/kb/bg/pdf/rpfp.pdf)&quot;&gt;http://www.worldpay.com/support/kb/bg/pdf/rpfp.pdf)&lt;/a&gt; &lt;/p&gt;    &lt;p&gt;   &lt;br /&gt;* Other payment providers allow you to store an id representing the credit card (rather than a TransactionId representing a transaction) and periodically charge that credit card from your own system. This may be better if you want to more tightly manage the billing and if your monthly charges vary. Some examples of this are DIBS (&lt;a href=&quot;http://tech.dibspayment.com/dibs_api/flexwin/payment_functions/ticket_authcgi/)&quot;&gt;http://tech.dibspayment.com/dibs_api/flexwin/payment_functions/ticket_authcgi/)&lt;/a&gt;, Paypal (&lt;a href=&quot;https://www.x.com/developers/paypal/documentation-tools/paypal-payments-pro/integration-guide/WPWebsitePaymentsPro)&quot;&gt;https://www.x.com/developers/paypal/documentation-tools/paypal-payments-pro/integration-guide/WPWebsitePaymentsPro)&lt;/a&gt;, and Authorize.NET (&lt;a href=&quot;http://developer.authorize.net/api/arb/)&quot;&gt;http://developer.authorize.net/api/arb/)&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;&lt;strong&gt;What if I want to store and display the last four digits of a user’s credit cards so customers can select them for reuse during checkout?      &lt;br /&gt;&lt;/strong&gt;There is considerable discussion about whether the PCI standard allows the last four digits of the credit card number (also known as the Primary Account Number or PAN) to be stored in the database without encryption. This is referred to as protecting the PAN through truncation. This is commonly used to display the stored credit card options to a customer from previous purchases. Also note that some payment providers return a token (Cybersource and Braintree are two examples) after processing a credit card transaction representing the credit card (see the previous topic) which contains the last four digits of the credit card. So you could use these tokens to render the last four digits of the users’ credit card PAN. However, there are implications for storing the last four digits of the PAN and you should consult the PCI guides, your payment processor agreement, and your PCI experts regarding this topic. &lt;/p&gt;      &lt;p&gt;A few other tips:    &lt;br /&gt;* When testing a storefront, you should not use live credit card data but instead use test credit cards provided by your payment provider.     &lt;br /&gt;* Don&#39;t log credit card details (even in testing)&lt;/p&gt;      &lt;p&gt;And finally, here are some resources related to this topic:    &lt;br /&gt;EPiServer links     &lt;br /&gt;Use SSL for data transmission in checkout     &lt;br /&gt;&lt;a href=&quot;http://world.episerver.com/Documentation/Items/Tech-Notes/EPiServer-CMS-6/EPiServer-CMS-60/Securing-Edit-and-Admin/&quot;&gt;http://world.episerver.com/Documentation/Items/Tech-Notes/EPiServer-CMS-6/EPiServer-CMS-60/Securing-Edit-and-Admin/&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;&lt;a href=&quot;http://world.episerver.com/Documentation/Items/Tech-Notes/EPiServer-CMS-6/EPiServer-CMS-60/Protecting-Your-Site-From-Session-Hijacking/&quot;&gt;http://world.episerver.com/Documentation/Items/Tech-Notes/EPiServer-CMS-6/EPiServer-CMS-60/Protecting-Your-Site-From-Session-Hijacking/&lt;/a&gt;     &lt;br /&gt;&lt;/p&gt;    &lt;p&gt;PCI Documents    &lt;br /&gt;&lt;a href=&quot;https://www.pcisecuritystandards.org/security_standards/documents.php&quot;&gt;https://www.pcisecuritystandards.org/security_standards/documents.php&lt;/a&gt;     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;PCI Quick Reference    &lt;br /&gt;&lt;a href=&quot;https://www.pcisecuritystandards.org/documents/PCI%20SSC%20Quick%20Reference%20Guide.pdf&quot;&gt;https://www.pcisecuritystandards.org/documents/PCI%20SSC%20Quick%20Reference%20Guide.pdf&lt;/a&gt;&lt;/p&gt;            &lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Remember that this blog doesn&#39;t constitute a warranty, assurance or advice.&lt;/em&gt;&lt;/p&gt;</description>
            <guid>http://world.episerver.com/Blogs/Shannon-Gray/Dates/2013/6/Credit-Card-Number-Storage-and-PCI/</guid>
            <pubDate>Wed, 12 Jun 2013 20:19:54 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>Sneak Peek at the EPiServer 7.5 Roadmap</title>
            <link>http://www.epinova.no/blog/arild-henrichsen/dates/2013/6/sneak-peek-at-the-episerver-75-roadmap/</link>
            <description>Like EPiServer 7.0 marked the first big UI and platform change, the upcoming 7.5 release will mark the next big leap forward. </description>
            <guid>http://www.epinova.no/blog/arild-henrichsen/dates/2013/6/sneak-peek-at-the-episerver-75-roadmap/</guid>
            <pubDate>Wed, 12 Jun 2013 13:43:50 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>Using a custom format in ImageVault to specify compression quality in jpg images</title>
            <link>http://dhvik.blogspot.com/2013/06/using-custom-format-in-imagevault-to.html</link>
            <description>If you want to request an converted image in ImageVault and also specify the compression quality for a jpeg image you cannot use the LINQ syntax in the C# API of ImageVault. The LINQ engine only wraps some functions in the API and compression quality is not yet added to the mix.&lt;br /&gt;To do this we need to use another approach and access the service methods directly (like the LINQ parser does internally).&lt;br /&gt;&lt;br /&gt;First we need a client.&lt;br /&gt;&lt;pre class=&quot;csharp:nocontrols:nogutter&quot; name=&quot;code&quot;&gt;var client = ClientFactory.GetSdkClient();&lt;br /&gt;&lt;/pre&gt;Then we need to create a format that has the correct parameters.&lt;br /&gt;&lt;pre class=&quot;csharp:nocontrols:nogutter&quot; name=&quot;code&quot;&gt;//Compression quality can be set on ImageFormats where 100 is maximum quality&lt;br /&gt;var format = new ImageFormat {&lt;br /&gt;  CompressionQuality = 80,&lt;br /&gt;  MediaFormatOutputType = MediaFormatOutputTypes.Jpeg;&lt;br /&gt;};&lt;br /&gt;format.Effects.Add(new ResizeEffect(200, 200));&lt;br /&gt;&lt;/pre&gt;Here we created an ImageFormat and specifies the Compression quality to 80 and specify that we want to have a jpeg output image. We can then add other effects to it, like in this case, a Resize effect.&lt;br /&gt;&lt;br /&gt;Next step is to create a query that will be used to find the media we are looking for.&lt;br /&gt;&lt;pre class=&quot;csharp:nocontrols:nogutter&quot; name=&quot;code&quot;&gt;var q = new MediaItemQuery {&lt;br /&gt;  //we filter out the items we want to retrieve (in this case media with id 485)&lt;br /&gt;  Filter = { Id = new List&amp;lt;int&amp;gt; { 485 } },&lt;br /&gt;  //and supply the format that we want to populate&lt;br /&gt;  Populate = {&lt;br /&gt;    MediaFormats = { format },&lt;br /&gt;    PublishIdentifier = client.PublishIdentifier&lt;br /&gt;  }&lt;br /&gt;};&lt;/pre&gt;This query will filter out image with id 485 and populate the found MediaItem with the requested formats (in this case the one that we defined above).&lt;br /&gt;&lt;i&gt;Note that we have not created the format, this will be done automatically (or if a matching format is found, it will be reused). These format are called system formats and is not visible in the UI.&lt;/i&gt;&lt;br /&gt;We also specify a publish identifier that will generate the urls to the converted media as public urls (no authentication).&lt;br /&gt;&lt;br /&gt;This query is then passed to the service method.&lt;br /&gt;&lt;pre class=&quot;csharp:nocontrols:nogutter&quot; name=&quot;code&quot;&gt;//first create the media service channel&lt;br /&gt;var mediaService = client.CreateChannel&amp;lt;IMediaService&amp;gt;();&lt;br /&gt;//we then pass the query object to the find method&lt;br /&gt;var mediaItem = mediaService.Find(q).Single();&lt;br /&gt;//and since we only requested one Format, the converted image url will reside &lt;br /&gt;//in the first MediaConversion of the item.&lt;br /&gt;var url = mediaItem.MediaConversions[0].Url;&lt;/pre&gt;When all is done we have the url to the converted (and published) jpeg image.&lt;br /&gt;&lt;i&gt;Note: the client.PublishIdentifier will be set if you are in an EPiServer site or if you configure it in the imagevault.client.config. You can also set this manually.&lt;/i&gt;</description>
            <guid>http://dhvik.blogspot.com/2013/06/using-custom-format-in-imagevault-to.html</guid>
            <pubDate>Tue, 11 Jun 2013 23:22:00 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>Slight update on the Tool for Page Type Classes from Page Types in EPiServer 7 CMS</title>
            <link>http://talk.alfnilsson.se/?p=209</link>
            <description>I made a small mistake on the Page Type Class Tool for EPiServer 7 CMS. This was on the SetDefaultValues method where the&#160;ChildOrderRule was set to&#160;FilterSortOrder.None. If a Page have a&#160;ChildOrderRule&#160;set to&#160;None, EPiServer won&amp;#8217;t be able to find the Children of that Page since the Stored Procedure does not know how to handle that ChildOrderRule. [&amp;#8230;]&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://stats.wordpress.com/b.gif?host=talk.alfnilsson.se&amp;#038;blog=18285343&amp;#038;post=209&amp;#038;subd=toders&amp;#038;ref=&amp;#038;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</description>
            <guid>http://talk.alfnilsson.se/?p=209</guid>
            <pubDate>Fri, 07 Jun 2013 02:57:57 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>Did you know of the UnifiedFileSummarySaved?</title>
            <link>http://world.episerver.com/Blogs/Mari-Jorgensen/Dates/2013/6/Did-you-know-of-the-UnifiedFileSummarySaved/</link>
            <description>&lt;p&gt;Recently I had a customer that wanted to list file attachments on their site. The idea was to use Find and use custom file summary properties as base for the list filter values.&lt;/p&gt;  &lt;p&gt;One of the key points was that if “Brand” was not set, the file should not be listed at all on the site. Basically, if file summary was updated I needed to re-index the file.&lt;/p&gt;  &lt;p&gt;Those of you who have been working with EPiServer for some time know that the EPiServer Datafactory exposes several events for pages and files. In EPiServer 7 we have got a new event which fires when the file summary is changed. Here is how I made use of it:&lt;/p&gt;  &lt;p&gt;Creating a separate VPP with a custom file summary is easy enough - add a new VPP to EPiServerFramework file:&lt;/p&gt;  &lt;pre class=&quot;csharpcode&quot;&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;showInFileManager&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&amp;quot;true&amp;quot;&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;virtualName&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&amp;quot;Manuals&amp;quot;&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;virtualPath&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&amp;quot;~/Manuals/&amp;quot;&lt;/span&gt;
      &lt;span class=&quot;attr&quot;&gt;bypassAccessCheck&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&amp;quot;false&amp;quot;&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;maxVersions&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&amp;quot;5&amp;quot;&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;useRouting&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&amp;quot;true&amp;quot;&lt;/span&gt;
      &lt;span class=&quot;attr&quot;&gt;customFileSummary&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&amp;quot;~/CustomSummary.config&amp;quot;&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&amp;quot;SiteManuals&amp;quot;&lt;/span&gt;
      &lt;span class=&quot;attr&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&amp;quot;EPiServer.Web.Hosting.VirtualPathVersioningProvider, EPiServer&amp;quot;&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;/&amp;gt;&lt;/span&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 then added the CustomSummary.config file, which resulted in the following file summary edit view: 
  &lt;br /&gt;
  &lt;br /&gt;&lt;a href=&quot;/Globals/xmlrpc/19321/2013/06/05/filesummary_2.png&quot;&gt;&lt;img title=&quot;filesummary&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;filesummary&quot; src=&quot;/Globals/xmlrpc/19321/2013/06/05/filesummary_thumb.png&quot; width=&quot;523&quot; height=&quot;420&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Next step was hooking up to the event, and the preferred way is to use a InitializableModule.&lt;/p&gt;
&lt;pre class=&quot;csharpcode&quot;&gt;[InitializableModule]
    [ModuleDependency(&lt;span class=&quot;kwrd&quot;&gt;typeof&lt;/span&gt;(EPiServer.Web.InitializationModule))]
    &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;class&lt;/span&gt; FileEventHookUp : IInitializableModule
    {
        &lt;span class=&quot;kwrd&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;bool&lt;/span&gt; _eventsAttached = &lt;span class=&quot;kwrd&quot;&gt;false&lt;/span&gt;;
        &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;void&lt;/span&gt; Initialize(InitializationEngine context)
        {
            &lt;span class=&quot;kwrd&quot;&gt;if&lt;/span&gt; (!_eventsAttached)
            {
                &lt;span class=&quot;rem&quot;&gt;// Attach event handler to event that fires when file summary changes&lt;/span&gt;
                UnifiedFile.UnifiedFileSummarySaved += FileSummarySaved;
                _eventsAttached = &lt;span class=&quot;kwrd&quot;&gt;true&lt;/span&gt;;
            }
        }
        &lt;span class=&quot;kwrd&quot;&gt;void&lt;/span&gt; FileSummarySaved(UnifiedFile sender, UnifiedVirtualPathEventArgs e)
        {
            var fields = sender.Summary.Dictionary;
            &lt;span class=&quot;kwrd&quot;&gt;if&lt;/span&gt; (fields.Contains(&lt;span class=&quot;str&quot;&gt;&amp;quot;Brand&amp;quot;&lt;/span&gt;))
            {
                &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; brandName = fields[&lt;span class=&quot;str&quot;&gt;&amp;quot;Brand&amp;quot;&lt;/span&gt;] &lt;span class=&quot;kwrd&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt;;
                &lt;span class=&quot;kwrd&quot;&gt;if&lt;/span&gt; (!&lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt;.IsNullOrEmpty(brandName))
                {
                    var document = &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; Document()
                        {
                            Name = fields[&lt;span class=&quot;str&quot;&gt;&amp;quot;Name&amp;quot;&lt;/span&gt;] &lt;span class=&quot;kwrd&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt;,
                            Brand = brandName,
                            Description = fields[&lt;span class=&quot;str&quot;&gt;&amp;quot;Description&amp;quot;&lt;/span&gt;] &lt;span class=&quot;kwrd&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt;,
                            Type = fields[&lt;span class=&quot;str&quot;&gt;&amp;quot;Type&amp;quot;&lt;/span&gt;] &lt;span class=&quot;kwrd&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt;,
                            PermanentLink = sender.PermanentLinkVirtualPath,
                            Changed = sender.Changed
                        };
                    SearchClient.Instance.Index(document);
                }
            }
        }
        &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;void&lt;/span&gt; Uninitialize(InitializationEngine context)
        {
            &lt;span class=&quot;rem&quot;&gt;// Detach event handlers&lt;/span&gt;
            UnifiedFile.UnifiedFileSummarySaved -= FileSummarySaved;
        }
        &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;void&lt;/span&gt; Preload(&lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt;[] parameters)
        {
            &lt;span class=&quot;kwrd&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; NotImplementedException();
        }
    }&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;The Document class is a simple DTO class used for storing the data in Find. &lt;/p&gt;
&lt;p&gt;As a side note: Those of you who have seen a preview of what is coming in the next release of EPiServer know that handling files will become much easier. &lt;img class=&quot;wlEmoticon wlEmoticon-smile&quot; style=&quot;border-top-style: none; border-left-style: none; border-bottom-style: none; border-right-style: none&quot; alt=&quot;Smilefjes&quot; src=&quot;/Globals/xmlrpc/19321/2013/06/05/wlEmoticon-smile_2.png&quot; /&gt;&lt;/p&gt;</description>
            <guid>http://world.episerver.com/Blogs/Mari-Jorgensen/Dates/2013/6/Did-you-know-of-the-UnifiedFileSummarySaved/</guid>
            <pubDate>Wed, 05 Jun 2013 21:55:20 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>Modifying AccessControlLists on DataFactory events</title>
            <link>http://www.epinova.no/blog/arve-systad/dates/2013/6/modifying-accesscontrollists-on-datafactory-events/</link>
            <description>Modifying a page&#39;s ACL on one of the DataFactory events sounds like an easy task at first, but there is one hole to get stuck in.</description>
            <guid>http://www.epinova.no/blog/arve-systad/dates/2013/6/modifying-accesscontrollists-on-datafactory-events/</guid>
            <pubDate>Wed, 05 Jun 2013 17:53:10 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>Find Pages containing a certain Content in a ContentArea</title>
            <link>http://talk.alfnilsson.se/?p=200</link>
            <description>While browing in the tblContentProperty I stumbled upon how a ContentArea is saved in the database. It&amp;#8217;s quite similar to how Dynamic Content is serialized in a XhtmlString: &amp;#60;div data-classid=&amp;#8221;36f4349b-8093-492b-b616-05d8964e4c89&amp;#8243; data-contentguid=&amp;#8221;7cef1c69-b345-493c-a60e-ce011fe42c31&amp;#8243; data-contentlink=&amp;#8221;35&amp;#8243; data-contentname=&amp;#8221;Content Name&amp;#8221;&amp;#62;{}&amp;#60;/div&amp;#62;&amp;#60;div data-classid=&amp;#8221;36f4349b-8093-492b-b616-05d8964e4c89&amp;#8243; data-contentguid=&amp;#8221;216210e0-f687-4f7a-9bc9-c2a51badab1a&amp;#8221; data-contentlink=&amp;#8221;701&amp;#8243; data-contentname=&amp;#8221;Another Content Name&amp;#8221;&amp;#62;{}&amp;#60;/div&amp;#62; In my example I have a Page Type called EditorPage presenting all persons in the [&amp;#8230;]&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://stats.wordpress.com/b.gif?host=talk.alfnilsson.se&amp;#038;blog=18285343&amp;#038;post=200&amp;#038;subd=toders&amp;#038;ref=&amp;#038;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</description>
            <guid>http://talk.alfnilsson.se/?p=200</guid>
            <pubDate>Wed, 05 Jun 2013 16:24:51 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>Hidden template functionality in the MVC implementation</title>
            <link>http://world.episerver.com/Blogs/Jonas-Bergqvist/Dates/2013/6/Hidden-template-functionality-in-the-MVC-implementation/</link>
            <description>&lt;p&gt;There is an alternative way of rendering content when using MVC. By implementing IRenderTemplate&amp;lt;T&amp;gt; and IView, the class will be registered as a render template for type (T).&lt;/p&gt;    &lt;p&gt;Short before the RTM release of EPiServer 7, we found out that a block controller is very slow, and should be used carefully. We have, because of this, recommended partner developers to only use a view without a controller for blocks on their sites. The sad part of this is that it’s not possible to create view models of the blocks.&lt;/p&gt;    &lt;p&gt;   &lt;p&gt;When you have patch 3 on your site, you can implement IView on a class, which automatically will register it as a render template, if the generic marker interface “IRenderTemplate” gets implemented by the same class. This makes it possible to create view models and use those instead of the actual “BlockData”. Because of a bug, the “IView” rendering template hasn’t worked before patch 3, so make sure to download patch 3 to your site. &lt;/p&gt;     &lt;/p&gt;  &lt;p&gt;Ok, so how does the “IVew” interface look like now again. Well, you get two parameters, “ViewContext” and a “TextWriter”. The view context should be used to render data on the text writer. Hm, not much help from EPiServer here it looks like.&lt;/p&gt;    &lt;p&gt;I have created a base class, which looks pretty similar to a controller, that can be used. The class looks like this:&lt;/p&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;pre class=&quot;code&quot;&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;using &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;EPiServer.Core;
&lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;using &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;EPiServer.Web;
&lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;using &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;EPiServer.Web.Routing;
&lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;using &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;System;
&lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;using &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;System.Globalization;
&lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;using &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;System.IO;
&lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;using &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;System.Web.Mvc;
&lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;namespace &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;EPiServer.Samples.MvcTemplates.Controllers
{
    &lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;/// &amp;lt;summary&amp;gt;
    /// &lt;/span&gt;&lt;span style=&quot;background: white; color: green&quot;&gt;Base class for render template of type &lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;&amp;lt;see cref=&amp;quot;IView&amp;quot;/&amp;gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: green&quot;&gt;.
    &lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;/// &amp;lt;/summary&amp;gt;
    /// &amp;lt;typeparam name=&amp;quot;T&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: green&quot;&gt;The &lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;&amp;lt;see cref=&amp;quot;IContentData&amp;quot;/&amp;gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: green&quot;&gt;this renderer should support.&lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;&amp;lt;/typeparam&amp;gt;
    &lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;public abstract class &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af&quot;&gt;ViewRenderTemplate&lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;&amp;lt;T&amp;gt; : &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af&quot;&gt;IView&lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af&quot;&gt;IRenderTemplate&lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;&amp;lt;T&amp;gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;where &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;T : &lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af&quot;&gt;IContentData
    &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;{
        &lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;/// &amp;lt;summary&amp;gt;
        /// &lt;/span&gt;&lt;span style=&quot;background: white; color: green&quot;&gt;Gets the default view name. &amp;quot;index&amp;quot; will be used when not overridden.
        &lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;/// &amp;lt;/summary&amp;gt;
        &lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;protected virtual string &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;DefaultViewName
        {
            &lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;get &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;{ &lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;return &lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515&quot;&gt;&amp;quot;index&amp;quot;&lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;; }
        }
        &lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;/// &amp;lt;summary&amp;gt;
        /// &lt;/span&gt;&lt;span style=&quot;background: white; color: green&quot;&gt;Gets the current view context
        &lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;/// &amp;lt;/summary&amp;gt;
        &lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;protected &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af&quot;&gt;ViewContext &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;ViewContext { &lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;private set&lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;; }
        &lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;/// &amp;lt;summary&amp;gt;
        /// &lt;/span&gt;&lt;span style=&quot;background: white; color: green&quot;&gt;Gets the current writer
        &lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;/// &amp;lt;/summary&amp;gt;
        &lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;protected &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af&quot;&gt;TextWriter &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;Writer { &lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;private set&lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;; }
        &lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;/// &amp;lt;summary&amp;gt;
        /// &lt;/span&gt;&lt;span style=&quot;background: white; color: green&quot;&gt;Called when the template will be executed
        &lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;/// &amp;lt;/summary&amp;gt;
        /// &amp;lt;param name=&amp;quot;viewContext&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: green&quot;&gt;The current view context&lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;&amp;lt;/param&amp;gt;
        /// &amp;lt;param name=&amp;quot;writer&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: green&quot;&gt;The current writer&lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;&amp;lt;/param&amp;gt;
        &lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;public virtual void &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;Render(&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af&quot;&gt;ViewContext &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;viewContext, &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af&quot;&gt;TextWriter &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;writer)
        {
            ViewContext = viewContext;
            Writer = writer;
            &lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;var &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;currentContent = ViewContext.RequestContext.GetRoutedData&amp;lt;T&amp;gt;();
            &lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;if &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;(currentContent == &lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;default&lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;(T))
            {
                currentContent = viewContext.RouteData.Values[&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515&quot;&gt;&amp;quot;currentContent&amp;quot;&lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;] &lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;as &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;T;
            }
            ViewContext.RequestContext.SetController(currentContent.GetOriginalType().Name);
            Render(currentContent);
        }
        &lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;/// &amp;lt;summary&amp;gt;
        /// &lt;/span&gt;&lt;span style=&quot;background: white; color: green&quot;&gt;Called when the template will be executed
        &lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;/// &amp;lt;/summary&amp;gt;
        /// &amp;lt;param name=&amp;quot;currentContent&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: green&quot;&gt;The current &lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;&amp;lt;see cref=&amp;quot;IContentData&amp;quot;/&amp;gt;&amp;lt;/param&amp;gt;
        &lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;protected abstract void &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;Render(T currentContent);
        &lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;/// &amp;lt;summary&amp;gt;
        /// &lt;/span&gt;&lt;span style=&quot;background: white; color: green&quot;&gt;Calls the default view with the &lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;&amp;lt;param name=&amp;quot;model&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: green&quot;&gt;view model&lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: green&quot;&gt;.
        &lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;/// &amp;lt;/summary&amp;gt;
        /// &amp;lt;param name=&amp;quot;model&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: green&quot;&gt;The view model&lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;&amp;lt;/param&amp;gt;
        &lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;protected virtual void &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;RenderView(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;object &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;model)
        {
            RenderView(DefaultViewName, model);
        }
        &lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;/// &amp;lt;summary&amp;gt;
        /// &lt;/span&gt;&lt;span style=&quot;background: white; color: green&quot;&gt;Calls the &lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;&amp;lt;param name=&amp;quot;viewName&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: green&quot;&gt;view&lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;&amp;lt;/param&amp;gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: green&quot;&gt;view with the &lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;&amp;lt;param name=&amp;quot;model&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: green&quot;&gt;view model&lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: green&quot;&gt;.
        &lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;/// &amp;lt;/summary&amp;gt;
        /// &amp;lt;param name=&amp;quot;viewName&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: green&quot;&gt;The view name&lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;&amp;lt;/param&amp;gt;
        /// &amp;lt;param name=&amp;quot;model&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: green&quot;&gt;The view model&lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;&amp;lt;/param&amp;gt;
        &lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;protected virtual void &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;RenderView(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;string &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;viewName, &lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;object &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;model)
        {
            RenderView(viewName, &lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;, model);
        }
        &lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;/// &amp;lt;summary&amp;gt;
        /// &lt;/span&gt;&lt;span style=&quot;background: white; color: green&quot;&gt;Calls the &lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;&amp;lt;param name=&amp;quot;viewName&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: green&quot;&gt;view&lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;&amp;lt;/param&amp;gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: green&quot;&gt;view with the &lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;&amp;lt;param name=&amp;quot;model&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: green&quot;&gt;view model&lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: green&quot;&gt;.
        &lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;/// &amp;lt;/summary&amp;gt;
        /// &amp;lt;param name=&amp;quot;viewName&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: green&quot;&gt;The view name&lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;&amp;lt;/param&amp;gt;
        /// &amp;lt;param name=&amp;quot;masterName&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: green&quot;&gt;The master name. Default master will be used when set to &#39;null&#39;.&lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;&amp;lt;/param&amp;gt;
        /// &amp;lt;param name=&amp;quot;model&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: green&quot;&gt;The view model&lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;&amp;lt;/param&amp;gt;
        &lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;protected virtual void &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;RenderView(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;string &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;viewName, &lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;string &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;masterName, &lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;object &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;model)
        {
            &lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;var &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;result = GetViewEngineResult(viewName, masterName);
            RenderView(model, result, viewName);
        }
        &lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;/// &amp;lt;summary&amp;gt;
        /// &lt;/span&gt;&lt;span style=&quot;background: white; color: green&quot;&gt;Calls the default partial view with the &lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;&amp;lt;param name=&amp;quot;model&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: green&quot;&gt;view model&lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: green&quot;&gt;.
        &lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;/// &amp;lt;/summary&amp;gt;
        /// &amp;lt;param name=&amp;quot;model&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: green&quot;&gt;The view model&lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;&amp;lt;/param&amp;gt;
        &lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;protected virtual void &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;RenderPartialView(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;object &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;model)
        {
            RenderPartialView(DefaultViewName, model);
        }
        &lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;/// &amp;lt;summary&amp;gt;
        /// &lt;/span&gt;&lt;span style=&quot;background: white; color: green&quot;&gt;Calls the &lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;&amp;lt;param name=&amp;quot;viewName&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: green&quot;&gt;partial view&lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;&amp;lt;/param&amp;gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: green&quot;&gt;view with the &lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;&amp;lt;param name=&amp;quot;model&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: green&quot;&gt;view model&lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: green&quot;&gt;.
        &lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;/// &amp;lt;/summary&amp;gt;
        /// &amp;lt;param name=&amp;quot;viewName&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: green&quot;&gt;The view name&lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;&amp;lt;/param&amp;gt;
        /// &amp;lt;param name=&amp;quot;model&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background: white; color: green&quot;&gt;The view model&lt;/span&gt;&lt;span style=&quot;background: white; color: gray&quot;&gt;&amp;lt;/param&amp;gt;
        &lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;protected virtual void &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;RenderPartialView(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;string &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;viewName, &lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;object &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;model)
        {
            &lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;var &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;result = GetPartialViewEngineResult(viewName);
            RenderView(model, result, viewName);
        }
        &lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;private void &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;RenderView(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;object &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;model, &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af&quot;&gt;ViewEngineResult &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;result, &lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;string &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;viewName)
        {
            &lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;if &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;(result.View == &lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;)
            {
                &lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;throw new &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af&quot;&gt;InvalidOperationException&lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;.Format(&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af&quot;&gt;CultureInfo&lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;.CurrentCulture, &lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515&quot;&gt;&amp;quot;The view &#39;&lt;/span&gt;&lt;span style=&quot;background: white; color: #3cb371&quot;&gt;{0}&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515&quot;&gt;&#39; or its master was not found or no view engine supports the searched locations.&amp;quot;&lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;, viewName));
            }
            ViewContext.ViewData.Model = model;
            result.View.Render(ViewContext, Writer);
        }
        &lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;private &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af&quot;&gt;ViewEngineResult &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;GetPartialViewEngineResult(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;string &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;viewName)
        {
            &lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;return &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af&quot;&gt;ViewEngines&lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;.Engines.FindPartialView(ViewContext, viewName);
        }
        &lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;private &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af&quot;&gt;ViewEngineResult &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;GetViewEngineResult(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;string &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;viewName, &lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;string &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;masterName)
        {
            &lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;return &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af&quot;&gt;ViewEngines&lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;.Engines.FindView(ViewContext, viewName, masterName);
        }
    }
}&lt;/span&gt;&lt;/pre&gt;
&lt;a href=&quot;http://11011.net/software/vspaste&quot;&gt;&lt;/a&gt;
&lt;p&gt;Now, we can simple use this base class like this: &lt;/p&gt;
&lt;pre class=&quot;code&quot;&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;using &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;EPiServer.Framework.DataAnnotations;
&lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;using &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;EPiServer.Templates.Alloy.Models.Blocks;
&lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;namespace &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;EPiServer.Samples
{
    [&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af&quot;&gt;TemplateDescriptor&lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;(Default = &lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;, Tags = &lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;[]{&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515&quot;&gt;&amp;quot;myTag&amp;quot;&lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;}, AvailableWithoutTag = &lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;)]
    &lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;public class &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af&quot;&gt;TestBlockDemoController &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af&quot;&gt;ViewRenderTemplate&lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af&quot;&gt;TestBlock&lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;&amp;gt;
    {
        &lt;/span&gt;&lt;span style=&quot;background: white; color: blue&quot;&gt;protected override void &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;Render(&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af&quot;&gt;TestBlock &lt;/span&gt;&lt;span style=&quot;background: white; color: black&quot;&gt;currentContent)
        {
            RenderPartialView(currentContent);
        }
    }
}
&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;&lt;a href=&quot;http://11011.net/software/vspaste&quot;&gt;&lt;/a&gt;&lt;/p&gt;</description>
            <guid>http://world.episerver.com/Blogs/Jonas-Bergqvist/Dates/2013/6/Hidden-template-functionality-in-the-MVC-implementation/</guid>
            <pubDate>Mon, 03 Jun 2013 13:47:22 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>The quest of FindPagesWithCriteria with a Block Property in EPiServer 7 CMS</title>
            <link>http://talk.alfnilsson.se/?p=186</link>
            <description>There are several exciting things with the new Blocks in EPiServer 7 CMS. One of the most convenient things when you need to add a group of data to a page type, for example an image + alternative text or an url + clickable text or maybe a group of SEO data such as title, [&amp;#8230;]&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://stats.wordpress.com/b.gif?host=talk.alfnilsson.se&amp;#038;blog=18285343&amp;#038;post=186&amp;#038;subd=toders&amp;#038;ref=&amp;#038;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</description>
            <guid>http://talk.alfnilsson.se/?p=186</guid>
            <pubDate>Mon, 03 Jun 2013 12:26:12 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>Users disappear from club’s access groups when using AD and Relate–a workaround…</title>
            <link>http://world.episerver.com/Blogs/Jonas-Lindau/Dates/2013/5/Users-disappear-from-clubs-access-groups-when-using-AD-and-Relatea-workaround/</link>
            <description>&lt;p&gt;I’ve seen a few forum posts from users having this issue. One of the best threads covering this subject is this one: &lt;a title=&quot;http://world.episerver.com/Modules/Forum/Pages/thread.aspx?id=63028&quot; href=&quot;/link/c634521232cc43d691da1263b07fbd8d.aspx?id=63028&amp;amp;epslanguage=en&quot;&gt;http://world.episerver.com/Modules/Forum/Pages/thread.aspx?id=63028&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This thread actually contains a good way to reproduce the error and also two different solutions that might work. The first solution is to specify the groups to transfer instead of using *. This worked for me at first, but suddenly started to act weird. &lt;/p&gt;  &lt;p&gt;But since I wanted to know more about this, I started with running SQL Profiler to see who, and when, accessed the database table tblEPiServerCommonGroupUser. It turned out that what’s happening is that all rows for the current user gets deleted when the new session starts. After that, the users group belongings gets inserted back to the table, BUT it seems like it never inserts non-AD groups, like “Group for club with id: xx”. This is what happens:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;div id=&quot;codeSnippetWrapper&quot;&gt;   &lt;div style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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;DELETE&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;FROM&lt;/span&gt; tblEPiServerCommonGroupUser &lt;span style=&quot;color: #0000ff&quot;&gt;WHERE&lt;/span&gt; intUserID = @intUserID &lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum2&quot;&gt;   2:&lt;/span&gt; INSERT &lt;span style=&quot;color: #0000ff&quot;&gt;INTO&lt;/span&gt; tblEPiServerCommonGroupUser (intGroupID, intUserID) &lt;span style=&quot;color: #0000ff&quot;&gt;VALUES&lt;/span&gt; (@intGroupID, @intUserID) &lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum3&quot;&gt;   3:&lt;/span&gt; INSERT &lt;span style=&quot;color: #0000ff&quot;&gt;INTO&lt;/span&gt; tblEPiServerCommonGroupUser (intGroupID, intUserID) &lt;span style=&quot;color: #0000ff&quot;&gt;VALUES&lt;/span&gt; (@intGroupID, @intUserID) &lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum4&quot;&gt;   4:&lt;/span&gt; INSERT &lt;span style=&quot;color: #0000ff&quot;&gt;INTO&lt;/span&gt; tblEPiServerCommonGroupUser (intGroupID, intUserID) &lt;span style=&quot;color: #0000ff&quot;&gt;VALUES&lt;/span&gt; (@intGroupID, @intUserID) &lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum5&quot;&gt;   5:&lt;/span&gt; INSERT &lt;span style=&quot;color: #0000ff&quot;&gt;INTO&lt;/span&gt; tblEPiServerCommonGroupUser (intGroupID, intUserID) &lt;span style=&quot;color: #0000ff&quot;&gt;VALUES&lt;/span&gt; (@intGroupID, @intUserID) &lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum6&quot;&gt;   6:&lt;/span&gt; INSERT &lt;span style=&quot;color: #0000ff&quot;&gt;INTO&lt;/span&gt; tblEPiServerCommonGroupUser (intGroupID, intUserID) &lt;span style=&quot;color: #0000ff&quot;&gt;VALUES&lt;/span&gt; (@intGroupID, @intUserID) &lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum7&quot;&gt;   7:&lt;/span&gt; INSERT &lt;span style=&quot;color: #0000ff&quot;&gt;INTO&lt;/span&gt; tblEPiServerCommonGroupUser (intGroupID, intUserID) &lt;span style=&quot;color: #0000ff&quot;&gt;VALUES&lt;/span&gt; (@intGroupID, @intUserID) &lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum8&quot;&gt;   8:&lt;/span&gt; INSERT &lt;span style=&quot;color: #0000ff&quot;&gt;INTO&lt;/span&gt; tblEPiServerCommonGroupUser (intGroupID, intUserID) &lt;span style=&quot;color: #0000ff&quot;&gt;VALUES&lt;/span&gt; (@intGroupID, @intUserID) &lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum9&quot;&gt;   9:&lt;/span&gt; INSERT &lt;span style=&quot;color: #0000ff&quot;&gt;INTO&lt;/span&gt; tblEPiServerCommonGroupUser (intGroupID, intUserID) &lt;span style=&quot;color: #0000ff&quot;&gt;VALUES&lt;/span&gt; (@intGroupID, @intUserID) &lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;p&gt;It seems that who’s responsible for this is EPiServer.Common.Web.Authorization.Integrator and it may be possible to do something about this behavior. For now, I have no solution. Instead I tried to find a way to insert the correct groups back to the table. This stored procedure restores the table with correct information for the current user. It could be executed in Session_Start to make sure the user belongs to the correct groups the current session:&lt;/p&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;div id=&quot;codeSnippetWrapper&quot;&gt;
  &lt;div style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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;SET&lt;/span&gt; ANSI_NULLS &lt;span style=&quot;color: #0000ff&quot;&gt;ON&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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;GO&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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;SET&lt;/span&gt; QUOTED_IDENTIFIER &lt;span style=&quot;color: #0000ff&quot;&gt;ON&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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;GO&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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: #008000&quot;&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum8&quot;&gt;   8:&lt;/span&gt; &lt;span style=&quot;color: #008000&quot;&gt;-- Author:        Jonas Lindau, MSB &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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum9&quot;&gt;   9:&lt;/span&gt; &lt;span style=&quot;color: #008000&quot;&gt;-- Create date: 2013-05-30 &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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum10&quot;&gt;  10:&lt;/span&gt; &lt;span style=&quot;color: #008000&quot;&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum11&quot;&gt;  11:&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;CREATE&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;PROCEDURE&lt;/span&gt; [dbo].[spCustomEpiServerFixGroups] &lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum12&quot;&gt;  12:&lt;/span&gt;     @intUSerId &lt;span style=&quot;color: #0000ff&quot;&gt;int&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum13&quot;&gt;  13:&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;AS&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum14&quot;&gt;  14:&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;BEGIN&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum15&quot;&gt;  15:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;SET&lt;/span&gt; NOCOUNT &lt;span style=&quot;color: #0000ff&quot;&gt;ON&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum17&quot;&gt;  17:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;DECLARE&lt;/span&gt; cClubs &lt;span style=&quot;color: #0000ff&quot;&gt;CURSOR&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum18&quot;&gt;  18:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;FOR&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum19&quot;&gt;  19:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;SELECT&lt;/span&gt; intClubID &lt;span style=&quot;color: #0000ff&quot;&gt;FROM&lt;/span&gt; tblEPiServerCommunityClubMember &lt;span style=&quot;color: #0000ff&quot;&gt;where&lt;/span&gt; intUserID = @intUserId &lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum20&quot;&gt;  20:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum21&quot;&gt;  21:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;OPEN&lt;/span&gt; cClubs&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum22&quot;&gt;  22:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum23&quot;&gt;  23:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;DECLARE&lt;/span&gt; @intClubId &lt;span style=&quot;color: #0000ff&quot;&gt;int&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum24&quot;&gt;  24:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;DECLARE&lt;/span&gt; @intGroupId &lt;span style=&quot;color: #0000ff&quot;&gt;int&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum25&quot;&gt;  25:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum26&quot;&gt;  26:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;FETCH&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;NEXT&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;FROM&lt;/span&gt; cClubs &lt;span style=&quot;color: #0000ff&quot;&gt;INTO&lt;/span&gt; @intClubId &lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum27&quot;&gt;  27:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;WHILE&lt;/span&gt; &lt;span style=&quot;color: #cc6633&quot;&gt;@@FETCH_STATUS&lt;/span&gt; &amp;lt;&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum28&quot;&gt;  28:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;BEGIN&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum29&quot;&gt;  29:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;SET&lt;/span&gt; @intGroupId = (&lt;span style=&quot;color: #0000ff&quot;&gt;SELECT&lt;/span&gt; intID &lt;span style=&quot;color: #0000ff&quot;&gt;FROM&lt;/span&gt; tblEPiServerCommonGroup &lt;span style=&quot;color: #0000ff&quot;&gt;WHERE&lt;/span&gt; strName = &lt;span style=&quot;color: #006080&quot;&gt;&#39;Group for Club with Id: &#39;&lt;/span&gt; + &lt;span style=&quot;color: #0000ff&quot;&gt;CAST&lt;/span&gt;(@intClubId &lt;span style=&quot;color: #0000ff&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;varchar&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum30&quot;&gt;  30:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum31&quot;&gt;  31:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;IF&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;EXISTS&lt;/span&gt;(&lt;span style=&quot;color: #0000ff&quot;&gt;SELECT&lt;/span&gt; * &lt;span style=&quot;color: #0000ff&quot;&gt;FROM&lt;/span&gt; tblEPiServerCommonGroupUser &lt;span style=&quot;color: #0000ff&quot;&gt;WITH&lt;/span&gt;(UPDLOCK, ROWLOCK, &lt;span style=&quot;color: #0000ff&quot;&gt;HOLDLOCK&lt;/span&gt;) &lt;span style=&quot;color: #0000ff&quot;&gt;WHERE&lt;/span&gt; intGroupID=@intGroupId &lt;span style=&quot;color: #0000ff&quot;&gt;AND&lt;/span&gt; intUserID=@intUserId) &lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum32&quot;&gt;  32:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;BEGIN&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum33&quot;&gt;  33:&lt;/span&gt;             --&lt;span style=&quot;color: #0000ff&quot;&gt;PRINT&lt;/span&gt; &lt;span style=&quot;color: #006080&quot;&gt;&#39;Values inserted for user: &#39;&lt;/span&gt; + &lt;span style=&quot;color: #0000ff&quot;&gt;CAST&lt;/span&gt;(@intUserId &lt;span style=&quot;color: #0000ff&quot;&gt;AS&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;VARCHAR&lt;/span&gt;) + &lt;span style=&quot;color: #006080&quot;&gt;&#39; and group: &#39;&lt;/span&gt; + &lt;span style=&quot;color: #0000ff&quot;&gt;CAST&lt;/span&gt;(@intGroupId &lt;span style=&quot;color: #0000ff&quot;&gt;AS&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;VARCHAR&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum34&quot;&gt;  34:&lt;/span&gt;             INSERT &lt;span style=&quot;color: #0000ff&quot;&gt;INTO&lt;/span&gt; tblEPiServerCommonGroupUser(intGroupID, intUserID) &lt;span style=&quot;color: #0000ff&quot;&gt;VALUES&lt;/span&gt;(@intGroupId, @intUserId) &lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum35&quot;&gt;  35:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;END&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum36&quot;&gt;  36:&lt;/span&gt;         &lt;span style=&quot;color: #008000&quot;&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum37&quot;&gt;  37:&lt;/span&gt; &lt;span style=&quot;color: #008000&quot;&gt;        ELSE &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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum38&quot;&gt;  38:&lt;/span&gt; &lt;span style=&quot;color: #008000&quot;&gt;        BEGIN &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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum39&quot;&gt;  39:&lt;/span&gt; &lt;span style=&quot;color: #008000&quot;&gt;            PRINT &#39;Values already exists for user: &#39; + CAST(@intUserId AS VARCHAR) + &#39; and group: &#39; + CAST(@intGroupId AS VARCHAR)            &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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum40&quot;&gt;  40:&lt;/span&gt; &lt;span style=&quot;color: #008000&quot;&gt;        END &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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum41&quot;&gt;  41:&lt;/span&gt; &lt;span style=&quot;color: #008000&quot;&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum42&quot;&gt;  42:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;FETCH&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;NEXT&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;FROM&lt;/span&gt; cClubs &lt;span style=&quot;color: #0000ff&quot;&gt;INTO&lt;/span&gt; @intClubId &lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum43&quot;&gt;  43:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;END&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum44&quot;&gt;  44:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;CLOSE&lt;/span&gt; cClubs &lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum45&quot;&gt;  45:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;DEALLOCATE&lt;/span&gt; cClubs &lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum46&quot;&gt;  46:&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;END&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum47&quot;&gt;  47:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum48&quot;&gt;  48:&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;GO&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;The procedure above can be executed like this:&lt;/p&gt;
&lt;div id=&quot;codeSnippetWrapper&quot;&gt;
  &lt;div style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; Session_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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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;try&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum5&quot;&gt;   5:&lt;/span&gt;         DatabaseHandler.Instance.ExecuteNonQuery(&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;spCustomEpiServerFixGroups&amp;quot;&lt;/span&gt;, CommunitySystem.CurrentContext.DefaultSecurity.CurrentUser.ID); &lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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;catch&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;p&gt;If you need to correct the entire table in one job, you could try the script below.&lt;/p&gt;
&lt;p&gt;What it does is extract a list of all users that is a member of any club and then insert the correct GroupId and UserId into tblEPiServerCommonGroupUser. I&amp;#160; have tried this for a couple of days and it seems to work, but be warned! It may do stuff it not intended to, so use at own risk!&lt;/p&gt;
&lt;p&gt;This is a one-time fix.&lt;/p&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;div id=&quot;codeSnippetWrapper&quot;&gt;
  &lt;div style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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;SET&lt;/span&gt; NOCOUNT &lt;span style=&quot;color: #0000ff&quot;&gt;ON&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum2&quot;&gt;   2:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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;DECLARE&lt;/span&gt; cClubMembers &lt;span style=&quot;color: #0000ff&quot;&gt;CURSOR&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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;FOR&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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;SELECT&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;DISTINCT&lt;/span&gt; intUserID &lt;span style=&quot;color: #0000ff&quot;&gt;FROM&lt;/span&gt; tblEPiServerCommunityClubMember&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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;OPEN&lt;/span&gt; cClubMembers&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum8&quot;&gt;   8:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum9&quot;&gt;   9:&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;DECLARE&lt;/span&gt; @intUserId &lt;span style=&quot;color: #0000ff&quot;&gt;int&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum11&quot;&gt;  11:&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;FETCH&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;NEXT&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;FROM&lt;/span&gt; cClubMembers &lt;span style=&quot;color: #0000ff&quot;&gt;INTO&lt;/span&gt; @intUserId &lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum12&quot;&gt;  12:&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;WHILE&lt;/span&gt; &lt;span style=&quot;color: #cc6633&quot;&gt;@@FETCH_STATUS&lt;/span&gt; &amp;lt;&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum13&quot;&gt;  13:&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;BEGIN&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum14&quot;&gt;  14:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;DECLARE&lt;/span&gt; cClubs &lt;span style=&quot;color: #0000ff&quot;&gt;CURSOR&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum15&quot;&gt;  15:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;FOR&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum16&quot;&gt;  16:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;SELECT&lt;/span&gt; intClubID &lt;span style=&quot;color: #0000ff&quot;&gt;FROM&lt;/span&gt; tblEPiServerCommunityClubMember &lt;span style=&quot;color: #0000ff&quot;&gt;where&lt;/span&gt; intUserID = @intUserId &lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum17&quot;&gt;  17:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum18&quot;&gt;  18:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;OPEN&lt;/span&gt; cClubs&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum19&quot;&gt;  19:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum20&quot;&gt;  20:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;DECLARE&lt;/span&gt; @intClubId &lt;span style=&quot;color: #0000ff&quot;&gt;int&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum21&quot;&gt;  21:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;DECLARE&lt;/span&gt; @intGroupId &lt;span style=&quot;color: #0000ff&quot;&gt;int&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum22&quot;&gt;  22:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum23&quot;&gt;  23:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;FETCH&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;NEXT&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;FROM&lt;/span&gt; cClubs &lt;span style=&quot;color: #0000ff&quot;&gt;INTO&lt;/span&gt; @intClubId &lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum24&quot;&gt;  24:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;WHILE&lt;/span&gt; &lt;span style=&quot;color: #cc6633&quot;&gt;@@FETCH_STATUS&lt;/span&gt; &amp;lt;&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum25&quot;&gt;  25:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;BEGIN&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum26&quot;&gt;  26:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;SET&lt;/span&gt; @intGroupId = (&lt;span style=&quot;color: #0000ff&quot;&gt;SELECT&lt;/span&gt; intID &lt;span style=&quot;color: #0000ff&quot;&gt;FROM&lt;/span&gt; tblEPiServerCommonGroup &lt;span style=&quot;color: #0000ff&quot;&gt;WHERE&lt;/span&gt; strName = &lt;span style=&quot;color: #006080&quot;&gt;&#39;Group for Club with Id: &#39;&lt;/span&gt; + &lt;span style=&quot;color: #0000ff&quot;&gt;CAST&lt;/span&gt;(@intClubId &lt;span style=&quot;color: #0000ff&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;varchar&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum27&quot;&gt;  27:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum28&quot;&gt;  28:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;IF&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;EXISTS&lt;/span&gt;(&lt;span style=&quot;color: #0000ff&quot;&gt;SELECT&lt;/span&gt; * &lt;span style=&quot;color: #0000ff&quot;&gt;FROM&lt;/span&gt; tblEPiServerCommonGroupUser &lt;span style=&quot;color: #0000ff&quot;&gt;WITH&lt;/span&gt;(UPDLOCK, ROWLOCK, &lt;span style=&quot;color: #0000ff&quot;&gt;HOLDLOCK&lt;/span&gt;) &lt;span style=&quot;color: #0000ff&quot;&gt;WHERE&lt;/span&gt; intGroupID=@intGroupId &lt;span style=&quot;color: #0000ff&quot;&gt;AND&lt;/span&gt; intUserID=@intUserId) &lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum29&quot;&gt;  29:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;BEGIN&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum30&quot;&gt;  30:&lt;/span&gt;             --&lt;span style=&quot;color: #0000ff&quot;&gt;PRINT&lt;/span&gt; &lt;span style=&quot;color: #006080&quot;&gt;&#39;Values inserted for user: &#39;&lt;/span&gt; + &lt;span style=&quot;color: #0000ff&quot;&gt;CAST&lt;/span&gt;(@intUserId &lt;span style=&quot;color: #0000ff&quot;&gt;AS&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;VARCHAR&lt;/span&gt;) + &lt;span style=&quot;color: #006080&quot;&gt;&#39; and group: &#39;&lt;/span&gt; + &lt;span style=&quot;color: #0000ff&quot;&gt;CAST&lt;/span&gt;(@intGroupId &lt;span style=&quot;color: #0000ff&quot;&gt;AS&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;VARCHAR&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum31&quot;&gt;  31:&lt;/span&gt;             INSERT &lt;span style=&quot;color: #0000ff&quot;&gt;INTO&lt;/span&gt; tblEPiServerCommonGroupUser(intGroupID, intUserID) &lt;span style=&quot;color: #0000ff&quot;&gt;VALUES&lt;/span&gt;(@intGroupId, @intUserId) &lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum32&quot;&gt;  32:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;END&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum33&quot;&gt;  33:&lt;/span&gt;         &lt;span style=&quot;color: #008000&quot;&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum34&quot;&gt;  34:&lt;/span&gt; &lt;span style=&quot;color: #008000&quot;&gt;        ELSE &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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum35&quot;&gt;  35:&lt;/span&gt; &lt;span style=&quot;color: #008000&quot;&gt;        BEGIN &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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum36&quot;&gt;  36:&lt;/span&gt; &lt;span style=&quot;color: #008000&quot;&gt;            PRINT &#39;Values already exists for user: &#39; + CAST(@intUserId AS VARCHAR) + &#39; and group: &#39; + CAST(@intGroupId AS VARCHAR)            &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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum37&quot;&gt;  37:&lt;/span&gt; &lt;span style=&quot;color: #008000&quot;&gt;        END &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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum38&quot;&gt;  38:&lt;/span&gt; &lt;span style=&quot;color: #008000&quot;&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum39&quot;&gt;  39:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;FETCH&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;NEXT&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;FROM&lt;/span&gt; cClubs &lt;span style=&quot;color: #0000ff&quot;&gt;INTO&lt;/span&gt; @intClubId &lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum40&quot;&gt;  40:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;END&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum41&quot;&gt;  41:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;CLOSE&lt;/span&gt; cClubs &lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum42&quot;&gt;  42:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;DEALLOCATE&lt;/span&gt; cClubs&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum43&quot;&gt;  43:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum44&quot;&gt;  44:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;FETCH&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;NEXT&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;FROM&lt;/span&gt; cClubMembers &lt;span style=&quot;color: #0000ff&quot;&gt;INTO&lt;/span&gt; @intUserId &lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum45&quot;&gt;  45:&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;END&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum46&quot;&gt;  46:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum47&quot;&gt;  47:&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;CLOSE&lt;/span&gt; cClubMembers &lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum48&quot;&gt;  48:&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;DEALLOCATE&lt;/span&gt; cClubMembers &lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum49&quot;&gt;  49:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;p&gt;If you know a way to really solve this issue, please let me know!&lt;/p&gt;</description>
            <guid>http://world.episerver.com/Blogs/Jonas-Lindau/Dates/2013/5/Users-disappear-from-clubs-access-groups-when-using-AD-and-Relatea-workaround/</guid>
            <pubDate>Fri, 31 May 2013 13:04:01 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>EPiServer Find: Bulks, please!</title>
            <link>http://world.episerver.com/Blogs/Per-Magne-Skuseth/Dates/2013/5/EPiServer-Find-Bulks-please/</link>
            <description>&lt;p&gt;Are you using Find and index lots of custom data? Improve performance by Indexing lists of objects, instead of one by one, as shown in the example below. &lt;/p&gt;  &lt;div id=&quot;codeSnippetWrapper&quot; style=&quot;overflow: auto; cursor: text; font-size: 8pt; border-top: silver 1px solid; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right: silver 1px solid; border-bottom: silver 1px solid; padding-bottom: 4px; direction: ltr; text-align: left; padding-top: 4px; padding-left: 4px; margin: 20px 0px 10px; border-left: silver 1px solid; line-height: 12pt; padding-right: 4px; max-height: 200px; width: 97.5%; background-color: #f4f4f4&quot;&gt;   &lt;div id=&quot;codeSnippet&quot; style=&quot;border-top-style: none; overflow: visible; font-size: 8pt; border-left-style: none; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; line-height: 12pt; padding-right: 0px; width: 100%; background-color: #f4f4f4&quot;&gt;     &lt;pre style=&quot;border-top-style: none; overflow: visible; font-size: 8pt; border-left-style: none; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; line-height: 12pt; padding-right: 0px; width: 100%; background-color: white&quot;&gt;&lt;span id=&quot;lnum1&quot; style=&quot;color: #606060&quot;&gt;   1:&lt;/span&gt; &lt;span style=&quot;color: #008000&quot;&gt;// Not optimal &lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-top-style: none; overflow: visible; font-size: 8pt; border-left-style: none; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; line-height: 12pt; padding-right: 0px; width: 100%; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum2&quot; style=&quot;color: #606060&quot;&gt;   2:&lt;/span&gt; List&amp;lt;MyObject&amp;gt; objects = GetObjectsFromSomeWhere();&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-top-style: none; overflow: visible; font-size: 8pt; border-left-style: none; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; line-height: 12pt; padding-right: 0px; width: 100%; background-color: white&quot;&gt;&lt;span id=&quot;lnum3&quot; style=&quot;color: #606060&quot;&gt;   3:&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;foreach&lt;/span&gt; (var o &lt;span style=&quot;color: #0000ff&quot;&gt;in&lt;/span&gt; objects)&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-top-style: none; overflow: visible; font-size: 8pt; border-left-style: none; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; line-height: 12pt; padding-right: 0px; width: 100%; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum4&quot; style=&quot;color: #606060&quot;&gt;   4:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-top-style: none; overflow: visible; font-size: 8pt; border-left-style: none; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; line-height: 12pt; padding-right: 0px; width: 100%; background-color: white&quot;&gt;&lt;span id=&quot;lnum5&quot; style=&quot;color: #606060&quot;&gt;   5:&lt;/span&gt;     client.Index(o);&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-top-style: none; overflow: visible; font-size: 8pt; border-left-style: none; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; line-height: 12pt; padding-right: 0px; width: 100%; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum6&quot; style=&quot;color: #606060&quot;&gt;   6:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&quot;codeSnippetWrapper&quot; style=&quot;overflow: auto; cursor: text; font-size: 8pt; border-top: silver 1px solid; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right: silver 1px solid; border-bottom: silver 1px solid; padding-bottom: 4px; direction: ltr; text-align: left; padding-top: 4px; padding-left: 4px; margin: 20px 0px 10px; border-left: silver 1px solid; line-height: 12pt; padding-right: 4px; max-height: 200px; width: 97.5%; background-color: #f4f4f4&quot;&gt;
  &lt;div id=&quot;codeSnippet&quot; style=&quot;border-top-style: none; overflow: visible; font-size: 8pt; border-left-style: none; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; line-height: 12pt; padding-right: 0px; width: 100%; background-color: #f4f4f4&quot;&gt;
    &lt;pre style=&quot;border-top-style: none; overflow: visible; font-size: 8pt; border-left-style: none; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; line-height: 12pt; padding-right: 0px; width: 100%; background-color: white&quot;&gt;&lt;span id=&quot;lnum1&quot; style=&quot;color: #606060&quot;&gt;   1:&lt;/span&gt; &lt;span style=&quot;color: #008000&quot;&gt;// Better! (obviously)&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-top-style: none; overflow: visible; font-size: 8pt; border-left-style: none; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; line-height: 12pt; padding-right: 0px; width: 100%; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum2&quot; style=&quot;color: #606060&quot;&gt;   2:&lt;/span&gt; List&amp;lt;MyObject&amp;gt; objects = GetObjectsFromSomeWhere(); &lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-top-style: none; overflow: visible; font-size: 8pt; border-left-style: none; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; line-height: 12pt; padding-right: 0px; width: 100%; background-color: white&quot;&gt;&lt;span id=&quot;lnum3&quot; style=&quot;color: #606060&quot;&gt;   3:&lt;/span&gt; client.Index(objects);&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;p&gt;By doing this, you will significantly reduce the number of calls sent to the Find index, thus increase the general performance and decrease time taken to index.&lt;/p&gt;
&lt;p&gt;This is fine as long as your list of objects isn’t too large, (depending on object size), but what if you have a list of 10 000 items? Or 100 000 items? Trying to index all of them at once will most likely result in a timeout error from the service. To solve this, you should split up the list and index the objects in bulks.&amp;#160; A simple way to do this is to create an extension method, like so:&lt;/p&gt;
&lt;div id=&quot;codeSnippetWrapper&quot; style=&quot;overflow: auto; cursor: text; font-size: 8pt; border-top: silver 1px solid; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right: silver 1px solid; border-bottom: silver 1px solid; padding-bottom: 4px; direction: ltr; text-align: left; padding-top: 4px; padding-left: 4px; margin: 20px 0px 10px; border-left: silver 1px solid; line-height: 12pt; padding-right: 4px; max-height: 200px; width: 97.5%; background-color: #f4f4f4&quot;&gt;
  &lt;div id=&quot;codeSnippet&quot; style=&quot;border-top-style: none; overflow: visible; font-size: 8pt; border-left-style: none; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; line-height: 12pt; padding-right: 0px; width: 100%; background-color: #f4f4f4&quot;&gt;
    &lt;pre style=&quot;border-top-style: none; overflow: visible; font-size: 8pt; border-left-style: none; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; line-height: 12pt; padding-right: 0px; width: 100%; background-color: white&quot;&gt;&lt;span id=&quot;lnum1&quot; style=&quot;color: #606060&quot;&gt;   1:&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; IndexBulks(&lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt; IClient client, IEnumerable&amp;lt;&lt;span style=&quot;color: #0000ff&quot;&gt;object&lt;/span&gt;&amp;gt; objects, &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; bulkSize)&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-top-style: none; overflow: visible; font-size: 8pt; border-left-style: none; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; line-height: 12pt; padding-right: 0px; width: 100%; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum2&quot; style=&quot;color: #606060&quot;&gt;   2:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-top-style: none; overflow: visible; font-size: 8pt; border-left-style: none; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; line-height: 12pt; padding-right: 0px; width: 100%; background-color: white&quot;&gt;&lt;span id=&quot;lnum3&quot; style=&quot;color: #606060&quot;&gt;   3:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;while&lt;/span&gt; (objects.Any())&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-top-style: none; overflow: visible; font-size: 8pt; border-left-style: none; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; line-height: 12pt; padding-right: 0px; width: 100%; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum4&quot; style=&quot;color: #606060&quot;&gt;   4:&lt;/span&gt;     {&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-top-style: none; overflow: visible; font-size: 8pt; border-left-style: none; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; line-height: 12pt; padding-right: 0px; width: 100%; background-color: white&quot;&gt;&lt;span id=&quot;lnum5&quot; style=&quot;color: #606060&quot;&gt;   5:&lt;/span&gt;         client.Index(objects.Take(bulkSize));&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-top-style: none; overflow: visible; font-size: 8pt; border-left-style: none; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; line-height: 12pt; padding-right: 0px; width: 100%; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum6&quot; style=&quot;color: #606060&quot;&gt;   6:&lt;/span&gt;         objects = objects.Skip(bulkSize);&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-top-style: none; overflow: visible; font-size: 8pt; border-left-style: none; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; line-height: 12pt; padding-right: 0px; width: 100%; background-color: white&quot;&gt;&lt;span id=&quot;lnum7&quot; style=&quot;color: #606060&quot;&gt;   7:&lt;/span&gt;     }&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-top-style: none; overflow: visible; font-size: 8pt; border-left-style: none; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; line-height: 12pt; padding-right: 0px; width: 100%; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum8&quot; style=&quot;color: #606060&quot;&gt;   8:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The extension accept a list of objects and a bulksize, and is used like this:&lt;/p&gt;
&lt;div id=&quot;codeSnippetWrapper&quot; style=&quot;overflow: auto; cursor: text; font-size: 8pt; border-top: silver 1px solid; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right: silver 1px solid; border-bottom: silver 1px solid; padding-bottom: 4px; direction: ltr; text-align: left; padding-top: 4px; padding-left: 4px; margin: 20px 0px 10px; border-left: silver 1px solid; line-height: 12pt; padding-right: 4px; max-height: 200px; width: 97.5%; background-color: #f4f4f4&quot;&gt;
  &lt;div id=&quot;codeSnippet&quot; style=&quot;border-top-style: none; overflow: visible; font-size: 8pt; border-left-style: none; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; line-height: 12pt; padding-right: 0px; width: 100%; background-color: #f4f4f4&quot;&gt;
    &lt;pre style=&quot;border-top-style: none; overflow: visible; font-size: 8pt; border-left-style: none; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; line-height: 12pt; padding-right: 0px; width: 100%; background-color: white&quot;&gt;&lt;span id=&quot;lnum1&quot; style=&quot;color: #606060&quot;&gt;   1:&lt;/span&gt; client.IndexBulks(objects, 50);&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Numbers&lt;/strong&gt; 
  &lt;br /&gt;Indexing 1000 objects –&amp;#160; time taken:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;One by one: 8 minutes, 13 seconds. &lt;/li&gt;
  &lt;li&gt;Bulks of 50: 4 minutes, 29 seconds.&amp;#160; &lt;/li&gt;
  &lt;li&gt;Single large bulk : As expected, the service timed out. &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;p&gt;Happy indexing!&lt;/p&gt;</description>
            <guid>http://world.episerver.com/Blogs/Per-Magne-Skuseth/Dates/2013/5/EPiServer-Find-Bulks-please/</guid>
            <pubDate>Wed, 29 May 2013 22:46:54 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>Block Preview Thumbnail Image</title>
            <link>http://blog.huilaaja.net/?p=1379</link>
            <description>Would&amp;#8217;t it be nice to see preview images which kind of page or block type are you creating? If you are creating new block, would this kind of view be nice? Jon Menzies-Smith has made a great EPiBoost library which include many nice features but one thing I really admire was a feature which display [...]</description>
            <guid>http://blog.huilaaja.net/?p=1379</guid>
            <pubDate>Sat, 25 May 2013 01:37:34 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>Custom display templates for ASP.NET MVC in ImageVault 4</title>
            <link>http://blog.imagevault.se/post/51225011289</link>
            <description>&lt;p&gt;In the current release (ver. 4.1.2) of ImageVault 4 we are missing display templates for ASP.NET MVC and in this blog post I will show you an example of how you can create your own template for the MediaReference property.&lt;/p&gt;

&lt;p&gt;Add a MediaReference property to your model&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;[CultureSpecific]
[Editable(true)]
[Display(Name = &quot;Media item&quot;, GroupName = SystemTabNames.Content, Order = 3)]
public virtual MediaReference Media { get; set; }
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Render the property using&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;@Html.PropertyFor(x =&amp;gt; x.Media)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This will result in a string representation of the media reference property. To fix this issue we will create a display template for the MediaReference type.&lt;/p&gt;

&lt;p&gt;Add a folder called &lt;em&gt;DisplayTemplates&lt;/em&gt; below the shared folder in your project, in this folder, create a partial view called &lt;em&gt;MediaReference.cshtml&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Add the following code to the partial view.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;@model ImageVault.EPiServer.MediaReference
@if (Model == null)
{
if (!PageEditing.PageIsInEditMode) {
        &amp;lt;p&amp;gt;Drag your media here&amp;lt;/p&amp;gt;
    }
}
else
{
&amp;lt;div class=&quot;media-placeholder&quot;&amp;gt;
    @Html.Action(&quot;RenderMedia&quot;,&quot;Article&quot;, new   { mediaReference = Model })
&amp;lt;/div&amp;gt;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In this example, if there are no selected media we render a placeholder with with the text &amp;#8220;drag your media here&amp;#8221;. If we have a reference to a media item we execute the action called &lt;em&gt;RenderMedia&lt;/em&gt; on the &lt;em&gt;ArticleController&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;The RenderMedia method contains the following code snippet.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;        public string RenderMedia(MediaReference mediaReference) {
        // Fetch the current page
        var pageRouteHelper = ServiceLocator.Current.GetInstance();
        var currentPage = pageRouteHelper.Page;

        // Load the property settings for the media reference
        var propertyData = currentPage.Property[&quot;Media&quot;];
        var settings = (PropertyMediaSettings) propertyData.GetSetting(typeof (PropertyMediaSettings));

            // Start building the query for the specific media
            var query = _client.Load(mediaReference.Id);

            // Apply editorial effects
            if (mediaReference.Effects.Count &amp;gt; 0) {
                query = query.ApplyEffects(mediaReference.Effects);
            }

            // Videos cannot be cropped so if settings.ResizeMode is ScaleToFill we&#39;ll get null
            // Execute the query
            var media = query.Resize(settings.Width, settings.Height, settings.ResizeMode).SingleOrDefault() ??
                             query.Resize(settings.Width, settings.Height).SingleOrDefault();
            return media == null ? string.Empty : media.Html;

    }
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The code above will fetch the selected media item from ImageVault, add the custom property settings and if any editorial changes has been applied to the media we will add those as well and then return the Html for the specific media item.&lt;/p&gt;</description>
            <guid>http://blog.imagevault.se/post/51225011289</guid>
            <pubDate>Fri, 24 May 2013 16:12:00 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>The first, easiest (and worst) decision your tech start-up will make</title>
            <link>http://world.episerver.com/Blogs/Dan-Matthews/Dates/2013/5/The-first-easiest-and-worst-decision-your-tech-start-up-will-make/</link>
            <description>&lt;p&gt;Yesterday I was at the premier conference for technology entrepreneurs and start-ups in South Africa, &lt;a href=&quot;http://www.netprophet.org.za&quot;&gt;Net Prophet&lt;/a&gt;. I had a chance to mingle with some of the fantastic talent we have here in Africa and there is one thing that I kept hearing in conversations and it went something like this:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;“We had to keep costs low, so we built our own platform”&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Or, sometimes, a variation:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;“We had to keep costs low, so we chose an Open Source platform”&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;On the face of it, that makes perfect sense. For a technology start-up you start with an idea for a product or service, and the first decision you need to make is what platform to use. Apparently, it’s a no brainer. An easy decision that you can’t get wrong. Or can you?&lt;/p&gt;  &lt;p&gt;Let’s take a step back and see what you actually need for a start-up. Yes, you need that great idea or service that someone wants to buy from you, but what you then need is capital. Money. Greenbacks. Moolah. There are various ways of raising it – running a start-up in parallel with your day job, selling your house and car as capital and living out a cardboard box, getting an angel investor, joining an accelerator program… but whatever option you choose, your start-up needs to be as lean and mean as it can. This is something we all know to be self evident; low overheads mean better margins and higher profit or – if required – the same margins and lower end cost to customer, increasing competitiveness.&lt;/p&gt;  &lt;p&gt;This is then when we come to our first decision. We need a platform, we need to keep costs low. If we custom build or go Open Source, our cost is zero. Lean. Mean. Profitable. Successful.&lt;/p&gt;  &lt;p&gt;But wait a moment… what many start-ups fail to realise is that the art of keeping costs low has two distinct and very important parts; &lt;strong&gt;capital costs&lt;/strong&gt; and &lt;strong&gt;running costs&lt;/strong&gt;. What is the distinction? Capital costs are the costs incurred by a business to get to an operational state, and running costs are the costs to operate the business. For our start-up, we need to consider both. Remember, time is money. Every minute you spend before you are operational is a capital cost. That includes time developing or extending your platform. Somehow, you need to pay for your time to do that. Just because the platform is free doesn’t mean it doesn’t cost you anything. Then, once you are live, you need to consider how much time you spend maintaining that platform. Something that was free might actually incur far higher operational cost than you expect, both in time and hard cash.&lt;/p&gt;  &lt;p&gt;On top of all this, we have a golden rule for start-ups… get to market as quickly as possible. Why? Because then you can start making revenue, and that makes a successful business. This is lots to think about, so let’s summarise our options.&lt;/p&gt;  &lt;h3&gt;Option One – Build It Yourself&lt;/h3&gt;  &lt;p&gt;Pros&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Exactly what you need&lt;/li&gt;    &lt;li&gt;No initial license cost&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Cons&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Long time to develop causes high cost in man hours (capital cost)&lt;/li&gt;    &lt;li&gt;Long time to develop causes slower time to market&lt;/li&gt;    &lt;li&gt;Continuous maintenance required&lt;/li&gt;    &lt;li&gt;Difficult transfer of skills&lt;/li&gt;    &lt;li&gt;Limited to knowledge of developers (if you didn’t know something, how could you have built it?)&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Summary&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Capital cost HIGH&lt;/li&gt;    &lt;li&gt;Operational cost HIGH&lt;/li&gt;    &lt;li&gt;Time to market LONG&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Best when…&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;You are happy to take a long time to go live&lt;/li&gt;    &lt;li&gt;You understand your market intimately&lt;/li&gt;    &lt;li&gt;You have another steady revenue stream&lt;/li&gt;    &lt;li&gt;You have an extremely knowledgeable development team&lt;/li&gt;    &lt;li&gt;You can guarantee your development teams availability long term&lt;/li&gt;    &lt;li&gt;You have very cheap operational resources&lt;/li&gt;    &lt;li&gt;You can afford to burn time&lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;Option Two – Open Source&lt;/h3&gt;  &lt;p&gt;Pros&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;No initial license cost&lt;/li&gt;    &lt;li&gt;Existing platform reduces effort required (capital cost)&lt;/li&gt;    &lt;li&gt;Quick time to market than build-it-yourself&lt;/li&gt;    &lt;li&gt;Paid-for-maintenance available&lt;/li&gt;    &lt;li&gt;Skills can be transferred&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Cons&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Technically oriented (designed for developers by developers)&lt;/li&gt;    &lt;li&gt;Often disjointed and inconsistent as it’s build by a disparate team with different needs&lt;/li&gt;    &lt;li&gt;Still requires heavy development (although less than build-it-yourself)&lt;/li&gt;    &lt;li&gt;Lock-in to a product that is potentially transient&lt;/li&gt;    &lt;li&gt;Community support often lacking&lt;/li&gt;    &lt;li&gt;Additional modules can cause ‘patchwork’ software of varying quality&lt;/li&gt;    &lt;li&gt;Requires continual attention and maintenance&lt;/li&gt;    &lt;li&gt;Vendor support (if it exists) can be expensive&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Summary&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Capital cost AVERAGE&lt;/li&gt;    &lt;li&gt;Operational cost AVERAGE&lt;/li&gt;    &lt;li&gt;Time to market AVERAGE&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Best when…&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;You have a very small initial investment&lt;/li&gt;    &lt;li&gt;You need to get live fairly quickly&lt;/li&gt;    &lt;li&gt;You have a reasonable development team&lt;/li&gt;    &lt;li&gt;You want medium-term future proofing&lt;/li&gt;    &lt;li&gt;You want some 3rd party support options&lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;&lt;/h3&gt;  &lt;h3&gt;Option Three – Paid for Product&lt;/h3&gt;  &lt;p&gt;Pros&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Fully Supported&lt;/li&gt;    &lt;li&gt;Very quick time to market&lt;/li&gt;    &lt;li&gt;Proven scalability&lt;/li&gt;    &lt;li&gt;Powerful feature set&lt;/li&gt;    &lt;li&gt;Consistent experience&lt;/li&gt;    &lt;li&gt;Dedicated development team&lt;/li&gt;    &lt;li&gt;Business oriented&lt;/li&gt;    &lt;li&gt;Skills transferable&lt;/li&gt;    &lt;li&gt;Migration options&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Cons&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;License cost (capital cost)&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Summary&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Capital cost HIGH&lt;/li&gt;    &lt;li&gt;Operational cost LOW&lt;/li&gt;    &lt;li&gt;Time to market LOW&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Best when…&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;You have raised a decent amount of initial investment (yourself or via investors)&lt;/li&gt;    &lt;li&gt;You want to get to market fast&lt;/li&gt;    &lt;li&gt;You want long-term profitability with low operational cost&lt;/li&gt;    &lt;li&gt;You want to be long-term future proofed&lt;/li&gt;    &lt;li&gt;You want the security of dedicated support&lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;So… where to from here?&lt;/h3&gt;  &lt;p&gt;Ultimately, which option you choose depends very much on where you want to go with your start-up. If you have a great idea you want to develop yourself and time is no consideration, build it yourself. If you are really, really squeezed for initial capital but you can’t take the risk to build it yourself, go Open Source. And if you can raise the capital to do with a paid-for platform up front, you will get to market and profitability far quicker with lower operational costs. In real-world experience, if a start-up is successful then if they chose build-it-yourself or Open Source then they will tend to re-platform within a couple of years to paid-for, and at a significant migration cost. Those start-ups that started with paid-for can just continue making money with their scalable platforms and don’t need to hit that speed bump on their journey. If you can raise the capital, it’s a long term win to start that way.&lt;/p&gt;  &lt;p&gt;Here’s a question to finish up. Do you think that an angel investor or venture capitalist will be impressed if you tell them about how you’re going to take ages to get to market because you’re keeping capital costs low? Or do you think they care about fast time to market, quality of platform and operational costs? They have money to place where they think it will be effective, and for them the capital cost is the small part of the picture. If you pick a paid-for platform and partner with them, you already have a team on your side, you have credibility, and you have a product you can be proud of. That makes capital raising for your business a much easier affair. It shows you’re serious, and you’ll find investors are likely to reward your long-term vision.&lt;/p&gt;  &lt;p&gt;So your first decision, your platform, does require serious thought. Make a wise decision, and a good one.&lt;/p&gt;  &lt;p&gt;&amp;#160;&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:0767317B-992E-4b12-91E0-4F059A8CECA8:900f8357-3f9f-449a-9e5b-3e786ed73524&quot; class=&quot;wlWriterEditableSmartContent&quot;&gt;Technorati Tags: &lt;a href=&quot;http://technorati.com/tags/Net+Prophet&quot; rel=&quot;tag&quot;&gt;Net Prophet&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/Start-ups&quot; rel=&quot;tag&quot;&gt;Start-ups&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/EPiServer&quot; rel=&quot;tag&quot;&gt;EPiServer&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/Open+Source&quot; rel=&quot;tag&quot;&gt;Open Source&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/Profit&quot; rel=&quot;tag&quot;&gt;Profit&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/Entrepreneur&quot; rel=&quot;tag&quot;&gt;Entrepreneur&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/South+Africa&quot; rel=&quot;tag&quot;&gt;South Africa&lt;/a&gt;&lt;/div&gt;</description>
            <guid>http://world.episerver.com/Blogs/Dan-Matthews/Dates/2013/5/The-first-easiest-and-worst-decision-your-tech-start-up-will-make/</guid>
            <pubDate>Fri, 24 May 2013 10:35:24 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>London EPiServer Meetup Summer 2013</title>
            <link>http://www.markeverard.com/?p=2302</link>
            <description>Well the weather might not reflect it, but it is soon to be summer and so time for&amp;#8230;&amp;#8230;. another EPiServer Meetup! Syzygy have kindly put themselves forward to be our hostess with the mostess, and as usual they&amp;#8217;ll be beer, pizza and some good tech-geekup opportunities. Thurs 13th June 2013, 18.30 –21.00 ish Syzygy – [...]</description>
            <guid>http://www.markeverard.com/?p=2302</guid>
            <pubDate>Thu, 23 May 2013 15:28:45 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>Why do I prefer using blocks in EPiServer</title>
            <link>http://blog.huilaaja.net/?p=1373</link>
            <description>In EPiServer 7 there are several ways to design and implement features and because of such a wide scale of ways to do it,&#160; it&amp;#8217;s often hard to find the most suitable way for specific case. As a developer/architect perspective these are the most important reasons why I prefer to use blocks: Blocks help defining [...]</description>
            <guid>http://blog.huilaaja.net/?p=1373</guid>
            <pubDate>Tue, 21 May 2013 11:58:57 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>EPiServer editing delight challenge - MVC solution</title>
            <link>http://joelabrahamsson.com/episerver-editing-delight-challenge-mvc-solution/</link>
            <description>Solving a small but tricky problem related to customised rendering of a property in EPiServer 7 with ASP.NET MVC.
&lt;p&gt;Starting with the simple stuff we render each of the properties using the PropertyFor method.&lt;/p&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;&amp;lt;h1&amp;gt;@Html.PropertyFor(x =&amp;gt; x.Heading)&amp;lt;/h1&amp;gt;
&amp;lt;p&amp;gt;@Html.PropertyFor(x =&amp;gt; x.Intro)&amp;lt;/p&amp;gt;&lt;br /&gt;&lt;/pre&gt;
&lt;p&gt;Then we make both properties editable using a text area by adding a UI hint to each of them.&lt;/p&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;//using EPiServer.Web;

[UIHint(UIHint.Textarea)]
public virtual string Heading { get; set; }

[UIHint(UIHint.Textarea)]
public virtual string Intro { get; set; }&lt;/pre&gt;
&lt;h2&gt;Customise the rendering&lt;/h2&gt;
&lt;p&gt;Moving on to the next requirement we create an extension method for strings that replaces line breaks with br tags. We make it return an IHtmlString so that the br tags won&#39;t be encoded.&lt;/p&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;public static IHtmlString ToLineBreakString(this string original)
{
    var parsed = string.Empty;
    if (!string.IsNullOrEmpty(original))
    {
        parsed = HttpUtility.HtmlEncode(original);
        parsed = parsed.Replace(&quot;\n&quot;, &quot;&amp;lt;br /&amp;gt;&quot;);
    }

    return new MvcHtmlString(parsed);
}&lt;/pre&gt;
&lt;p&gt;Now, how do we use this method? We could modify the view to render the property&#39;s value directly and add edit attributes to the h1 tag, like this:&lt;/p&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;&amp;lt;h1 @Html.EditAttributes(x =&amp;gt; x.Heading)&amp;gt;
    @Model.Heading.ToLineBreakString()
&amp;lt;/h1&amp;gt;&lt;/pre&gt;
&lt;p&gt;At first it may seem like we&#39;ve solved the challenge. Both properties are editable in on-page-edit mode using text areas and a line break in the Heading property is replaced with a br tag. However, let&#39;s look at what happens when we make a change to the Heading property:&lt;/p&gt;
&lt;p&gt;&lt;img class=&quot;thumbnail-centered&quot; src=&quot;/Global/broken_preview.png&quot; alt=&quot;&quot; width=&quot;769&quot; height=&quot;518&quot; /&gt;&lt;/p&gt;
&lt;p&gt;The line break in the Heading property isn&#39;t replaced with a br when the new value is inserted into the page during editing. We&#39;re not meeting the requirement that both properties should offer a realistic preview at all times.&lt;/p&gt;
&lt;p&gt;This happens because the CMS has no way of knowing that we&#39;re customizing the rendering of the property in our view. Instead it updates the DOM node that represents the property with what would be rendered by the PropertyFor method.&lt;/p&gt;
&lt;h2&gt;Fixing the preview&lt;/h2&gt;
&lt;p&gt;If you&#39;ve read my article about &lt;a href=&quot;/link/97755f93eb134f98b538ec69de3fe450.aspx?id=534&amp;amp;epslanguage=en&quot;&gt;how PropertyFor works&lt;/a&gt; you know that means it will replace it with what the DisplayFor method would return, meaning the default display template for strings.&lt;/p&gt;
&lt;p&gt;To fix this we could create a display template named string or Textarea (matching the UI hint) and render the value with the help of our extension method there. Given that we update the view to again render the Heading property using either PropertyFor or DisplayFor we would then have fixed the preview issue.&lt;/p&gt;
&lt;p&gt;That would however mean that a line break in the Intro property would also be replaced with a br tag, violating the requirement that it should not be.&lt;/p&gt;
&lt;p&gt;What to do then? Seems like the requirements are conflicting. Perhaps all is lost and it&#39;s time to give up?&lt;/p&gt;
&lt;p&gt;Not quite. We just need to sprinkle our code with some magic dust made exactly according to the recipe.&lt;/p&gt;
&lt;p&gt;First we create a display template named LineBreaked that renders a string using our extension method.&lt;/p&gt;
&lt;p&gt;&lt;img class=&quot;thumbnail-centered&quot; src=&quot;/Global/display_template.png&quot; alt=&quot;&quot; width=&quot;209&quot; height=&quot;71&quot; /&gt;&lt;/p&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;@model string
@Model.ToLineBreakString()&lt;br /&gt;&lt;/pre&gt;
&lt;p&gt;Next we add another UI hint to the Heading property, this time with the name of the display template.&lt;/p&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;&lt;strong&gt;[UIHint(&quot;LineBreaked&quot;)]&lt;/strong&gt;
[UIHint(UIHint.Textarea)]
public virtual string Heading { get; set; }&lt;/pre&gt;
&lt;p&gt;That alone doesn&#39;t yield any effect as we now have two UI hints and, at least for me, the Textarea one will be used.&lt;/p&gt;
&lt;p&gt;The final step that makes it all work is to modify the second UI hint so that it won&#39;t be used by PropertyFor or DisplayFor, only by the CMS when locating the approriate editor for the property. To do so we use an overload of the UIHintAttribute class&#39; constructor and pass it a string representing a &quot;presentation layer&quot;. Specifically the string exposed by the Edit constant in EPiServer&#39;s PresentationLayer class.&lt;/p&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;[UIHint(&quot;LineBreaked&quot;)]
[UIHint(UIHint.Textarea, &lt;strong&gt;PresentationLayer.Edit&lt;/strong&gt;)]
public virtual string Heading { get; set; }&lt;/pre&gt;
&lt;p&gt;And with that the challenge is solved.&lt;/p&gt;
&lt;p&gt;&lt;img class=&quot;thumbnail-centered&quot; src=&quot;/PageFiles/652/fixed_preview.png&quot; alt=&quot;&quot; width=&quot;766&quot; height=&quot;518&quot; /&gt;&lt;/p&gt;
</description>
            <guid>http://joelabrahamsson.com/episerver-editing-delight-challenge-mvc-solution/</guid>
            <pubDate>Tue, 21 May 2013 06:00:00 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>EPiServer editing delight challenge - Web Forms solution</title>
            <link>http://joelabrahamsson.com/episerver-editing-delight-challenge-web-forms-solution/</link>
            <description>Solving a small but tricky problem related to customised rendering of a property in EPiServer 7 with ASP.NET Web Forms.
&lt;p&gt;Starting with the simple stuff we render each of the properties using the Property control.&lt;/p&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;&amp;lt;EPiServer:Property PropertyName=&quot;Heading&quot; CustomTagName=&quot;h1&quot; runat=&quot;server&quot; /&amp;gt;
&amp;lt;EPiServer:Property PropertyName=&quot;Intro&quot; CustomTagName=&quot;p&quot; runat=&quot;server&quot; /&amp;gt;&lt;/pre&gt;
&lt;p&gt;Then we make both properties editable using a text area by adding a UI hint to each of them.&lt;/p&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;//using EPiServer.Web;

[UIHint(UIHint.Textarea)]
public virtual string Heading { get; set; }

[UIHint(UIHint.Textarea)]
public virtual string Intro { get; set; }&lt;/pre&gt;
&lt;h2&gt;Customise the rendering&lt;/h2&gt;
&lt;p&gt;Moving on to the next requirement, we need to replace line breaks in the Heading property with br tags before rendering it. To do so we can change the rendering of it from using the Property control to using a h1 tag that we turn into a control by adding runat=&quot;server&quot; and an ID to it.&lt;/p&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;&amp;lt;h1 ID=&quot;headingControl&quot; runat=&quot;server&quot;&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;&lt;/pre&gt;
&lt;p&gt;Next, in code behind, we set its InnerHtml to the modified value and make it editable in on-page-editing mode using the ApplyEditAttributes extension method.&lt;/p&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;//using EPiServer.Web;
protected override void OnLoad(EventArgs e)
{
    base.OnLoad(e);

    if (!string.IsNullOrEmpty(CurrentPage.Heading))
    {
        headingControl.InnerHtml = CurrentPage.Heading.Replace(&quot;\n&quot;, &quot;&amp;lt;br /&amp;gt;&quot;);
    }

    headingControl.ApplyEditAttributes&amp;lt;StandardPage&amp;gt;(x =&amp;gt; x.Heading);
}&lt;/pre&gt;
&lt;p&gt;At first it may seem like we&#39;ve solved the challenge. Both properties are editable in on-page-edit mode using text areas and a line break in the Heading property is replaced with a br tag. However, let&#39;s look at what happens when we make a change to the Heading property:&lt;/p&gt;
&lt;p&gt;&lt;img class=&quot;thumbnail-centered&quot; src=&quot;/PageFiles/654/broken_preview.png&quot; alt=&quot;&quot; width=&quot;769&quot; height=&quot;518&quot; /&gt;&lt;/p&gt;
&lt;p&gt;The line break in the Heading property isn&#39;t replaced with a br when the new value is inserted into the page during editing. We&#39;re not meeting the requirement that both properties should offer a realistic preview at all times.&lt;/p&gt;
&lt;p&gt;This happens because the CMS has no way of knowing that we&#39;re customizing the rendering of the property in our view. Instead it updates the DOM node that represents the property with what would be rendered by the Property control.&lt;/p&gt;
&lt;h2&gt;Fixing the preview&lt;/h2&gt;
&lt;p&gt;In order to fix the preview we could go back to rendering the property using the Property control and then modify how either all strings or string properties with a Textarea UI hint are rendered.&lt;/p&gt;
&lt;p&gt;That would however violate the requirement that a line break in the Intro property should not be replaced with a br tag. Therefor we&#39;ll have to find a way to customize only the rendering of the Heading property. Luckily there are a few ways to do that.&lt;/p&gt;
&lt;p&gt;One is to first render it using the Property control and specify a tag using RenderSettings:&lt;/p&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;&amp;lt;EPiServer:Property PropertyName=&quot;Heading&quot; CustomTagName=&quot;h1&quot; runat=&quot;server&quot;&amp;gt;
    &amp;lt;RenderSettings Tag=&quot;LineBreaked&quot; /&amp;gt;
&amp;lt;/EPiServer:Property&amp;gt;&lt;/pre&gt;
&lt;p&gt;Next we create a user control that inherits from PropertyControlBase&amp;lt;string&amp;gt; and add a TemplateDescriptor attribute to it in which we specify the same tag.&lt;/p&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;[TemplateDescriptor(TagString = &quot;LineBreaked&quot;)]
public partial class LineBreaked : PropertyControlBase&amp;lt;string&amp;gt;
{
}&lt;/pre&gt;
&lt;p&gt;Still in code behind for our custom property control we create a property that exposes the original value, which we can retrieve through the CurrentData property, modified the way we like.&lt;/p&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;protected string Formated
{
    get
    {
        if (string.IsNullOrEmpty(CurrentData))
        {
            return string.Empty;
        }
        return CurrentData.Replace(&quot;\n&quot;, &quot;&amp;lt;br /&amp;gt;&quot;);
    }
}&lt;/pre&gt;
&lt;p&gt;Finally, in the markup part of the user control we output the return value of the property.&lt;/p&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;&amp;lt;%= Formated %&amp;gt;&lt;br /&gt;&lt;/pre&gt;
&lt;p&gt;And with that the challenge is solved.&lt;/p&gt;
&lt;p&gt;&lt;img class=&quot;thumbnail-centered&quot; src=&quot;/PageFiles/654/fixed_preview.png&quot; alt=&quot;&quot; width=&quot;766&quot; height=&quot;518&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;Alternative solution&lt;/h2&gt;
&lt;p&gt;Above we change how the Heading property is rendered by specifying a tag when rendering it with the Property control. This works well but it only modifies how the property is rendered, including preview, in a single place.&lt;/p&gt;
&lt;p&gt;If we instead wanted to change how it&#39;s rendered everywhere where the Property control is used we could use an alternative approach - using UI hints.&lt;/p&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;&lt;strong&gt;[UIHint(&quot;LineBreaked&quot;)]&lt;/strong&gt;
[UIHint(UIHint.Textarea&lt;strong&gt;, PresentationLayer.Edit&lt;/strong&gt;)]
public virtual string Heading { get; set; }&lt;/pre&gt;
&lt;p&gt;In the above code we&#39;ve added a second UIHint attribute to the Heading property. This UI hint has the same value as the tag that our custom property control supports, meaning that it will be rendered using our custom control.&lt;/p&gt;
&lt;p&gt;However, we also want the property to be edited using a text area meaning we need to keep the existing UI hint, creating a conflict. To fix that we&amp;nbsp;use an overload of the UIHintAttribute class&#39; constructor and pass it a string representing a &quot;presentation layer&quot;. Specifically the string exposed by the Edit constant in EPiServer&#39;s PresentationLayer class.&lt;/p&gt;
</description>
            <guid>http://joelabrahamsson.com/episerver-editing-delight-challenge-web-forms-solution/</guid>
            <pubDate>Tue, 21 May 2013 05:00:00 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>EPiServer editing delight challenge</title>
            <link>http://joelabrahamsson.com/episerver-editing-delight-challenge/</link>
            <description>Do you consider yourself to be an EPiServer development ninja? Or do you aspire to become one? Then here&#39;s a challenge for you.
&lt;p&gt;In EPiServer 7 On-Page-Editing is the default way of editing a page. An editor clicks on a part of the page that represents a property and can update it using whatever type of editor (textbox, textarea, Tiny MCE etc) is configured for the property. All while almost instantly seeing the updated result on the page.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;For us developers&lt;/strong&gt; the live-preview way of editing pages in EPiServer 7 can present challenges. Especially when the design requires us to somehow modify whatever the editor has entered before rendering it.&lt;/p&gt;
&lt;p&gt;In order to preserve our vocational pride and keep customers happy we need to ensure that the editors get a correct preview of the content.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Putting ourselves&lt;/strong&gt; in the editors shoes, imagine that we edit a page and modify a couple of properties. All while checking how the page looks. Then we publish the page, only to find ourselves looking at something different from what the preview showed us. That wouldn&#39;t be very fun and we&#39;d lose trust in the system.&lt;/p&gt;
&lt;p&gt;On this topic and based on a simple case that I ran into not long ago, here&#39;s a challenge that will test your EPiServer development skills when it comes to rendering properties and your understanding of how EPiServer 7 CMS works.&lt;/p&gt;
&lt;h2&gt;The challenge&lt;/h2&gt;
&lt;p&gt;You have a page type class with two properties:&lt;/p&gt;
&lt;table class=&quot;table table-striped table-bordered&quot; border=&quot;0&quot;&gt;
&lt;thead&gt; 
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Name&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Type&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Element&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/thead&gt; 
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Heading&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;h1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Intro&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;p&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;You have a template for this page type that displays both properties. It should meet the following conditions:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Both properties should be edited using a text area.&lt;/li&gt;
&lt;li&gt;If the Heading property contains line breaks those should be replaced with br tags when it&#39;s rendered, allowing editors to create headings that span multiple lines.&lt;/li&gt;
&lt;li&gt;If the Intro property happens to contain line breaks those should &lt;strong&gt;not&lt;/strong&gt; be replaced. That is, editors should not be able to force new lines in the Intro property.&lt;/li&gt;
&lt;li&gt;Both properties should be editable by clicking on them in on-page-edit mode.&lt;/li&gt;
&lt;li&gt;Both properties should offer a realistic preview at all times.&lt;/li&gt;
&lt;li&gt;The preview of the page should not rely on a full refresh of the page. That is, methods whos name contain&amp;nbsp;&lt;em&gt;FullRefresh&lt;/em&gt; are not allowed.&lt;/li&gt;
&lt;li&gt;You are not allowed to change the types of the properties and you are not allowed to move them to a block.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Here&#39;s an example of how a page that meets these conditions should look in edit mode:&lt;/p&gt;
&lt;p&gt;&lt;img class=&quot;thumbnail-centered&quot; src=&quot;/Global/in_edit_mode.png&quot; alt=&quot;&quot; width=&quot;537&quot; height=&quot;150&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Sounds and looks pretty simple, right? As it turns out, while each requirement on its own is straight forward, combine them and it&#39;s not entirely obvious how to meet them all. Give it a try!&lt;/p&gt;
&lt;h2&gt;Solutions&lt;/h2&gt;
&lt;p&gt;I will post a solution for both MVC and Web Forms in separate articles tomorrow. In the meantime, if you want to have bragging rights for solving this you are welcome to &lt;a href=&quot;mailto:mail@joelabrahamsson.com&quot;&gt;e-mail me&lt;/a&gt; your solution :)&lt;/p&gt;
</description>
            <guid>http://joelabrahamsson.com/episerver-editing-delight-challenge/</guid>
            <pubDate>Mon, 20 May 2013 06:00:00 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>DropDownList Category Picker in EPiServer 7</title>
            <link>http://krompaco.nu/2013/05/dropdownlist-category-picker-in-episerver-7/</link>
            <description>&lt;p&gt;A client needed the editors to be able to select one category from a SELECT box. I knew there were some built-in controls to make things like this easy in EPiServer 7.&lt;/p&gt;&lt;p&gt;Looking around these two posts helped me to find what I think is the best way:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://world.episerver.com/Blogs/Linus-Ekstrom/Dates/2012/9/EPiServer-7-Configuring-editors-for-your-properties/&quot;&gt;EPiServer 7: Configuring editors for your properties by Linus Ekstr&#246;m&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href=&quot;http://joelabrahamsson.com/limiting-content-and-page-reference-properties-to-values-of-a-specific-type-in-episerver-cms/&quot;&gt;A filtered page reference property by Joel Abrahamsson&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In my case I needed the children and grandchildren of a configured root category as possible items.&lt;/p&gt;

&lt;pre class=&quot;prettyprint&quot;&gt;
namespace Krompaco.Project.Site
{
    using System.Collections.Generic;
    using EPiServer.DataAbstraction;
    using EPiServer.Shell.ObjectEditing;

    public class CategorySelectionFactory : ISelectionFactory
    {
        public IEnumerable GetSelections(ExtendedMetadata metadata)
        {
            var list = new List&amp;lt;SelectItem&amp;gt;();
            var root = Category.Find(yourIdInteger);

            foreach (Category country in root.Categories)
            {
                list.Add(new SelectItem
                  {
                     Text = country.LocalizedDescription.ToUpper(),
                     Value = country.ID.ToString()
                  });

                foreach (Category region in country.Categories)
                {
                    list.Add(new SelectItem
                      {
                        Text = region.LocalizedDescription,
                        Value = region.ID.ToString()
                      });
                }
            }

            return list;
        }
    }
}
&lt;/pre&gt;

&lt;p&gt;Then you need to do this to make the UIHint mean something. Seems like there are problems having an &lt;em&gt;int&lt;/em&gt; TargetType but I can live with having the property stored as a string.&lt;/p&gt;

&lt;pre class=&quot;prettyprint&quot;&gt;
namespace Krompaco.Project.Site
{
    using System;
    using System.Collections.Generic;
    using EPiServer.Shell.ObjectEditing;
    using EPiServer.Shell.ObjectEditing.EditorDescriptors;

    [EditorDescriptorRegistration(
        TargetType = typeof(string),
        UIHint = &quot;project-category-select&quot;)]
    public class CategorySelector : EditorDescriptor
    {
        public override void ModifyMetadata(ExtendedMetadata metadata, IEnumerable attributes)
        {
            SelectionFactoryType = typeof(CategorySelectionFactory);
            
            // If on 7.0 and not 7.1 this has a slightly different syntax (more dots)
            ClientEditingClass = &quot;epi-cms/contentediting/editors/SelectionEditor&quot;;

            base.ModifyMetadata(metadata, attributes);
        }
    }
}
&lt;/pre&gt;

&lt;p&gt;Then just decorate properties with the same UIHint like this:&lt;/p&gt;

&lt;pre class=&quot;prettyprint&quot;&gt;
[UIHint(&quot;project-category-select&quot;)]
[Display(
  Name = &quot;Primary category&quot;,
  GroupName = SystemTabNames.Content,
  Order = 900)]
public virtual string PrimaryCategoryId { get; set; }
&lt;/pre&gt;

&lt;p&gt;In Edit Mode you&#39;ll then get a sleek DropDownList like this.&lt;/p&gt;

&lt;p&gt;&lt;img class=&quot;fullwidth-dec&quot; src=&quot;http://krompaco.nu/pagefiles/530/screenshot.png&quot; width=&quot;343&quot; height=&quot;192&quot; alt=&quot;Screenshot of Edit Mode&quot; /&gt;&lt;/p&gt;</description>
            <guid>http://krompaco.nu/2013/05/dropdownlist-category-picker-in-episerver-7/</guid>
            <pubDate>Fri, 17 May 2013 16:18:00 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>Unsupported languages: Arabic, Tigrinya or Chinese characters in SiteSeeker search result using EPiServer</title>
            <link>http://blog.mathiaskunto.com/?p=2480</link>
            <description>The latest version of the SiteSeeker search engine supports indexing and searching in a variety of different languages; however, languages that are not using the latin alphabet, for instance arabic, hebrew, japanese as well as chinese, cannot be indexed. If &amp;#8230; &lt;a href=&quot;http://blog.mathiaskunto.com/2013/05/16/unsupported-languages-arabic-tigrinya-or-chinese-characters-in-siteseeker-search-result-using-episerver/&quot;&gt;Continue reading &lt;span class=&quot;meta-nav&quot;&gt;&amp;#8594;&lt;/span&gt;&lt;/a&gt;</description>
            <guid>http://blog.mathiaskunto.com/?p=2480</guid>
            <pubDate>Thu, 16 May 2013 21:38:09 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>Texts missing inTinyMCE?</title>
            <link>http://world.episerver.com/Blogs/Jonas-Lindau/Dates/2013/5/Texts-missing-inTinyMCE/</link>
            <description>&lt;p&gt;If all captions and tooltips are missing in tinyMCE, there’s good chance you are using themed CSS. Over the years I’ve learned that EPiServer make some assumptions, that not always applies to your reality. &lt;img style=&quot;border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none&quot; class=&quot;wlEmoticon wlEmoticon-smile&quot; alt=&quot;Smile&quot; src=&quot;/Globals/xmlrpc/30201/2013/05/16/wlEmoticon-smile_2.png&quot; /&gt; One of them is that it’s assumed your not using themed CSS on your site. There has been some minor issues with themed CSS over the years, and a new one seems to apply to tinyMCE.&lt;/p&gt;  &lt;p&gt;When I first configured the site to use tinyMCE, it looked like this:&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;/Globals/xmlrpc/30201/2013/05/16/Untitled_2.png&quot;&gt;&lt;img style=&quot;background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px&quot; title=&quot;Untitled&quot; border=&quot;0&quot; alt=&quot;Untitled&quot; src=&quot;/Globals/xmlrpc/30201/2013/05/16/Untitled_thumb.png&quot; width=&quot;650&quot; height=&quot;319&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Firebug to the rescue! Error 500 when loading TinyMCEi18n.aspx can&#228;tbe good, so whats the reason?&lt;/p&gt; &lt;a href=&quot;/Globals/xmlrpc/30201/2013/05/16/Capture.png&quot;&gt;&lt;img style=&quot;background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px&quot; title=&quot;Capture&quot; border=&quot;0&quot; alt=&quot;Capture&quot; src=&quot;/Globals/xmlrpc/30201/2013/05/16/Capture_thumb.png&quot; width=&quot;937&quot; height=&quot;191&quot; /&gt;&lt;/a&gt;   &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;So how to solve this?&lt;/p&gt;  &lt;p&gt;Well, you could edit the aspx-page and turn of theming, but chances are you apply a hot fix or service pack that overwrites your custom changes. I thought a better way was to turn theming off for that specific location using web.config. Since the file resides in /util/, you can solve this by editing the &amp;lt;location path=&amp;quot;util&amp;quot;&amp;gt;-section as below:&lt;/p&gt;  &lt;p&gt;&amp;lt;location path=&amp;quot;util&amp;quot;&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;system.web&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;strong&gt;&amp;lt;pages theme=&amp;quot;&amp;quot;&amp;gt;&lt;/strong&gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/pages&amp;gt;     &lt;br /&gt;&amp;#160; &amp;lt;system.web&amp;gt;     &lt;br /&gt;&amp;lt;location&amp;gt;&lt;/p&gt;  &lt;p&gt;Save the file, and then tinyMCE should look great!&lt;/p&gt;</description>
            <guid>http://world.episerver.com/Blogs/Jonas-Lindau/Dates/2013/5/Texts-missing-inTinyMCE/</guid>
            <pubDate>Thu, 16 May 2013 13:37:48 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>Using the REST API of ImageVault</title>
            <link>http://dhvik.blogspot.com/2013/05/using-rest-api-of-imagevault.html</link>
            <description>In ImageVault 4 we introduced a REST API for the ImageVault Core service. This will show a small example on how to use that.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Javascript&lt;/h3&gt;&lt;div&gt;This example uses javascript and the javascript classes that are included in the ImageVault installation (in the UI). I will use the scripts that are located on the beta installation but you can use the ones that are on your installation as well.&lt;/div&gt;&lt;div&gt;We need three scripts, jquery, json2 and ImageVault.Client. ImageVault.Client handles authentication and CORS logic for the app.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&amp;lt;script&amp;nbsp;type=&quot;text/javascript&quot; src=&quot;https://imagevault.se/beta/ImageVault/Scripts/lib/jquery-1.6.1.js&quot; &amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;https://imagevault.se/beta/ImageVault/Scripts/lib/json2.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;https://imagevault.se/beta/ImageVault/Scripts/ImageVault.Client.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;h3&gt;Client&lt;/h3&gt;&lt;div&gt;To connect to core we need the javascript client.&lt;/div&gt;&lt;pre&gt;var core = new ImageVault.Client({&lt;br /&gt; authUrl: &quot;https://imagevault.se/beta/ImageVaultIdp/http.issue&quot;,&lt;br /&gt; realm: &quot;https://imagevault.se:1234&quot;,&lt;br /&gt; username: &quot;demouser&quot;,&lt;br /&gt; password: &quot;P@55w0rd!&quot;&lt;br /&gt;});&lt;br /&gt;&lt;/pre&gt;&lt;div&gt;The core client is created using the following parameters &lt;/div&gt;&lt;dl&gt;&lt;dt&gt;authUrl&lt;/dt&gt;&lt;dd&gt;This is the url to the Idp endpoint that can issue a ticket to be used with the core calls. Authentication uses federated authentication&lt;/dd&gt;&lt;dt&gt;realm&lt;/dt&gt;&lt;dd&gt;This is the url to core and also instructs the Idp on who the recipient of the ticket is.&lt;/dd&gt;&lt;dt&gt;username/password&lt;/dt&gt;&lt;dd&gt;the username and password of the user.&lt;/dd&gt;&lt;/dl&gt;&lt;h3&gt;Authentication&lt;/h3&gt;&lt;div&gt;We use federated authentication and to be able to call the services you need to have an authentication ticket. To get the ticket you need to authenticate vs the IdentityProvider (Idp). This is handled by the ImageVault.Client script. Also reissuing of tickets when they exipire are handled by the client script.&lt;/div&gt;&lt;h3&gt;API calls to Core&lt;/h3&gt;&lt;div&gt;To call the REST API we use the json method of the client that performs an authenticated call to the core.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;pre&gt;core.json(&quot;MediaService/Find&quot;, {&lt;br /&gt;  Filter: { SearchString: searchString },&lt;br /&gt;  Populate: {&lt;br /&gt;    MediaFormats: [&lt;br /&gt;      //Thumbnail format&lt;br /&gt;      {  &lt;br /&gt;        $type: &quot;ImageVault.Common.Data.ThumbnailFormat,ImageVault.Common&quot;, &lt;br /&gt;        Effects:[&lt;br /&gt;          {$type:&quot;ImageVault.Common.Data.Effects.ResizeEffect, ImageVault.Common&quot;,Width:200,Height:200,ResizeMode:&#39;ScaleToFill&#39;}&lt;br /&gt;        ]&lt;br /&gt;      }&lt;br /&gt;    ]&lt;br /&gt;  }    &lt;br /&gt;}, function (d) {&lt;br /&gt;  alert(JSON.stringify(d));&lt;br /&gt;});&lt;br /&gt;&lt;/pre&gt;&lt;div&gt;The json call uses the following parameters&lt;br /&gt;&lt;dl&gt;&lt;dt&gt;path&lt;/dt&gt;&lt;dd&gt;The service/method to call. Name of the service is the same as the interface (omit the leading I)&lt;/dd&gt;&lt;dt&gt;arguments&lt;/dt&gt;&lt;dd&gt;the arguments to the service method as a javascript object. If the method takes multiple arguments, wrap them in a single object (.e {arg1:&#39;test&#39;,arg2:&#39;test2&#39;} )&lt;/dd&gt;&lt;dt&gt;success callback&lt;/dt&gt;&lt;dd&gt;The function to call when the service call is done. The argument to the function is the return value of the service method.&lt;/dd&gt;&lt;/dl&gt;&lt;/div&gt;&lt;div&gt;The services are documented&amp;nbsp;&lt;a href=&quot;http://imagevault.se/DeveloperDocumentation/Reference/html/N_ImageVault_Common_Services.htm&quot; target=&quot;_blank&quot;&gt;at the ImageVault API reference documentation&lt;/a&gt;. The full ImageVault developer documentation can be found at&amp;nbsp;&lt;a href=&quot;http://imagevault.se/doc&quot; target=&quot;_blank&quot;&gt;http://imagevault.se/doc&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can test a fully fledged demo below that uses the ImageVault demo site scripts and content that performs a search and displays the thumbnail media&lt;/div&gt;&lt;!--DEMO starts here--&gt;&lt;script src=&quot;https://imagevault.se/beta/ImageVault/Scripts/lib/jquery-1.6.1.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;&lt;script src=&quot;https://imagevault.se/beta/ImageVault/Scripts/lib/json2.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;&lt;script src=&quot;https://imagevault.se/beta/ImageVault/Scripts/ImageVault.Client.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt; &lt;script type=&quot;text/javascript&quot;&gt;$(document).ready(function () {   var core = new ImageVault.Client({     authUrl: &quot;https://imagevault.se/beta/ImageVaultIdp/http.issue&quot;,     realm: &quot;https://imagevault.se:1234&quot;,     username: &quot;demouser&quot;,     password: &quot;P@55w0rd!&quot;   });   //trigger enter on search form   $(&quot;#coreSearchString&quot;).keyup(function(event){     if(event.keyCode == 13){       $(&quot;#coreSearch&quot;).click();     }   });   $(&quot;#coreSearch&quot;).click(function () {     var searchString = $(&quot;#coreSearchString&quot;).val();     $(&quot;#searchResultInfo&quot;).text(&quot;searching for &quot; + searchString);     $(&quot;#searchResult&quot;).text(&quot;&quot;);     core.json(&quot;MediaService/Find&quot;, {       Filter: { SearchString: searchString },       Populate: {         MediaFormats: [           //Thumbnail format           {               $type: &quot;ImageVault.Common.Data.ThumbnailFormat,ImageVault.Common&quot;,              Effects:[{$type:&quot;ImageVault.Common.Data.Effects.ResizeEffect, ImageVault.Common&quot;,Width:200,Height:200,ResizeMode:&#39;ScaleToFill&#39;}]           }         ]       }         }, function (d) {       $(&quot;#searchResultInfo&quot;).text(&quot;Found &quot; + d.length + &quot; hits.&quot;);       for (var i = 0; i &lt; d.length; i++) {         var item = d[i];         var thumbnail = item.MediaConversions[0];         $(&quot;#searchResult&quot;).append(&quot;&lt;div style=&#39;float:left;text-align:center;&#39;&gt;&lt;img src=&#39;&quot; + thumbnail.Url + &quot;&#39;/&gt;&lt;br/&gt;&quot;+item.Name+&quot;&lt;/div&gt;&quot;);       }     });   }); }); &lt;/script&gt;&lt;br /&gt;&lt;h1&gt;Demo&lt;/h1&gt;&lt;input id=&quot;coreSearchString&quot; type=&quot;text&quot; value=&quot;P1&quot; /&gt;  &lt;button id=&quot;coreSearch&quot;&gt;Search media&lt;/button&gt;  &lt;br /&gt;</description>
            <guid>http://dhvik.blogspot.com/2013/05/using-rest-api-of-imagevault.html</guid>
            <pubDate>Thu, 16 May 2013 11:32:00 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>5 years of EPiServer World awesomeness</title>
            <link>http://www.epinova.no/blog/arild-henrichsen/dates/2013/5/5-years-of-episerver-world-awesomeness/</link>
            <description>Celebrating its 5th online anniversary by passing 19000 members, EPiServer World continues to be a hub of great resources for developers, site owners and marketers.</description>
            <guid>http://www.epinova.no/blog/arild-henrichsen/dates/2013/5/5-years-of-episerver-world-awesomeness/</guid>
            <pubDate>Fri, 10 May 2013 14:54:34 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>Adding Cross Site Scripting protection in EPiServer CMS with .NET 4.0</title>
            <link>http://www.epinova.no/blog/Kjetil-Simensen/dates/2013/5/adding-cross-site-scripting-protection-in-episerver-cms-with-net-40/</link>
            <description>The built-in Request Validation feature in .NET 4.0 can help protect your EPiServer sites from Cross Site Scripting (XSS) attacks.</description>
            <guid>http://www.epinova.no/blog/Kjetil-Simensen/dates/2013/5/adding-cross-site-scripting-protection-in-episerver-cms-with-net-40/</guid>
            <pubDate>Fri, 10 May 2013 08:31:22 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>Render ContentArea with temporarily content</title>
            <link>http://world.episerver.com/Blogs/Anders-Hattestad/Dates/2013/5/Render-ContentArea-with-temporarily-content/</link>
            <description>&lt;p&gt;&lt;span style=&quot;background-color: #ffffff; color: #000000;&quot;&gt;One nice feature in EPiServer 7 is the ability to render content based on tags and type.&amp;nbsp; But sometimes you want to add temporary items to a collection and then render them. This can be a RSS feed, or if you want to add one link list with and existing ContentArea.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;background-color: #ffffff; color: #000000;&quot;&gt;The problem is that temporary items will not be rendered thru the PropertyContentAreaControl. So if you add some temporarily items like some RSS articles it will not render.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;background-color: #ffffff; color: #000000;&quot;&gt;You can add IContent to a ContentArea, but internally it is stored as content reference, and the object is not preserved. It basically add the content Reference ID, and then when you render it it gets the content again. That means you cant manipulate the IContent items before you render them. Personally I think this behaviour is a bit odd, and makes it a bit harder to do cool stuff &lt;img class=&quot;wlEmoticon wlEmoticon-smile&quot; style=&quot;border-style: none;&quot; src=&quot;/Globals/xmlrpc/25266/2013/05/08/wlEmoticon-smile_2.png&quot; alt=&quot;Smilefjes&quot; /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style=&quot;background-color: #ffffff; color: #000000;&quot;&gt;Create temporarily content&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;span style=&quot;background-color: #ffffff;&quot;&gt;&lt;span&gt;Before it was possible to create pages and add them to a page list. You had to add the ACL to the page so it was not filtered out.&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div id=&quot;scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:84d019f2-44f5-4e0d-8b6e-4bc669981e6b&quot; class=&quot;wlWriterEditableSmartContent&quot; style=&quot;float: none; margin: 0px; display: inline; padding: 0px;&quot;&gt;
&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, Monospace; font-size: 10pt;&quot;&gt;
&lt;div style=&quot;font-family: Verdana, Tahoma, Arial, sans-serif; font-weight: bold; padding: 2px 5px;&quot;&gt;Code Snippet&lt;/div&gt;
&lt;div style=&quot;background: #fff; max-height: 300px; overflow: auto;&quot;&gt;&lt;ol style=&quot;background: #ffffff; margin: 0; padding: 0 0 0 5px; white-space: nowrap;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;var&lt;/span&gt; page = &lt;span style=&quot;color: #0000ff;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;TempPageType&lt;/span&gt;();&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;page.Property.Add(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;PageTypeID&quot;&lt;/span&gt;, &lt;span style=&quot;color: #0000ff;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;PropertyNumber&lt;/span&gt;(pageID));&lt;/li&gt;
&lt;li&gt;page.Property.Add(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;PageLink&quot;&lt;/span&gt;, &lt;span style=&quot;color: #0000ff;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;PropertyPageReference&lt;/span&gt;(&lt;span style=&quot;color: #2b91af;&quot;&gt;PageReference&lt;/span&gt;.EmptyReference));&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;page.Property.Add(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;PagePendingPublish&quot;&lt;/span&gt;, &lt;span style=&quot;color: #0000ff;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;PropertyBoolean&lt;/span&gt;(&lt;span style=&quot;color: #0000ff;&quot;&gt;false&lt;/span&gt;));&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;page.Property.Add(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;PageWorkStatus&quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;PropertyNumber&lt;/span&gt;(&lt;span style=&quot;color: #2b91af;&quot;&gt;Convert&lt;/span&gt;.ToInt32(&lt;span style=&quot;color: #2b91af;&quot;&gt;VersionStatus&lt;/span&gt;.Published)));&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;page.ACL.Add(&lt;span style=&quot;color: #0000ff;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;AccessControlEntry&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Everyone&quot;&lt;/span&gt;, &lt;span style=&quot;color: #2b91af;&quot;&gt;AccessLevel&lt;/span&gt;.Read));&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span style=&quot;background-color: #ffffff;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;background-color: #ffffff; color: #000000;&quot;&gt;In EPiServer 7 you have to register this page type and also add the PageTypeID to the temporarily page&lt;/span&gt;&lt;/p&gt;
&lt;div id=&quot;scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:5a728c0b-8ea0-4c8b-9109-eb058b245005&quot; class=&quot;wlWriterEditableSmartContent&quot; style=&quot;float: none; margin: 0px; display: inline; padding: 0px;&quot;&gt;
&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, Monospace; font-size: 10pt;&quot;&gt;
&lt;div style=&quot;font-family: Verdana, Tahoma, Arial, sans-serif; font-weight: bold; padding: 2px 5px;&quot;&gt;Code Snippet&lt;/div&gt;
&lt;div style=&quot;background: #ddd; max-height: 300px; overflow: auto;&quot;&gt;&lt;ol style=&quot;background: #ffffff; margin: 0 0 0 2em; padding: 0 0 0 5px;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;var&lt;/span&gt; repository = &lt;span style=&quot;color: #2b91af;&quot;&gt;ServiceLocator&lt;/span&gt;.Current.GetInstance&amp;lt;&lt;span style=&quot;color: #2b91af;&quot;&gt;IContentTypeRepository&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #2b91af;&quot;&gt;PageType&lt;/span&gt;&amp;gt;&amp;gt;();&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;var&lt;/span&gt; pageType = repository.Load(&lt;span style=&quot;color: #0000ff;&quot;&gt;typeof&lt;/span&gt;(&lt;span style=&quot;color: #2b91af;&quot;&gt;TempPageType&lt;/span&gt;));&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;var&lt;/span&gt; pageID=-1;&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;if&lt;/span&gt; (pageType!=&lt;span style=&quot;color: #0000ff;&quot;&gt;null&lt;/span&gt;)&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;pageID=pageType.ID;&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;page.Property.Add(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;PageTypeID&quot;&lt;/span&gt;, &lt;span style=&quot;color: #0000ff;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;PropertyNumber&lt;/span&gt;(pageID));&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span style=&quot;background-color: #ffffff;&quot;&gt;And then register the page type.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div id=&quot;scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:efffc6fd-d239-4864-997a-44549870adab&quot; class=&quot;wlWriterEditableSmartContent&quot; style=&quot;float: none; margin: 0px; display: inline; padding: 0px;&quot;&gt;
&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, Monospace; font-size: 10pt;&quot;&gt;
&lt;div style=&quot;font-family: Verdana, Tahoma, Arial, sans-serif; font-weight: bold; padding: 2px 5px;&quot;&gt;Code Snippet&lt;/div&gt;
&lt;div style=&quot;background: #fff; max-height: 300px; overflow: auto;&quot;&gt;&lt;ol style=&quot;background: #ffffff; margin: 0; padding: 0 0 0 5px; white-space: nowrap;&quot;&gt;
&lt;li&gt;[&lt;span style=&quot;color: #2b91af;&quot;&gt;ContentType&lt;/span&gt;(GUID = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;454E47D6-BC76-4596-BC03-8BA519BB4650&quot;&lt;/span&gt;, GroupName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Default&quot;&lt;/span&gt;,AvailableInEditMode=&lt;span style=&quot;color: #0000ff;&quot;&gt;false&lt;/span&gt;)]&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&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; &lt;span style=&quot;color: #2b91af;&quot;&gt;TempPageType&lt;/span&gt; : &lt;span style=&quot;color: #2b91af;&quot;&gt;SitePageData&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;{&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[&lt;span style=&quot;color: #2b91af;&quot;&gt;Ignore&lt;/span&gt;]&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;virtual&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;object&lt;/span&gt; InnerObject { &lt;span style=&quot;color: #0000ff;&quot;&gt;get&lt;/span&gt;; &lt;span style=&quot;color: #0000ff;&quot;&gt;set&lt;/span&gt;; }&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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.Security.&lt;span style=&quot;color: #2b91af;&quot;&gt;ISecurityDescriptor&lt;/span&gt; GetSecurityDescriptor()&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #2b91af;&quot;&gt;PageReference&lt;/span&gt;.IsNullOrEmpty(PageLink))&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;OwnSecurityDescriptor&lt;/span&gt;();&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;base&lt;/span&gt;.GetSecurityDescriptor();&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;}&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: #2b91af;&quot;&gt;OwnSecurityDescriptor&lt;/span&gt;:&lt;span style=&quot;color: #2b91af;&quot;&gt;ISecurityDescriptor&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;{&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;AccessLevel&lt;/span&gt; GetAccessLevel(&lt;span style=&quot;color: #2b91af;&quot;&gt;IPrincipal&lt;/span&gt; principal)&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;AccessLevel&lt;/span&gt;.FullAccess;&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;bool&lt;/span&gt; HasAccess(&lt;span style=&quot;color: #2b91af;&quot;&gt;IPrincipal&lt;/span&gt; principal, &lt;span style=&quot;color: #2b91af;&quot;&gt;AccessLevel&lt;/span&gt; access)&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;true&lt;/span&gt;;&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/li&gt;
&lt;li&gt;}&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;background-color: #ffffff;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style=&quot;background-color: #ffffff;&quot;&gt;To render&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;background-color: #ffffff;&quot;&gt;The solution is to make your own render of a List of IContent&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;background-color: #ffffff;&quot;&gt;Lucky for us it’s still easy to look at the current code using Reflector or some other app. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;background-color: #ffffff;&quot;&gt;This code will take a list of IContent and render them accordingly to the tags. So you can use it like this, where Result is a List&amp;lt;IContent&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;div id=&quot;scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:ff25dbbc-3654-4779-b4dc-4a3136f278cf&quot; class=&quot;wlWriterEditableSmartContent&quot; style=&quot;float: none; margin: 0px; display: inline; padding: 0px;&quot;&gt;
&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, Monospace; font-size: 10pt;&quot;&gt;
&lt;div style=&quot;font-family: Verdana, Tahoma, Arial, sans-serif; font-weight: bold; padding: 2px 5px;&quot;&gt;Code Snippet&lt;/div&gt;
&lt;div style=&quot;background: #fff; max-height: 300px; overflow: auto;&quot;&gt;&lt;ol style=&quot;background: #ffffff; margin: 0; padding: 0 0 0 5px; white-space: nowrap;&quot;&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;bool&lt;/span&gt; AddResult2Container(&lt;span style=&quot;color: #2b91af;&quot;&gt;Control&lt;/span&gt; container,&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;string&lt;/span&gt; tag, &lt;span style=&quot;color: #0000ff;&quot;&gt;bool&lt;/span&gt; add_Ul_Li)&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;{&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;var&lt;/span&gt; haveContent = &lt;span style=&quot;color: #0000ff;&quot;&gt;false&lt;/span&gt;;&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;var&lt;/span&gt; result = &lt;span style=&quot;color: #0000ff;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;RenderContentArea&lt;/span&gt;() { Data = Result };&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;result.Tag = tag;&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;if&lt;/span&gt; (add_Ul_Li)&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;result.TagName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;ul&quot;&lt;/span&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;result.TagChildName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;li&quot;&lt;/span&gt;;&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;container.Controls.Add(result);&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;haveContent = result.CreateContent();&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;return&lt;/span&gt; haveContent;&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;}&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span style=&quot;background-color: #ffffff;&quot;&gt;The code that runs is this&lt;/span&gt;&lt;/p&gt;
&lt;div id=&quot;scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:8e27801d-557c-4a9a-894e-9ca18dc1a16c&quot; class=&quot;wlWriterEditableSmartContent&quot; style=&quot;float: none; margin: 0px; display: inline; padding: 0px;&quot;&gt;
&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, Monospace; font-size: 10pt;&quot;&gt;
&lt;div style=&quot;font-family: Verdana, Tahoma, Arial, sans-serif; font-weight: bold; padding: 2px 5px;&quot;&gt;Code Snippet&lt;/div&gt;
&lt;div style=&quot;background: #ddd; max-height: 300px; overflow: auto;&quot;&gt;&lt;ol style=&quot;background: #ffffff; margin: 0 0 0 3em; padding: 0 0 0 5px; white-space: nowrap;&quot;&gt;
&lt;li&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; &lt;span style=&quot;color: #2b91af;&quot;&gt;RenderContentArea&lt;/span&gt; : &lt;span style=&quot;color: #2b91af;&quot;&gt;PlaceHolder&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;{&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;List&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #2b91af;&quot;&gt;IContent&lt;/span&gt;&amp;gt; Data { &lt;span style=&quot;color: #0000ff;&quot;&gt;get&lt;/span&gt;; &lt;span style=&quot;color: #0000ff;&quot;&gt;set&lt;/span&gt;; }&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;string&lt;/span&gt; TagName { &lt;span style=&quot;color: #0000ff;&quot;&gt;get&lt;/span&gt;; &lt;span style=&quot;color: #0000ff;&quot;&gt;set&lt;/span&gt;; }&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;string&lt;/span&gt; TagChildName { &lt;span style=&quot;color: #0000ff;&quot;&gt;get&lt;/span&gt;; &lt;span style=&quot;color: #0000ff;&quot;&gt;set&lt;/span&gt;; }&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;string&lt;/span&gt; ItemCssClass { &lt;span style=&quot;color: #0000ff;&quot;&gt;get&lt;/span&gt;; &lt;span style=&quot;color: #0000ff;&quot;&gt;set&lt;/span&gt;; }&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;string&lt;/span&gt; ItemChildCssClass { &lt;span style=&quot;color: #0000ff;&quot;&gt;get&lt;/span&gt;; &lt;span style=&quot;color: #0000ff;&quot;&gt;set&lt;/span&gt;; }&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;string&lt;/span&gt; Tag { &lt;span style=&quot;color: #0000ff;&quot;&gt;get&lt;/span&gt;; &lt;span style=&quot;color: #0000ff;&quot;&gt;set&lt;/span&gt;; }&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;ContentControlResolver&lt;/span&gt; _contentControlResolver;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;ContentControlResolver&lt;/span&gt; ContentControlResolver&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;get&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;ContentControlResolver&lt;/span&gt; arg_1D_0;&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;if&lt;/span&gt; ((arg_1D_0 = &lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;._contentControlResolver) == &lt;span style=&quot;color: #0000ff;&quot;&gt;null&lt;/span&gt;)&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;arg_1D_0 = (&lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;._contentControlResolver = &lt;span style=&quot;color: #2b91af;&quot;&gt;ServiceLocator&lt;/span&gt;.Current.GetInstance&amp;lt;&lt;span style=&quot;color: #2b91af;&quot;&gt;ContentControlResolver&lt;/span&gt;&amp;gt;());&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;return&lt;/span&gt; arg_1D_0;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;set&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;._contentControlResolver = &lt;span style=&quot;color: #0000ff;&quot;&gt;value&lt;/span&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;protected&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;IList&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #2b91af;&quot;&gt;Control&lt;/span&gt;&amp;gt; GetContentRenderers2()&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;if&lt;/span&gt; (Data == &lt;span style=&quot;color: #0000ff;&quot;&gt;null&lt;/span&gt; || Data.Count&amp;lt;&lt;span style=&quot;color: #2b91af;&quot;&gt;IContent&lt;/span&gt;&amp;gt;() == 0)&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;List&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #2b91af;&quot;&gt;Control&lt;/span&gt;&amp;gt;();&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;string&lt;/span&gt; itemTagName = TagChildName;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;string&lt;/span&gt; itemCssClass = ItemChildCssClass;&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;return&lt;/span&gt; ResolveContentControls(&lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;, &lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;.Tag, itemCssClass, itemTagName);&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;virtual&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Injected&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #2b91af;&quot;&gt;TemplateControlLoader&lt;/span&gt;&amp;gt; TemplateControlLoader&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;get&lt;/span&gt;;&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;set&lt;/span&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;WebFormsContentValidator&lt;/span&gt; _contentValidator;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;virtual&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;WebFormsContentValidator&lt;/span&gt; ContentValidator&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;get&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;WebFormsContentValidator&lt;/span&gt; arg_1D_0;&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;if&lt;/span&gt; ((arg_1D_0 = &lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;._contentValidator) == &lt;span style=&quot;color: #0000ff;&quot;&gt;null&lt;/span&gt;)&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;arg_1D_0 = (&lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;._contentValidator = &lt;span style=&quot;color: #2b91af;&quot;&gt;ServiceLocator&lt;/span&gt;.Current.GetInstance&amp;lt;&lt;span style=&quot;color: #2b91af;&quot;&gt;WebFormsContentValidator&lt;/span&gt;&amp;gt;());&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;return&lt;/span&gt; arg_1D_0;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;set&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;._contentValidator = &lt;span style=&quot;color: #0000ff;&quot;&gt;value&lt;/span&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;virtual&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;IList&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #2b91af;&quot;&gt;Control&lt;/span&gt;&amp;gt; ResolveContentControls( &lt;span style=&quot;color: #2b91af;&quot;&gt;Control&lt;/span&gt; parentControl, &lt;span style=&quot;color: #0000ff;&quot;&gt;string&lt;/span&gt; tag, &lt;span style=&quot;color: #0000ff;&quot;&gt;string&lt;/span&gt; itemCssClass, &lt;span style=&quot;color: #0000ff;&quot;&gt;string&lt;/span&gt; itemTagName)&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;IContentFilter&lt;/span&gt; filter = &lt;span style=&quot;color: #0000ff;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;FilterContentForVisitor&lt;/span&gt;(&lt;span style=&quot;color: #2b91af;&quot;&gt;TemplateTypeCategories&lt;/span&gt;.WebFormsPartial, tag);&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;List&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #2b91af;&quot;&gt;Control&lt;/span&gt;&amp;gt; list = &lt;span style=&quot;color: #0000ff;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;List&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #2b91af;&quot;&gt;Control&lt;/span&gt;&amp;gt;();&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;IEnumerable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #2b91af;&quot;&gt;IContent&lt;/span&gt;&amp;gt; source = Data;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;IEnumerable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #2b91af;&quot;&gt;IContent&lt;/span&gt;&amp;gt; enumerable =&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;from&lt;/span&gt; c &lt;span style=&quot;color: #0000ff;&quot;&gt;in&lt;/span&gt; source&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;where&lt;/span&gt;&amp;nbsp;&amp;nbsp;!filter.ShouldFilter(c)&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;select&lt;/span&gt; c;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;foreach&lt;/span&gt; (&lt;span style=&quot;color: #2b91af;&quot;&gt;IContent&lt;/span&gt; current &lt;span style=&quot;color: #0000ff;&quot;&gt;in&lt;/span&gt; enumerable)&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;Control&lt;/span&gt; control = &lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;.TemplateControlLoader.Service.LoadControl(&lt;span style=&quot;color: #2b91af;&quot;&gt;HttpContext&lt;/span&gt;.Current.ContextBaseOrNull(), current, parentControl.TemplateControl, tag);&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;.ContentValidator.ExistInControlHierarchy(parentControl, current, control))&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #008000;&quot;&gt;//if (enableEditFeatures)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #008000;&quot;&gt;//{&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #008000;&quot;&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;HtmlGenericControl item = this.BuildCircularReferenceControl(current, itemTagName, itemCssClass);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #008000;&quot;&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;list.Add(item);&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #008000;&quot;&gt;//}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;else&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;IVersionable&lt;/span&gt; versionable = current &lt;span style=&quot;color: #0000ff;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;IVersionable&lt;/span&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;if&lt;/span&gt; (versionable == &lt;span style=&quot;color: #0000ff;&quot;&gt;null&lt;/span&gt; || versionable.Status == &lt;span style=&quot;color: #2b91af;&quot;&gt;VersionStatus&lt;/span&gt;.Published)&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;ContentRenderer&lt;/span&gt; item2 = &lt;span style=&quot;color: #0000ff;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;ContentRenderer&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CurrentControl = control,&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CurrentData = current,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CurrentContent = current,&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Tag = tag,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CustomTagName = itemTagName,&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CssClass = itemCssClass,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;TemplateControlLoader = &lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;.TemplateControlLoader,&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;RenderType =&lt;span style=&quot;color: #2b91af;&quot;&gt;RenderType&lt;/span&gt;.Default&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;};&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;list.Add(item2);&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;return&lt;/span&gt; list;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;bool&lt;/span&gt; CreateContent()&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;string&lt;/span&gt; containerTagName = (!&lt;span style=&quot;color: #0000ff;&quot;&gt;string&lt;/span&gt;.IsNullOrEmpty(TagName)) ? TagName : &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;div&quot;&lt;/span&gt;;&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;System.Collections.Generic.&lt;span style=&quot;color: #2b91af;&quot;&gt;IList&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #2b91af;&quot;&gt;Control&lt;/span&gt;&amp;gt; contentRenderers = &lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;.GetContentRenderers2();&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;Control&lt;/span&gt; control = CreateMainContainer(containerTagName);&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;foreach&lt;/span&gt; (&lt;span style=&quot;color: #2b91af;&quot;&gt;Control&lt;/span&gt; current &lt;span style=&quot;color: #0000ff;&quot;&gt;in&lt;/span&gt; contentRenderers)&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;control.Controls.Add(current);&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;ContentRenderer&lt;/span&gt; contentRenderer = current &lt;span style=&quot;color: #0000ff;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;ContentRenderer&lt;/span&gt;;&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;if&lt;/span&gt; (contentRenderer != &lt;span style=&quot;color: #0000ff;&quot;&gt;null&lt;/span&gt;)&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;contentRenderer.EnsureChildControlsCreated();&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;if&lt;/span&gt; (contentRenderers.Count &amp;gt; 0)&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;true&lt;/span&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;false&lt;/span&gt;;&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;protected&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;HtmlGenericControl&lt;/span&gt; CreateMainContainer( &lt;span style=&quot;color: #0000ff;&quot;&gt;string&lt;/span&gt; containerTagName)&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;HtmlGenericControl&lt;/span&gt; htmlGenericControl = &lt;span style=&quot;color: #0000ff;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;HtmlGenericControl&lt;/span&gt;(containerTagName);&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;.Controls.Add(htmlGenericControl);&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #008000;&quot;&gt;//if (enableEditFeatures)&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #008000;&quot;&gt;//{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #008000;&quot;&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;base.ApplyEditAttributes();&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #008000;&quot;&gt;//}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0000ff;&quot;&gt;return&lt;/span&gt; htmlGenericControl;&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;background: #f3f3f3;&quot;&gt;}&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
            <guid>http://world.episerver.com/Blogs/Anders-Hattestad/Dates/2013/5/Render-ContentArea-with-temporarily-content/</guid>
            <pubDate>Wed, 08 May 2013 09:16:31 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>EPiServer 7: Strongly typed page types in FPWC</title>
            <link>http://world.episerver.com/Blogs/Dan-Matthews/Dates/2013/5/EPiServer-7-Strongly-typed-page-types-in-FPWC/</link>
            <description>&lt;p&gt;No, not really :) FindPagesWithCriteria (FPWC) is still the same beast it always was. For those of us who used PageTypeBuilder a lot, you will have worked with the page type resolver that allowed us to – at the very least – turn a strongly typed page type into a page type ID and feed it into FPWC.&lt;/p&gt;  &lt;p&gt;EPiServer 7 provider the same feature as well. For example, let’s say we have a method to get all children of type ‘StandardPage’. We use the content type repository to ‘resolve’ the page type ID:&lt;/p&gt;  &lt;pre class=&quot;code&quot;&gt;&lt;span style=&quot;color: blue&quot;&gt;private &lt;/span&gt;&lt;span style=&quot;color: #2b91af&quot;&gt;IEnumerable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #2b91af&quot;&gt;StandardPage&lt;/span&gt;&amp;gt; GetPosts()
{
    &lt;span style=&quot;color: #2b91af&quot;&gt;PropertyCriteriaCollection &lt;/span&gt;criterias = &lt;span style=&quot;color: blue&quot;&gt;new &lt;/span&gt;&lt;span style=&quot;color: #2b91af&quot;&gt;PropertyCriteriaCollection&lt;/span&gt;();
    &lt;span style=&quot;color: #2b91af&quot;&gt;PropertyCriteria &lt;/span&gt;criteria = &lt;span style=&quot;color: blue&quot;&gt;new &lt;/span&gt;&lt;span style=&quot;color: #2b91af&quot;&gt;PropertyCriteria&lt;/span&gt;();
    criteria.Condition = &lt;span style=&quot;color: #2b91af&quot;&gt;CompareCondition&lt;/span&gt;.Equal;
    criteria.Name = &lt;span style=&quot;color: #a31515&quot;&gt;&amp;quot;PageTypeID&amp;quot;&lt;/span&gt;;
    criteria.Type = &lt;span style=&quot;color: #2b91af&quot;&gt;PropertyDataType&lt;/span&gt;.PageType;
    criteria.Value = Locate.ContentTypeRepository().Load&amp;lt;&lt;span style=&quot;color: #2b91af&quot;&gt;StandardPage&lt;/span&gt;&amp;gt;().ID.ToString();
    criteria.Required = &lt;span style=&quot;color: blue&quot;&gt;true&lt;/span&gt;;
    criterias.Add(criteria);
    &lt;span style=&quot;color: blue&quot;&gt;var &lt;/span&gt;posts = Locate.PageCriteriaQueryService().FindPagesWithCriteria(CurrentPage.ContentLink &lt;span style=&quot;color: blue&quot;&gt;as &lt;/span&gt;&lt;span style=&quot;color: #2b91af&quot;&gt;PageReference&lt;/span&gt;, criterias).Cast&amp;lt;&lt;span style=&quot;color: #2b91af&quot;&gt;StandardPage&lt;/span&gt;&amp;gt;();
    &lt;span style=&quot;color: blue&quot;&gt;return &lt;/span&gt;EPiServer.Filters.&lt;span style=&quot;color: #2b91af&quot;&gt;FilterForVisitor&lt;/span&gt;.Filter(posts).Cast&amp;lt;&lt;span style=&quot;color: #2b91af&quot;&gt;StandardPage&lt;/span&gt;&amp;gt;();
}&lt;/pre&gt;
&lt;p&gt;This works, and is as performant as FPWC is, but we have a problem with inheritance. What if we had a ‘DetailPage’ that is inherited from ‘StandardPage’? Because FPWC requires a page type ID, this won’t help us. We’ll only ever get StandardPage items back, never DetailPage ones. We could do two FPWC calls of course, but now we’re getting messy.&lt;/p&gt;
&lt;p&gt;So what’s the alternative? In old-style code the temptation would be to grab all the descendants then filter them ‘after the event’. You can do this using LINQ (bearing in mind that it’s actually still enumerating behind the scenes – this is not a highly performant way of doing things). At least the code is clean and we are dealing with real strong types so we respect inheritance – no need for page type IDs.&lt;/p&gt;
&lt;pre class=&quot;code&quot;&gt;&lt;span style=&quot;color: blue&quot;&gt;private &lt;/span&gt;&lt;span style=&quot;color: #2b91af&quot;&gt;IEnumerable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #2b91af&quot;&gt;StandardPage&lt;/span&gt;&amp;gt; GetPosts()
{
    &lt;span style=&quot;color: blue&quot;&gt;return &lt;/span&gt;EPiServer.Filters.&lt;span style=&quot;color: #2b91af&quot;&gt;FilterForVisitor&lt;/span&gt;.Filter(Locate.ContentRepository().GetDescendents(CurrentPage.ContentLink).Select(pageRef =&amp;gt; GetPage(pageRef &lt;span style=&quot;color: blue&quot;&gt;as &lt;/span&gt;&lt;span style=&quot;color: #2b91af&quot;&gt;PageReference&lt;/span&gt;)).Where(page =&amp;gt; page &lt;span style=&quot;color: blue&quot;&gt;is &lt;/span&gt;&lt;span style=&quot;color: #2b91af&quot;&gt;StandardPage&lt;/span&gt;)).Cast&amp;lt;&lt;span style=&quot;color: #2b91af&quot;&gt;StandardPage&lt;/span&gt;&amp;gt;();
}&lt;/pre&gt;
&lt;p&gt;However, there is now a better and badder way to do this. Although the Get&amp;lt;T&amp;gt; method doesn’t like you passing the incorrect page type as the generic type, the GetChildren&amp;lt;T&amp;gt; does automagical filtering for you to get the right type (including inherited types that can cast back to it). In essence, it’s doing pretty much what our code above does, but in less code and – probably – more efficiently:&lt;/p&gt;
&lt;pre class=&quot;code&quot;&gt;&lt;span style=&quot;color: blue&quot;&gt;private &lt;/span&gt;&lt;span style=&quot;color: #2b91af&quot;&gt;IEnumerable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #2b91af&quot;&gt;StandardPage&lt;/span&gt;&amp;gt; GetPosts()
{
    &lt;span style=&quot;color: blue&quot;&gt;return &lt;/span&gt;EPiServer.Filters.&lt;span style=&quot;color: #2b91af&quot;&gt;FilterForVisitor&lt;/span&gt;.Filter(GetChildren&amp;lt;&lt;span style=&quot;color: #2b91af&quot;&gt;StandardPage&lt;/span&gt;&amp;gt;(CurrentPage.ContentLink)).Cast&amp;lt;&lt;span style=&quot;color: #2b91af&quot;&gt;StandardPage&lt;/span&gt;&amp;gt;();
}&lt;/pre&gt;
&lt;p&gt;For more detail on this, you can see the &lt;a href=&quot;http://world.episerver.com/Blogs/Johan-Bjornfot/Dates1/2012/8/EPiServer7-Working-with-IContentRepositoryDataFactory/&quot;&gt;related article in the SDK&lt;/a&gt;. Note that in all my examples I’m filtering the results for the visitor – this is an often-overlooked and crucial thing that you must do when doing things via the API! Using a PageList or similar web control, if using Web Forms, will do this filtering for you if you treat it nicely.&lt;/p&gt;</description>
            <guid>http://world.episerver.com/Blogs/Dan-Matthews/Dates/2013/5/EPiServer-7-Strongly-typed-page-types-in-FPWC/</guid>
            <pubDate>Tue, 07 May 2013 15:48:59 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>RSS Reader Block</title>
            <link>http://world.episerver.com/Blogs/Jeff-Wallace/Dates/2013/5/RSS-Reader-Block/</link>
            <description>&lt;p&gt;&lt;em&gt;Based on EPiServer 7.1&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;EPiServer customers often want to use RSS on their sites. Some want to create RSS output from their pages, others may want to view it in a dashboard report, and others may simply want to consume a RSS source and syndicate it. Fortunately there are solutions for all of these. In this post however, I’m going to share a simple RSS Reader Block I’ve created. Once added to your site properly the usage is quite simple:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;1. Create a new “RSS Reader Block”:&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;/Globals/xmlrpc/31887/2013/05/06/image_18.png&quot;&gt;&lt;img style=&quot;background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;/Globals/xmlrpc/31887/2013/05/06/image_thumb_8.png&quot; width=&quot;244&quot; height=&quot;223&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;2. Configure the content items you desire:&lt;/p&gt;  &lt;blockquote&gt;   &lt;ul&gt;     &lt;li&gt;RSS Feed URL (required) - URL for the RSS feed&lt;/li&gt;      &lt;li&gt;Heading (optional) – Heading for the feed&lt;/li&gt;      &lt;li&gt;Description Text (optional) – Descriptive text for the feed&lt;/li&gt;      &lt;li&gt;Max Count (optional) – Maximum number of items to show in the list&lt;/li&gt;      &lt;li&gt;Include Publish Date (optional) – Whether or not to include publish date in the list&lt;/li&gt;   &lt;/ul&gt;    &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;a href=&quot;/Globals/xmlrpc/31887/2013/05/06/image_9.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;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;/Globals/xmlrpc/31887/2013/05/06/image_thumb_2.png&quot; width=&quot;508&quot; height=&quot;589&quot; /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;3. Preview:&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;/Globals/xmlrpc/31887/2013/05/06/image_14.png&quot;&gt;&lt;img style=&quot;background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;/Globals/xmlrpc/31887/2013/05/06/image_thumb.png&quot; width=&quot;508&quot; height=&quot;374&quot; /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;4. Publish&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;/Globals/xmlrpc/31887/2013/05/06/image_20.png&quot;&gt;&lt;img style=&quot;background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;/Globals/xmlrpc/31887/2013/05/06/image_thumb_7.png&quot; width=&quot;508&quot; height=&quot;555&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Additional example on Enoteca:&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;/Globals/xmlrpc/31887/2013/05/06/image_11.png&quot;&gt;&lt;img style=&quot;background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;/Globals/xmlrpc/31887/2013/05/06/image_thumb_4.png&quot; width=&quot;508&quot; height=&quot;401&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Get the code here…&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:5a89b616-9f88-44fc-895e-918faa6b3355&quot; class=&quot;wlWriterEditableSmartContent&quot;&gt;&lt;p&gt; &lt;a href=&quot;/Globals/xmlrpc/31887/2013/05/06/RSSReaderBlock.1.0.0_1_1_1_1.nupkg&quot; target=&quot;_blank&quot;&gt;NuGet Package&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;  &lt;hr /&gt;  &lt;ol&gt;   &lt;li&gt;&lt;em&gt;I made use of some of the styling from the Alloy Templates. As a result you may wish to tweak the styling a bit for your own needs. I left some commented out HTML in the view class in case it helps.&lt;/em&gt; &lt;/li&gt;    &lt;li&gt;&lt;em&gt;The folder structure is based on one that mirrors the Alloy Templates thought installing on an Alloy site is not required.&lt;/em&gt; &lt;/li&gt;    &lt;li&gt;&lt;em&gt;This NuGet package is a developer Add-on. This means it should be installed through Visual Studio and compiled as part of your project, not through the Add-on store UI in EPiServer.&lt;/em&gt; &lt;/li&gt;    &lt;li&gt;&lt;em&gt;This is intended as a starting point for you to customize for your project needs. &lt;/em&gt;&lt;em&gt;The code is provided “as is” without warranty or guarantee of operation. Use at your own risk.&lt;/em&gt; &lt;/li&gt; &lt;/ol&gt;</description>
            <guid>http://world.episerver.com/Blogs/Jeff-Wallace/Dates/2013/5/RSS-Reader-Block/</guid>
            <pubDate>Mon, 06 May 2013 23:16:55 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>Related content with EPiServer Find</title>
            <link>http://joelabrahamsson.com/related-content-with-episerver-find/</link>
            <description>Wether it&#39;s done for editorial content, products or recipes, linking to related content can be a good way to enrich a site. For visitors, for business and for SEO. While manually selecting what content to link to often produces the best results automatic functionality for displaying related complement can be a good complement.
&lt;p&gt;EPiServer Find has a number of methods that can be used for finding related or similar content. Combine them and they can offer a powerful way to help visitors find interesting content and improve search engine rankings through internal links.&lt;/p&gt;
&lt;h2&gt;Find similar pages using MoreLike&lt;/h2&gt;
&lt;p&gt;Built into Find&#39;s .NET API is a method named &lt;span class=&quot;code-concept&quot;&gt;MoreLike&lt;/span&gt;. It requires a string as argument and adds a query to a search request that will match indexed objects with similar text.&lt;/p&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;SearchClient.Instance.Search&amp;lt;PageData&amp;gt;()
    &lt;strong&gt;.MoreLike(&quot;banana&quot;)&lt;/strong&gt;&lt;/pre&gt;
&lt;p&gt;When using MoreLike the search results are ranked by how similar their texts are to the one we pass as argument to it. The similarity is essentially based on common words and there are &lt;a href=&quot;http://find.episerver.com/Documentation/dotnet-api-more-like-related-documents&quot;&gt;a number of adjustments&lt;/a&gt; that can be made to the algorithm to optimise it to suit the specific nature of the content on a specific site.&lt;/p&gt;
&lt;h2&gt;Add business logic using BoostMatching&lt;/h2&gt;
&lt;p&gt;On its own the result of the MoreLike method is highly dependent on the textual content on the site, producing varying results in terms of quality depending on the nature of the content on the site. It produces results based on similarity between texts but doesn&#39;t guarantee that there is any relation between the content other than shared usages of words in the text.&lt;/p&gt;
&lt;p&gt;Find&#39;s .NET API also features a method named &lt;span class=&quot;code-concept&quot;&gt;BoostMatching&lt;/span&gt; which can be used to apply boost factors using whatever criteria that can be described using a filter. In other words, pretty much anything. Using that we can upgrade a MoreLike query from producing &lt;em&gt;similar&lt;/em&gt; content to &lt;em&gt;related&lt;/em&gt; content.&lt;/p&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;SearchClient.Instance.Search()
    .MoreLike(&quot;banana&quot;)
    &lt;strong&gt;.BoostMatching(x =&amp;gt; x.InCategory(42), 3)&lt;/strong&gt;&lt;/pre&gt;
&lt;p&gt;What conditions we use for boosting is, naturally, dependent on the nature of the site and the type of content for which we want to find related content. If it&#39;s a blog post we may boost blog posts that share the same categories and tags. If it&#39;s a recipe site we may boost recipes that share the same ingredients. If it&#39;s a product we can boost based on categories, price and stock balance.&lt;/p&gt;
&lt;p&gt;In other words, BoostMatching allows us to apply custom business logic tailored for our specific site and needs of the business.&lt;/p&gt;
&lt;h2&gt;An example&lt;/h2&gt;
&lt;p&gt;On this site I have functionality to relate content using a number of mechanisms such as categories, tags and topics. If an article is grouped in a topic other articles in the same topic is listed.&lt;/p&gt;
&lt;p&gt;For articles that doesn&#39;t have such lists I still want to display a list of, as far as it&#39;s possible, related articles.&amp;nbsp;That&#39;s accomplished using the below method.&lt;/p&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;//using System.Collections.Generic;
//using EPiServer.Find;
//using EPiServer.Find.Cms;
//using EPiServer.Find.Framework;

public virtual IEnumerable&amp;lt;EditorialPageBase&amp;gt; GetSimilarPages(EditorialPageBase page)
{
  //Create search request for pages of the type(s) that we&#39;re interested in
  //and apply a MoreLike query using the concatenated values of all searchable
  //properties on the current page.
  IQueriedSearch&amp;lt;EditorialPageBase&amp;gt; query = SearchClient.Instance
    .Search&amp;lt;EditorialPageBase&amp;gt;()
    .MoreLike(page.SearchText());

  //Apply major boost to articles in the same category.
  foreach (var category in page.Categories)
  {
    query = query.BoostMatching(x =&amp;gt; x.Categories.Match(category), 4);
  }

  //Apply a smaller but still significant boost to articles sharing tags with
  //the current page.
  foreach (var tagLink in page.TagReferences)
  {
    query = query.BoostMatching(x =&amp;gt; x.TagReferences.Match(tagLink.ToString()), 2);
  }

  return query
    //Utilize/apply editorial settings for how desirable a certain page
    //is in the results.
    .BoostMatching(x =&amp;gt; x.SearchPriority.Match(Priority.VeryLow), 0.1)
    .BoostMatching(x =&amp;gt; x.SearchPriority.Match(Priority.Low), 0.3)
    .BoostMatching(x =&amp;gt; x.SearchPriority.Match(Priority.High), 1.5)
    .BoostMatching(x =&amp;gt; x.SearchPriority.Match(Priority.Low), 2.5)
    //Exclude the current page (which is naturally the most similar page).
    .Filter(x =&amp;gt; !x.ContentLink.Match(page.ContentLink))
    //Exclude unpublished and filter based on access rights and language.    
    .FilterForVisitor()
    //Execute the query
    .Take(8)
    .GetContentResult(cacheForSeconds: 3600, cacheForEditorsAndAdmins: true);
}&lt;/pre&gt;
</description>
            <guid>http://joelabrahamsson.com/related-content-with-episerver-find/</guid>
            <pubDate>Mon, 06 May 2013 09:40:00 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>Localized EPiServer model validation attributes</title>
            <link>http://www.tech-fellow.lv/?p=6312</link>
            <description>When it comes to validation the set of model validation attributes from DataAnnotations namespace in System.ComponentModel namespace is really handy. You can decorate model properties declaratively. [DisplayName(&amp;#34;The message&amp;#34;)] [Required] public string Message { get; set; } &amp;#160; However if you are dealing with multilingual site – you have possibility to specify resource name and type &lt;span class=&quot;ellipsis&quot;&gt;&amp;#8230;&lt;/span&gt; &lt;span class=&quot;more-link-wrap&quot;&gt;&lt;a href=&quot;http://www.tech-fellow.lv/2013/05/localized-episerver-model-validation-attributes/&quot; class=&quot;more-link&quot;&gt;&lt;span&gt;Read More ...&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;</description>
            <guid>http://www.tech-fellow.lv/?p=6312</guid>
            <pubDate>Sun, 05 May 2013 16:16:11 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>Using Indexing Service With Both HTTP and HTTPS</title>
            <link>http://blog.huilaaja.net/?p=1352</link>
            <description>In my previous article I showed how to modify Indexing Service when SSL is used, but in some cases you might want to use Indexing Service simultaneously with SSL and without it. Example if you allow users to access EPiServer back-end with HTTP and HTTPS protocols or your environments (local, test, staging, production) use different [...]</description>
            <guid>http://blog.huilaaja.net/?p=1352</guid>
            <pubDate>Sun, 05 May 2013 11:33:25 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>Create an animating slider with content area</title>
            <link>http://world.episerver.com/Blogs/pezi/Dates/2013/5/Create-an-animating-slider-with-content-area/</link>
            <description>&lt;p&gt;The content area is a is a list of multiple content references. That should work well for creating a slider, slideshow or whatever you call it. A list of items where not all of them is visible at the same time. There are too many   different JavaScript implementations for this. Depending on which you use, you might need to tweak the content area a little. Usually should be a list of items, but some also wants extra containers.&lt;/p&gt;
&lt;h2&gt;About the overlays&lt;/h2&gt;
&lt;p&gt;Before we start, let&#39;s mention the overlays. Edit mode uses overlays for the editable and visible properties on a page. The overlays are the clickable areas and the drop targets. When a page has loaded in the iframe, the editing base   finds all nodes that has a data-epi-property-name attribute. These nodes are passed to a overlayfactory which will create overlay items for the nodes. The overlays are absolutely positioned to cover the corresponding node in the template   page. This means that all nodes in the template that should be clickable to edit, must at least occupy some space. Floated elements in the template page can make the overlay get incorrect position and size. As the content area adds   container element around each block, it&#39;s easy to get the overlay misaligned by put floating styles on the block itself, but not on the block container. A container node with no styling and floated child elements will get zero height. The   overlay doesn&#39;t take overflow: hidden into the positioning either, which is a common issue when dealing with sliders. The content area uses a special overlay which has child block overlays. This is for sorting in on page edit, actions   through context menu and also the message to add blocks or pages when the area is empty.&lt;/p&gt;
&lt;h2&gt;First attempt to create a slider with a content area&lt;/h2&gt;
&lt;p&gt;I&#39;ll use &lt;a href=&quot;http://css-tricks.github.com/AnythingSlider/&quot;&gt;AnythingSlider&lt;/a&gt; as the example and use it in the Alloy templates. This script will create wrap the list in additional container Download it and put it in the Static   folder and name it &quot;anythingslider&quot;. The examples are for WebForms, Joel wrote about custom rendering in MVC: &lt;a href=&quot;http://joelabrahamsson.com/custom-rendering-of-content-areas/&quot;&gt;Custom rendering of content areas&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Add a new content area called SliderContentArea to the start page model (EPiServer.Templates.Alloy.Models.Pages.StartPage)&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
[Display(	
	GroupName = SystemTabNames.Content,
        Order = 330)]
	[CultureSpecific]
        public virtual ContentArea SliderContentArea { get; set; }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Add the content area to the page template (EPiServer.Templates.Alloy.Views.Pages.StartPageTemplate)&lt;/p&gt;
&lt;p&gt;To simplify these examples I put the scripts and styles in the start page template.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&amp;lt;alloy:stylesheetlink runat=&quot;server&quot; href=&quot;~/Static/anythingslider/css/anythingslider.css&quot; /&amp;gt;
&amp;lt;alloy:scriptlink runat=&quot;server&quot; src=&quot;~/Static/anythingslider/js/jquery.anythingslider.js&quot; /&amp;gt;

&amp;lt;style&amp;gt;
    .slider {
    width: 400px;
    height: 240px;
    }

    .slider .mediaimg img {
        width: 100%;
    }

    .slider .border {
        width: 398px;
        height: 238px;
    }
&amp;lt;/style&amp;gt;

&amp;lt;!-- row and spanX is for Bootstrap framework --&amp;gt;
&amp;lt;div class=&quot;row&quot;&amp;gt;
    &amp;lt;div class=&quot;span3&quot;&amp;gt;
        &amp;lt;!-- property to illustrate problem with overlay --&amp;gt; 
        &amp;lt;episerver:property id=&quot;Property3&quot; runat=&quot;server&quot; propertyname=&quot;TeaserText&quot;&amp;gt;&amp;lt;/episerver:property&amp;gt;
    &amp;lt;/div&amp;gt; 
    &amp;lt;div class=&quot;span9&quot;&amp;gt; 
        &amp;lt;!-- render content area as a list --&amp;gt;
        &amp;lt;episerver:property id=&quot;Property1&quot; runat=&quot;server&quot; propertyname=&quot;SliderContentArea&quot;&amp;gt; 
        &amp;lt;rendersettings customtagname=&quot;ul&quot; cssclass=&quot;slider&quot; childrencustomtag=&quot;li&quot; /&amp;gt; &amp;lt;/episerver:property&amp;gt;
    &amp;lt;/div&amp;gt; 
&amp;lt;/div&amp;gt;

&amp;lt;!-- AnythingSlider initialization --&amp;gt;
&amp;lt;script&amp;gt;
    // DOM Ready
    $(function(){
        // Create the slider
        $(&#39;.slider&#39;).anythingSlider({
            autoPlay:true,
            buildStartStop:false,
            buildNavigation:false,
            enableNavigation:false,
            enableStartStop:false
       });
    });
&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Add 5 blocks to content area, use the start page blocks (except the jumbotron block).&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/PageFiles/127558/010.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Notice that all blocks are shown in a column, no slider yet. The content area overlay is also too big. This is because the slider script is only initialized when page is loaded the first time. When the property is updated with new items,   only the dom nodes inside the content area are replaced.&lt;/p&gt;
&lt;p&gt;Publish the page and when the page reloads there will be two slider on the page and looks better, except there are two sliders and extra block overlays that appears when the mouse cursor is beside the content area overlay. The teaser   text property gets a little less accessible, even though there still are some pixels left to click it. The overlay positioning the blocks overlays over where the actual node is. The double sliders are due to the custom content area in Alloy   templates, with max three items per row. Read more about the templates in Ted&#39;s post: &lt;a href=&quot;http://world.episerver.com/Articles/Items/Alloy-Templates-for-EPiServer-CMS-7/&quot;&gt;Templates for EPiServer 7 CMS&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/PageFiles/127558/020.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;Fix the slider script initialization&lt;/h2&gt;
&lt;p&gt;Add it full page refresh to get the script render whenever we add a block. This is essential to have the slider be recreated when we add, remove or rearrange blocks.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
    public partial class StartPageTemplate : SiteTemplatePage
    {

        protected override void OnLoad(EventArgs e)
        {

            // Trigger full page reload when block is updated in edit mode
            // (requires FullRefreshPropertiesMetaData control in Root.Master)
            var page = Page as PageBase;

            if (page != null)
            {
                if (!page.EditHints.Contains(&quot;SliderContentArea&quot;))
                {
                    page.EditHints.Add(&quot;SliderContentArea&quot;);
                }
            }
        }
    }
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Fix the rendering&lt;/h2&gt;
&lt;p&gt;We can implement a custom content area that fixes the rendering as the normal content area, but it will also support extra rendering options. The RenderSettings is a dictionary and can included not known keys for a more generic content   area. This implementation adds support for two extra keys innerCustomTagName and innerCssClass. The downside with custom keys are that you get no intellisense for them. So if you use a slider script that want an extra container around the   list, this will do the job for you. Otherwise it&#39;ll work as the default content area implementation.&lt;/p&gt;
&lt;p&gt;Create new class in EPiServer.Templates.Alloy.Business.WebControls.&lt;/p&gt;
&lt;h2&gt;Custom content area&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;
using System;
using System.Web.UI.HtmlControls;
using EPiServer.Core;
using EPiServer.Web.PropertyControls;
using EPiServer.Web.WebControls;
using EPiServer.Framework.DataAnnotations;
using EPiServer.Web;

namespace EPiServer.Templates.Alloy.Business.WebControls
{
    /// 
    /// Provides custom rendering of content areas to enable one more level of markup
    /// 
    [TemplateDescriptor(TagString = &quot;SliderContentAreaTag&quot;)]
    public class SliderContentAreaControl : PropertyContentAreaControl, IRenderTemplate    
    {

        /// 
        /// Creates block controls for the blocks in the block area. Used when the property is in view mode
        /// or in &quot;on page edit&quot; mode and the PropertyDataControl does not support on page editing.
        /// 
        public override void CreateDefaultControls()
        {
            CreateContentAreaControls(false);
        }

        /// 
        /// Creates the &quot;on page edit&quot; controls with the blocks.
        /// If no block exist, this method will do nothing.
        /// 
        public override void CreateOnPageEditControls()
        {
            CreateContentAreaControls(PropertyIsEditableForCurrentLanguage());
        }

        private void CreateContentAreaControls(bool enableEditFeatures)
        {
            // Get list of block renderers
            var controlList = GetContentRenderers(EnableEditFeaturesForChildren || enableEditFeatures);

            // get outer container tag name
            var containerTagName = !String.IsNullOrWhiteSpace(CustomTagName) ? CustomTagName : &quot;div&quot;;

            // get inner container tag name
            var innerContainerTagName = &quot;div&quot;;

            // use custom render settings key
            if (RenderSettings.ContainsKey(&quot;innerCustomTagName&quot;))
            {
                var tag = (string)RenderSettings[&quot;innerCustomTagName&quot;];
                if (!String.IsNullOrWhiteSpace(tag))
                {
                    innerContainerTagName = tag;
                }
            }

            // Create containers
            HtmlGenericControl container = CreateMainContainer(enableEditFeatures, containerTagName);
            HtmlGenericControl innerContainer = new HtmlGenericControl(innerContainerTagName);

            // add class for inner
            // use custom render settings key for classs
            if (RenderSettings.ContainsKey(&quot;innerCssClass&quot;))
            {
                var cssClass = (string)RenderSettings[&quot;innerCssClass&quot;];
                if (!String.IsNullOrWhiteSpace(cssClass))
                {
                    innerContainer.Attributes.Add(&quot;class&quot;, cssClass);
                }
            }

            // Add controls
            this.Controls.Add(container);
            container.Controls.Add(innerContainer);

            foreach (ContentRenderer block in controlList)
            {
                innerContainer.Controls.Add(block);
                block.EnsureChildControlsCreated();
            }
        }

        /// The default implementation simply checks the IsNull property
        protected override bool ShouldCreateDefaultControls()
        {
            return PropertyData != null &amp;amp;&amp;amp; !PropertyData.IsNull;
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Use the custom content area for slider property&lt;/h2&gt;
&lt;p&gt;Add Tag to render settings on Change the property name to get the correct rendering, now we don&#39;t get the extra classes used for the Alloy content areas and the blocks aren&#39;t wrapped on multiple rows. I also added support for setting an   innerContainer to the inner class. Note the use of Tag to make sure we get SliderContentAreaControl and not the SitePropertyContentAreaControl (which is the default ).&lt;/p&gt;
&lt;p&gt;Reload edit and there&#39;s only one slider, but the overlay for the content area is now even worse. If look at the page on the site the structure this for the slider:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/PageFiles/127558/030.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;AnythingSlider wraps the slider in two divs, the inner is a viewport with overflow hidden. Let&#39;s look at the rendered slider i edit mode. I usually hold down control/command and click on a page in the top navigation inside the preview   frame. The template page will be opened in a new tab with the needed query string parameters ( .../,,4/?id=4&amp;amp;epieditmode=true ). Inspect the slider and we&#39;ll see that the data-epi-attributes are attached to the slider UL. This causes   the overlay to be too big because it will position itself according to the UL. We want the epi attributes to be on the anythingSlider div.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/PageFiles/127558/040.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;Move the edit attributes&lt;/h2&gt;
&lt;p&gt;Let&#39;s add some script to fix this. The script in the template page will execute before the edit UI finds the editable nodes, so we can move the attributes without any problem.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
     // DOM Ready
     $(function () {

        // Create the slider
         $(&#39;.slider&#39;).anythingSlider({
             autoPlay: true,
             buildStartStop: false,
             buildNavigation: false,
             enableNavigation: false,
             enableStartStop: false
         }).each(function (index, item) {

            // move all data-epi-attributes to the injected parent slider node
             var i;
             var epiAttributes = {};
             var attr;
             var name;

             for (i = item.attributes.length - 1; i &amp;gt;= 0; i--) {

                 attr = item.attributes[i];
                 name = attr.nodeName;

                // starts with &quot;data-epi&quot;?
                 if (name.indexOf(&quot;data-epi-&quot;) === 0) {
                     epiAttributes[name] = attr.nodeValue;
                     item.removeAttribute(name);
                     attr = null;
                }
             }

            // set attributes to parent node
             $(item).parents(&quot;.anythingSlider&quot;).attr(epiAttributes);
         });
     });
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now we&#39;ll get a better sized overlay for the content area. The overlay is now only calculated for the outer property. But there&#39;s still the block overlays that are in the way. We can use the default property overlay to remove the block   overlays.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/PageFiles/127558/050.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;Use default overlay&lt;/h2&gt;
&lt;h3&gt;Create an editor descriptor&lt;/h3&gt;
&lt;p&gt;Create a new class called SliderPropertyContentAreaEditorDescriptor.cs. In the editor descriptor we can specify a custom overlay, or use default by not specify any at all. The default overlay can&#39;t handle list items and we must remove drag   and drop support.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
using EPiServer.Core;
using EPiServer.Shell.ObjectEditing;
using EPiServer.Shell.ObjectEditing.EditorDescriptors;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace EPiServer.Templates.Alloy.Business.EditorDescriptors
{
    [EditorDescriptorRegistration(TargetType = typeof(ContentArea), UIHint = &quot;SliderPropertyContentArea&quot;)]
    public class SliderPropertyContentAreaEditorDescriptor : EditorDescriptor
    {
        public SliderPropertyContentAreaEditorDescriptor()
        {
            ClientEditingClass = &quot;epi-cms.contentediting.editors.ContentAreaEditor&quot;;
        }

        public override void ModifyMetadata(ExtendedMetadata metadata, IEnumerable attributes)
        {
            base.ModifyMetadata(metadata, attributes);

            // cancel DnD
            metadata.AdditionalValues[&quot;DropTargetType&quot;] = new string[] { };
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Use the editor descriptor for the slider property&lt;/h3&gt;
&lt;p&gt;Annotate the model with UIHint to get the custom overlay in edit mode. It&#39;s the key to be able to use this for a specific property in the model.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
        [UIHint(&quot;SliderPropertyContentArea&quot;)]
        public virtual ContentArea SliderContentArea { get; set; }
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;The final result&lt;/h2&gt;
&lt;p&gt;Reload edit to get the final result. Items can be added, removed and reordered in the flyout editor.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/PageFiles/127558/060.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;</description>
            <guid>http://world.episerver.com/Blogs/pezi/Dates/2013/5/Create-an-animating-slider-with-content-area/</guid>
            <pubDate>Fri, 03 May 2013 13:56:00 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>Programing changes required while Upgrading Episerver Commerce R2 to R2 SP1 and R2SP2 - Part 2</title>
            <link>http://world.episerver.com/Blogs/K-Khan-/Dates/2013/5/Programing-changes-required-while-Upgrading-Episerver-Commerce-R2-to-R2-SP1-and-R2SP2---Part-2/</link>
            <description>&lt;p&gt;I will be thankful if you can add your experiences also in comments so others developers will have an idea of all issues in one basket. It will help you to estimate time required for upgrading also depending on your projects.&lt;/p&gt;  &lt;p&gt;       &lt;p&gt;&lt;strong&gt;7: error related to loading EPiServer.Factory dll&lt;/strong&gt;      &lt;br /&gt;Disable the processPaymentActivity in POSaveChangesWorkflow if you&amp;#160; have the error related to loading EPiServer.Factory dll.&lt;/p&gt; &lt;/p&gt;  &lt;p&gt;       &lt;p&gt;&lt;strong&gt;8: WOrkflow changes required if using some custom workflows&lt;/strong&gt;      &lt;br /&gt;Add the SplitShipment activity to CartPrepareWorfklow. Remove any payments / shipment before calling CartPrepareWorkflow.&lt;/p&gt; &lt;/p&gt;  &lt;p&gt;   &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;9: Backward compatability issue.&lt;/strong&gt;       &lt;br /&gt;In Commerce R2SP1, the CalculateTotalActivity calculates the ExtendedPrice following PlacePrice.      &lt;br /&gt;item.ExtendedPrice = item.PlacedPrice * item.Quantity - item.LineItemDiscountAmount - item.OrderLevelDiscountAmount;      &lt;br /&gt;subTotal += item.PlacedPrice * item.Quantity - item.LineItemDiscountAmount;&lt;/p&gt; &lt;/p&gt;  &lt;p&gt;It proved a nightmare for me as all taxes and discounts were wrong and it took long to understand this. In 1.0 SP1, the ExtendedPrice assessed by ListPrice.   &lt;br /&gt;item.ExtendedPrice = item.ListPrice * item.Quantity - item.LineItemDiscountAmount -item.OrderLevelDiscountAmount;    &lt;br /&gt;subTotal += item.ListPrice * item.Quantity - item.LineItemDiscountAmount;&lt;/p&gt;  &lt;p&gt;if using custom cartprepare workflows then change the code in Custom CarePrepareWorkflow back to ListPrice to show the correct price. Check Front Site which field you are using using also.&lt;/p&gt;  &lt;p&gt;   &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;     &lt;p&gt;&lt;strong&gt;10: R2SP2 setup always fails if there is some failure first time.&lt;/strong&gt;        &lt;br /&gt;Issue: If the SP2 automated update fails then the Tools.zip file is removed during the rollback routine. Once this file has been removed any future attempts to run the update will fail due to this file being missing. Therefore before continuing make a backup of this file.        &lt;br /&gt;&lt;/p&gt;      &lt;p&gt;Fix: For R2SP2 Backup ‘&amp;lt;website root&amp;gt;\MediachaseECF\Tools.zip’ &lt;/p&gt;   &lt;/p&gt; &lt;/p&gt;  &lt;p&gt;   &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;11: Commerce Manager Issue:&lt;/strong&gt;      &lt;br /&gt;Issue: On Migrating to R2SP2 I got an issue in Commerce Manager. It was not loading Meta classes and was giving exception as below      &lt;br /&gt;[IndexOutOfRangeException: ParameterIndex]&amp;#160;&amp;#160; System.Data.ProviderBase.FieldNameLookup.GetOrdinal(String fieldName) +6277902&amp;#160;&amp;#160; System.Data.SqlClient.SqlDataReader.GetOrdinal(String name) +249&amp;#160;&amp;#160; System.Data.SqlClient.SqlDataReader.get_Item(String name) +23&amp;#160;&amp;#160; Mediachase.MetaDataPlus.Configurator.MetaField.GetList(MetaClass metaClass) +404&amp;#160;&amp;#160; Mediachase.Commerce.Manager.Core.MetaData.Admin.MetaClassesControl.BindItemsGrid(Int32 id) +646&lt;/p&gt; &lt;/p&gt;  &lt;p&gt;       &lt;p&gt;Fix: Deploy Some SPs manually on DB. Find Unzip Mediachase.ECF.SDK.5.2.zip under C:\Program Files (x86)\EPiServer\CMS\6.1.379.0\Install\Modules\EPiServer Commerce 1.1.2.62\MediachaseECF and Unzip it at location e.g. E:\InstallSP2\Mediachase.ECF.SDK.5.2 and execute below scripts      &lt;br /&gt;C:\Program Files (x86)\EPiServer\CMS\6.1.379.0\Install\Modules\EPiServer Commerce 1.1.2.62\Setup\cms_db_upgrade.sql      &lt;br /&gt;E:\InstallSP2\Mediachase.ECF.SDK.5.2\Data\DeploymentPackage\SqlScripts\Update\ecf_db_ApplicationSystem_update.sql      &lt;br /&gt;E:\InstallSP2\Mediachase.ECF.SDK.5.2\Data\DeploymentPackage\SqlScripts\Update\ecf_db_BusinessFoundation_update.sql      &lt;br /&gt;E:\InstallSP2\Mediachase.ECF.SDK.5.2\Data\DeploymentPackage\SqlScripts\Update\ecf_db_CatalogSystem_update.sql      &lt;br /&gt;E:\InstallSP2\Mediachase.ECF.SDK.5.2\Data\DeploymentPackage\SqlScripts\Update\ecf_db_MarketingSystem_update.sql      &lt;br /&gt;E:\InstallSP2\Mediachase.ECF.SDK.5.2\Data\DeploymentPackage\SqlScripts\Update\ecf_db_MetaDataSystem_update.sql      &lt;br /&gt;E:\InstallSP2\Mediachase.ECF.SDK.5.2\Data\DeploymentPackage\SqlScripts\Update\ecf_db_OrderSystem_update.sql      &lt;br /&gt;E:\InstallSP2\Mediachase.ECF.SDK.5.2\Data\DeploymentPackage\SqlScripts\Update\ecf_db_Reporting_update.sql      &lt;br /&gt;E:\InstallSP2\Mediachase.ECF.SDK.5.2\Data\DeploymentPackage\SqlScripts\Update\ecf_db_SecuritySystem_update.sql      &lt;br /&gt;E:\InstallSP2\Mediachase.ECF.SDK.5.2\Data\DeploymentPackage\SqlScripts\Update\ecf_db_Users_upgrade.sql      &lt;br /&gt;C:\Program Files (x86)\EPiServer\CMS\6.1.379.0\Install\Modules\EPiServer Commerce 1.1.2.62\Setup\ecf_products_ProductsQuery.sql&lt;/p&gt;&lt;/p&gt;</description>
            <guid>http://world.episerver.com/Blogs/K-Khan-/Dates/2013/5/Programing-changes-required-while-Upgrading-Episerver-Commerce-R2-to-R2-SP1-and-R2SP2---Part-2/</guid>
            <pubDate>Fri, 03 May 2013 09:20:00 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>PageType Usage Plugin with Recent Pages for each PageType</title>
            <link>http://world.episerver.com/Blogs/Eric-Vanderfeesten/Dates/2013/5/PageType-Usage-Plugin-with-Recent-Pages-for-each-PageType/</link>
            <description>&lt;p&gt;To get more insight in the production environment of the client, we needed some information on the usage of PageTypes and the number of pages for each PageType. Further, in case of troubleshooting or support we needed a way to quickly retrieve the URL of a page for a given PageType. The simplest approach was to build a small admin plugin that summarizes this information in an extensive but generic way without the need to look up or manually query for certain pages. This post will show you how the plugin was set up and what the end result looks like.&lt;/p&gt;  &lt;p&gt;The main part of the plugin is a GuiPlugin that targets the PlugInArea.AdminMenu. I’ll show you how the page layout was setup and how the code behind looks like. Further we need a few helper classes that retrieve the actual data from the EPiServer database.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;End result&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Let’s start with the end result. I’ve used the AlloyTech templates for this demo. Below you’ll see two screenshots. The first displays the statistics for each PageType and the second displays the page URLs for each PageType. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;/Globals/xmlrpc/53565/2013/05/02/PageTypeUsage-tabStatistics_2.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;PageTypeUsage-tabStatistics&quot; border=&quot;0&quot; alt=&quot;PageTypeUsage-tabStatistics&quot; src=&quot;/Globals/xmlrpc/53565/2013/05/02/PageTypeUsage-tabStatistics_thumb.png&quot; width=&quot;244&quot; height=&quot;159&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Figure 1: &lt;em&gt;Page Type statistics&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;/Globals/xmlrpc/53565/2013/05/02/PageTypeUsage-tabRecentPages_2.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;PageTypeUsage-tabRecentPages&quot; border=&quot;0&quot; alt=&quot;PageTypeUsage-tabRecentPages&quot; src=&quot;/Globals/xmlrpc/53565/2013/05/02/PageTypeUsage-tabRecentPages_thumb.png&quot; width=&quot;244&quot; height=&quot;191&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Figure 2:&lt;em&gt; Recent pages for each PageType&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Page Layout&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Now you’ve seen the end result, we’ll get into how this plugin is created. We’ll start with the page layout first.&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: &amp;#39;Courier New&amp;#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; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum1&quot;&gt;   1:&lt;/span&gt; &amp;lt;asp:Content ContentPlaceHolderID=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;FullRegion&amp;quot;&lt;/span&gt; runat=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;server&amp;quot;&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum3&quot;&gt;   3:&lt;/span&gt;     &amp;lt;EPiServerUI:TabStrip runat=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;server&amp;quot;&lt;/span&gt; id=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;actionTab&amp;quot;&lt;/span&gt; GeneratesPostBack=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;False&amp;quot;&lt;/span&gt; targetid=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;tabView&amp;quot;&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum4&quot;&gt;   4:&lt;/span&gt;             &amp;lt;EPiServerUI:Tab Text=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Page Type Usage&amp;quot;&lt;/span&gt; runat=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;server&amp;quot;&lt;/span&gt; ID=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;TabUsage&amp;quot;&lt;/span&gt; Sticky=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;true&amp;quot;&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum5&quot;&gt;   5:&lt;/span&gt;             &amp;lt;EPiServerUI:Tab Text=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Pages&amp;quot;&lt;/span&gt; runat=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;server&amp;quot;&lt;/span&gt; ID=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;TabPages&amp;quot;&lt;/span&gt; Sticky=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;true&amp;quot;&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum6&quot;&gt;   6:&lt;/span&gt;     &amp;lt;/EPiServerUI:TabStrip&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum7&quot;&gt;   7:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum8&quot;&gt;   8:&lt;/span&gt;     &amp;lt;asp:Panel runat=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;server&amp;quot;&lt;/span&gt; id=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;tabView&amp;quot;&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum9&quot;&gt;   9:&lt;/span&gt;         &amp;lt;asp:Panel runat=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;server&amp;quot;&lt;/span&gt; ID=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Usage&amp;quot;&lt;/span&gt; CssClass=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;epi-contentContainer epi-padding&amp;quot;&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum11&quot;&gt;  11:&lt;/span&gt;             &amp;lt;h1&amp;gt;Page Type Usage&amp;lt;/h1&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum12&quot;&gt;  12:&lt;/span&gt;             &amp;lt;asp:GridView ID=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;PageTypeGridView&amp;quot;&lt;/span&gt; runat=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;server&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum13&quot;&gt;  13:&lt;/span&gt;                 AutoGenerateColumns=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;false&amp;quot;&lt;/span&gt; AllowSorting=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;true&amp;quot;&lt;/span&gt; AllowPaging=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;false&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum14&quot;&gt;  14:&lt;/span&gt;                 Width=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;100%&amp;quot;&lt;/span&gt; OnSorting=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;PageTypeGridViewSorting&amp;quot;&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum15&quot;&gt;  15:&lt;/span&gt;                 &amp;lt;Columns&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum16&quot;&gt;  16:&lt;/span&gt;                     &amp;lt;asp:BoundField DataField=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;PageTypeId&amp;quot;&lt;/span&gt; HeaderText=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;PageTypeId&amp;quot;&lt;/span&gt; SortExpression=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;PageTypeId&amp;quot;&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum17&quot;&gt;  17:&lt;/span&gt;                     &amp;lt;asp:BoundField DataField=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;PageTypeName&amp;quot;&lt;/span&gt; HeaderText=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;PageTypeName&amp;quot;&lt;/span&gt; SortExpression=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;PageTypeName&amp;quot;&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum18&quot;&gt;  18:&lt;/span&gt;                     &amp;lt;asp:BoundField DataField=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;CountPages&amp;quot;&lt;/span&gt; HeaderText=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;CountPages&amp;quot;&lt;/span&gt; SortExpression=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;CountPages&amp;quot;&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum19&quot;&gt;  19:&lt;/span&gt;                     &amp;lt;asp:BoundField DataField=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;CountWorkPages&amp;quot;&lt;/span&gt; HeaderText=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;CountWorkPages&amp;quot;&lt;/span&gt; SortExpression=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;CountWorkPages&amp;quot;&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum20&quot;&gt;  20:&lt;/span&gt;                 &amp;lt;/Columns&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum21&quot;&gt;  21:&lt;/span&gt;             &amp;lt;/asp:GridView&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum22&quot;&gt;  22:&lt;/span&gt;         &amp;lt;/asp:Panel&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum23&quot;&gt;  23:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum24&quot;&gt;  24:&lt;/span&gt;         &amp;lt;asp:Panel runat=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;server&amp;quot;&lt;/span&gt; ID=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Pages&amp;quot;&lt;/span&gt; CssClass=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;epi-padding&amp;quot;&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum25&quot;&gt;  25:&lt;/span&gt;             &amp;lt;h1&amp;gt;Pages by PageType&amp;lt;/h1&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum26&quot;&gt;  26:&lt;/span&gt;             &amp;lt;asp:Literal runat=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;server&amp;quot;&lt;/span&gt; ID=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;PageUrlsLiteral&amp;quot;&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum27&quot;&gt;  27:&lt;/span&gt;         &amp;lt;/asp:Panel&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum28&quot;&gt;  28:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum29&quot;&gt;  29:&lt;/span&gt;     &amp;lt;/asp:Panel&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum30&quot;&gt;  30:&lt;/span&gt; &amp;lt;/asp:Content&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;p&gt;The page layout consists of a &lt;em&gt;TabStrip&lt;/em&gt; with two Tabs. We’ll use the first tab for the statistical part and the second tab for the page URLs part. In order to get the Tabs working we’ll need two Panels. The first panel, for our statistical part, uses a &lt;em&gt;GridView&lt;/em&gt; with four columns for PageTypeId, PageTypeName, the number of pages, and the number of work pages. Of course the amount of information of each PageType could be extended, but for now this already provides some insight in the way PageTypes are being used in the production environment.&lt;/p&gt;
&lt;p&gt;The second part lists the most recent pages for each PageType. We’ll construct the complete listing from code behind which will be places in the PageUrlsLiteral. Building html from a code behind of course is never the best approach, but it’ll do for now. I’ll get into the page URLs in more detail later on.&lt;/p&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Plugin code behind&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;The second part is setting up our code behind for the GuiPlugin.&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: &amp;#39;Courier New&amp;#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; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum1&quot;&gt;   1:&lt;/span&gt; [GuiPlugIn(&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum2&quot;&gt;   2:&lt;/span&gt;     DisplayName = &lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Page Type Usage&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum3&quot;&gt;   3:&lt;/span&gt;     Description = &lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Displays statistics and actual pages for each page type&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum4&quot;&gt;   4:&lt;/span&gt;     Area = PlugInArea.AdminMenu, &lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum5&quot;&gt;   5:&lt;/span&gt;     Url = &lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;~/Business/PageTypeStats/PageTypeStatsPlugin.aspx&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum6&quot;&gt;   6:&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;partial&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;class&lt;/span&gt; PageTypeStatsPlugin : SystemPageBase&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum7&quot;&gt;   7:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum8&quot;&gt;   8:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;readonly&lt;/span&gt; EPiServerSqlHelper _ePiServerSqlHelper = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; EPiServerSqlHelper();&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum9&quot;&gt;   9:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum10&quot;&gt;  10:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;protected&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;override&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; OnPreInit(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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum11&quot;&gt;  11:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum12&quot;&gt;  12:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;base&lt;/span&gt;.OnPreInit(e);&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum13&quot;&gt;  13:&lt;/span&gt;         &lt;span style=&quot;color: #008000&quot;&gt;// Set system masterpage&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum14&quot;&gt;  14:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.MasterPageFile = ResolveUrlFromUI(&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;MasterPages/EPiServerUI.master&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum17&quot;&gt;  17:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;protected&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;override&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; OnInit(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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum18&quot;&gt;  18:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum19&quot;&gt;  19:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (!EPiServer.Security.PrincipalInfo.HasEditAccess)&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum20&quot;&gt;  20:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum21&quot;&gt;  21:&lt;/span&gt;             Response.Write(&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;You do not have access rights to this page&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum22&quot;&gt;  22:&lt;/span&gt;             Response.End();&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum23&quot;&gt;  23:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum24&quot;&gt;  24:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum25&quot;&gt;  25:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum26&quot;&gt;  26:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;protected&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;override&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; OnLoad(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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum27&quot;&gt;  27:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum28&quot;&gt;  28:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;base&lt;/span&gt;.OnLoad(e);&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum29&quot;&gt;  29:&lt;/span&gt;         BindPageTypes();&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum30&quot;&gt;  30:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum31&quot;&gt;  31:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum32&quot;&gt;  32:&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; BindPageTypes()&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum33&quot;&gt;  33:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum34&quot;&gt;  34:&lt;/span&gt;         List&amp;lt;PageTypeUsage&amp;gt; list = _ePiServerSqlHelper.GetPageTypeUsage();&lt;/pre&gt;&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum35&quot;&gt;  35:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum36&quot;&gt;  36:&lt;/span&gt;         PageTypeGridView.DataSource = list;&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum37&quot;&gt;  37:&lt;/span&gt;         PageTypeGridView.AllowPaging = &lt;span style=&quot;color: #0000ff&quot;&gt;false&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum38&quot;&gt;  38:&lt;/span&gt;         PageTypeGridView.DataBind();&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum39&quot;&gt;  39:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum40&quot;&gt;  40:&lt;/span&gt;         PageUrlsLiteral.Text = GetPageUrls();&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum41&quot;&gt;  41:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum42&quot;&gt;  42:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum43&quot;&gt;  43:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;protected&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt; GetPageUrls()&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum44&quot;&gt;  44:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum45&quot;&gt;  45:&lt;/span&gt;         List&amp;lt;PageUrlByPageType&amp;gt; list = _ePiServerSqlHelper.GetPageUrlByPageType();&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum46&quot;&gt;  46:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum47&quot;&gt;  47:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt; colgroupFormat = &lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;&amp;lt;colgroup&amp;gt;&amp;lt;col /&amp;gt;&amp;lt;col style=&#39;width:50px;&#39; /&amp;gt;&amp;lt;col style=&#39;width:50px;&#39; /&amp;gt;&amp;lt;/colgroup&amp;gt;&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum48&quot;&gt;  48:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt; headerFormat = &lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;{0}&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;{1}&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;{2}&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum49&quot;&gt;  49:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt; pageTypeFormat = &lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;&amp;lt;tr style=&#39;background-color:#DEDEDE;&#39;&amp;gt;&amp;lt;td&amp;gt;{0}&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;{1}&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;{2}&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum50&quot;&gt;  50:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt; pageFormat = &lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;&amp;lt;tr&amp;gt;&amp;lt;td colspan=&#39;3&#39;&amp;gt;{0}&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum51&quot;&gt;  51:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum52&quot;&gt;  52:&lt;/span&gt;         StringBuilder sb = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; StringBuilder();&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum53&quot;&gt;  53:&lt;/span&gt;         sb.Append(&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;&amp;lt;table cellspacing=&#39;0&#39; border=&#39;0&#39; style=&#39;border-style:None;width:100%;border-collapse:collapse;&#39; class=&#39;epi-default epi-default-legacy&#39;&amp;gt;&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum54&quot;&gt;  54:&lt;/span&gt;         sb.Append(colgroupFormat);&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum55&quot;&gt;  55:&lt;/span&gt;         sb.AppendFormat(headerFormat, &lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Name&amp;quot;&lt;/span&gt;, &lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;PageTypeID&amp;quot;&lt;/span&gt;, &lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;CountPages&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum56&quot;&gt;  56:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum57&quot;&gt;  57:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;foreach&lt;/span&gt; (var pageUrlByPageType &lt;span style=&quot;color: #0000ff&quot;&gt;in&lt;/span&gt; list)&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum58&quot;&gt;  58:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum59&quot;&gt;  59:&lt;/span&gt;             sb.AppendFormat(pageTypeFormat, pageUrlByPageType.PageTypeName,&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum60&quot;&gt;  60:&lt;/span&gt;                 pageUrlByPageType.PageTypeId, pageUrlByPageType.CountPages);&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum61&quot;&gt;  61:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum62&quot;&gt;  62:&lt;/span&gt;             &lt;span style=&quot;color: #0000ff&quot;&gt;foreach&lt;/span&gt; (var pageUrls &lt;span style=&quot;color: #0000ff&quot;&gt;in&lt;/span&gt; pageUrlByPageType.PageUrls)&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum63&quot;&gt;  63:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum64&quot;&gt;  64:&lt;/span&gt;                 sb.AppendFormat(pageFormat, pageUrls.PageUrl);&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum65&quot;&gt;  65:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum66&quot;&gt;  66:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum67&quot;&gt;  67:&lt;/span&gt;         sb.Append(&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;&amp;lt;/table&amp;gt;&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum68&quot;&gt;  68:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum69&quot;&gt;  69:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; sb.ToString();&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum70&quot;&gt;  70:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum71&quot;&gt;  71:&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;There is probably more in depth information available on how to set up a GuiPlugin, so I won’t be covering all the basics here but I’ll try to keep this short. Limited to five steps actually.&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;First you add the &lt;em&gt;GuiPlugin&lt;/em&gt; attribute on the class.&lt;/li&gt;
  &lt;li&gt;In the O&lt;em&gt;nPreInit&lt;/em&gt; method you assign the correct masterpage.&lt;/li&gt;
  &lt;li&gt;In the &lt;em&gt;OnInit &lt;/em&gt;method we’ll limit access to the plugin to edit rights.&lt;/li&gt;
  &lt;li&gt;The &lt;em&gt;BindPageTypes&lt;/em&gt; method is called from the &lt;em&gt;OnLoad&lt;/em&gt; method and retrieves the data and assigns the data to the GridView.&lt;/li&gt;
  &lt;li&gt;The &lt;em&gt;GetPageUrls&lt;/em&gt; method retrieves the data for our second tab, the actual URLs for the pages. This retrieves a collection, iterates over the results and build the html for our list which is then assigned to our literal placeholder.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;While our GuiPlugin has been set up with these five steps, we still need to cover the actual retrieval of the data required for the PageType information we want to expose.&lt;/p&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Query the database&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;There are three basic queries needed to retrieve all the information needed. The three queries are mentioned below.&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: &amp;#39;Courier New&amp;#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; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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;private&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt; SqlPageTypeUsage = &lt;span style=&quot;color: #006080&quot;&gt;@&amp;quot;SELECT pt.pkID AS Id, pt.Name AS Name, &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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum2&quot;&gt;   2:&lt;/span&gt;         pt.Filename AS FileName, COUNT(p.pkID) AS PageCount &lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum3&quot;&gt;   3:&lt;/span&gt;         FROM tblPage AS p RIGHT OUTER JOIN tblPageType AS pt ON p.fkPageTypeID = pt.pkID &lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum4&quot;&gt;   4:&lt;/span&gt;         GROUP BY pt.Name, pt.Filename, pt.SortOrder, pt.pkID &lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum5&quot;&gt;   5:&lt;/span&gt;         ORDER BY pt.Name, pt.SortOrder&amp;quot;;&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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;private&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt; SqlCountWorkPages = &lt;span style=&quot;color: #006080&quot;&gt;@&amp;quot;SELECT COUNT(*) AS PageCount FROM tblWorkPage &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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum8&quot;&gt;   8:&lt;/span&gt;         INNER JOIN tblPage ON tblWorkPage.fkPageID = tblPage.pkID &lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum9&quot;&gt;   9:&lt;/span&gt;         WHERE (tblPage.fkPageTypeID = {0})&amp;quot;;&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum11&quot;&gt;  11:&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt; SqlTop10PagesByPageType = &lt;span style=&quot;color: #006080&quot;&gt;@&amp;quot;SELECT TOP 10 [pkID] AS Id &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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum12&quot;&gt;  12:&lt;/span&gt;         FROM tblPage WHERE Deleted=&#39;0&#39; AND PendingPublish=&#39;0&#39; AND fkPageTypeID = &#39;{0}&#39; &lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum13&quot;&gt;  13:&lt;/span&gt;         ORDER BY pkID DESC&amp;quot;;&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum14&quot;&gt;  14:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum15&quot;&gt;  15:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;p&gt;The first query ‘&lt;em&gt;SqlPageTypeUsage&lt;/em&gt;’ selects the information from tblPage and tblPageType and groups this on PageType. At this point we have most of the information on the first tab, the statistical information. &lt;/p&gt;
&lt;p&gt;Further the information is extended with the number of workPages. The second query ‘&lt;em&gt;SqlCountWorkPages&lt;/em&gt;’ will retrieve this information from tblWorkPage.&lt;/p&gt;
&lt;p&gt;The third query ‘&lt;em&gt;SqlTop10PagesByPageType&lt;/em&gt;’ retrieves the top 10 pages from tblPage on the given PageType. I’ve ordered this on the Page ID, since the most recent pages will have the newest ID. Of course you could order it on change date or publish date of the page version, but at this point ordering on ID gives us a good enough insight in the recent pages.&lt;/p&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Domain objects&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Next we defined three simple objects to hold the data which we can use in our plugin. These are PageTypeUsage which will hold the statistical tab, PageUrlByPageType and PageUrls to hold the recent pages for each PageType.&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: &amp;#39;Courier New&amp;#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; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;class&lt;/span&gt; PageTypeUsage&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt; PageTypeName { get; set; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; PageTypeId { get; set; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt; FileName { get; set; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum6&quot;&gt;   6:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; CountPages { get; set; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; CountWorkPages { get; set; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum9&quot;&gt;   9:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum10&quot;&gt;  10:&lt;/span&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; PageUrlByPageType&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum11&quot;&gt;  11:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum12&quot;&gt;  12:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt; PageTypeName { get; set; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum13&quot;&gt;  13:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; PageTypeId { get; set; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum14&quot;&gt;  14:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; CountPages { get; set; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum15&quot;&gt;  15:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; List&amp;lt;PageUrls&amp;gt; PageUrls { get; set; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum16&quot;&gt;  16:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum17&quot;&gt;  17:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum18&quot;&gt;  18:&lt;/span&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; PageUrls&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum20&quot;&gt;  20:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; PageId { get; set; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum21&quot;&gt;  21:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt; PageUrl { get; set; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum22&quot;&gt;  22:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum23&quot;&gt;  23:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Retrieve the data&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The next part is the method &lt;em&gt;GetPageTypeUsage&lt;/em&gt; which executes the SQL statement and parses en returns the results. We check if the PageType has a filename and exclude the &lt;em&gt;sysrecylebin&lt;/em&gt; and &lt;em&gt;sysroot&lt;/em&gt;. Further we call the SQL statement to count the number of WorkPages.&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: &amp;#39;Courier New&amp;#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; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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: #008000&quot;&gt;/// &amp;lt;summary&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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: #008000&quot;&gt;/// Gets the usage of pagetypes.&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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: #008000&quot;&gt;/// &amp;lt;/summary&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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: #008000&quot;&gt;/// &amp;lt;returns&amp;gt;&amp;lt;/returns&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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;public&lt;/span&gt; List&amp;lt;PageTypeUsage&amp;gt; GetPageTypeUsage()&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum7&quot;&gt;   7:&lt;/span&gt;     List&amp;lt;PageTypeUsage&amp;gt; results = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; List&amp;lt;PageTypeUsage&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum8&quot;&gt;   8:&lt;/span&gt;     SqlConnection conn = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; SqlConnection(ConfigurationManager.ConnectionStrings[&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;EPiServerDB&amp;quot;&lt;/span&gt;].ConnectionString);&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum9&quot;&gt;   9:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;try&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum10&quot;&gt;  10:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum11&quot;&gt;  11:&lt;/span&gt;         SqlCommand cmd = conn.CreateCommand();&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum12&quot;&gt;  12:&lt;/span&gt;         cmd.CommandType = CommandType.Text;&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum13&quot;&gt;  13:&lt;/span&gt;         cmd.CommandText = SqlPageTypeUsage;&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum14&quot;&gt;  14:&lt;/span&gt;         conn.Open();&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum15&quot;&gt;  15:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum16&quot;&gt;  16:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;using&lt;/span&gt; (IDataReader dataReader = cmd.ExecuteReader())&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum17&quot;&gt;  17:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum18&quot;&gt;  18:&lt;/span&gt;             &lt;span style=&quot;color: #0000ff&quot;&gt;while&lt;/span&gt; (dataReader.Read())&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum20&quot;&gt;  20:&lt;/span&gt;                 &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; id;&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum21&quot;&gt;  21:&lt;/span&gt;                 &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (!&lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;.TryParse(dataReader[&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Id&amp;quot;&lt;/span&gt;].ToString(), &lt;span style=&quot;color: #0000ff&quot;&gt;out&lt;/span&gt; id))&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum22&quot;&gt;  22:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum23&quot;&gt;  23:&lt;/span&gt;                     Logger.Error(&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Error parsing Id&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum24&quot;&gt;  24:&lt;/span&gt;                     &lt;span style=&quot;color: #0000ff&quot;&gt;continue&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum25&quot;&gt;  25:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum26&quot;&gt;  26:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum27&quot;&gt;  27:&lt;/span&gt;                 &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; pageCount;&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum28&quot;&gt;  28:&lt;/span&gt;                 &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (!&lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;.TryParse(dataReader[&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;PageCount&amp;quot;&lt;/span&gt;].ToString(), &lt;span style=&quot;color: #0000ff&quot;&gt;out&lt;/span&gt; pageCount))&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum29&quot;&gt;  29:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum30&quot;&gt;  30:&lt;/span&gt;                     Logger.Error(&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Error parsing PageCount&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum31&quot;&gt;  31:&lt;/span&gt;                     &lt;span style=&quot;color: #0000ff&quot;&gt;continue&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum32&quot;&gt;  32:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum33&quot;&gt;  33:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum34&quot;&gt;  34:&lt;/span&gt;                 &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (dataReader[&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;FileName&amp;quot;&lt;/span&gt;] == &lt;span style=&quot;color: #0000ff&quot;&gt;null&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum35&quot;&gt;  35:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum36&quot;&gt;  36:&lt;/span&gt;                     Logger.Error(&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Error parsing FileName&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum37&quot;&gt;  37:&lt;/span&gt;                     &lt;span style=&quot;color: #0000ff&quot;&gt;continue&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum38&quot;&gt;  38:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum39&quot;&gt;  39:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum40&quot;&gt;  40:&lt;/span&gt;                 &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (dataReader[&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;name&amp;quot;&lt;/span&gt;].ToString().ToLower() == &lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;sysrecyclebin&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum41&quot;&gt;  41:&lt;/span&gt;                     || dataReader[&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;name&amp;quot;&lt;/span&gt;].ToString().ToLower() == &lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;sysroot&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum42&quot;&gt;  42:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum43&quot;&gt;  43:&lt;/span&gt;                     &lt;span style=&quot;color: #0000ff&quot;&gt;continue&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum44&quot;&gt;  44:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum45&quot;&gt;  45:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum46&quot;&gt;  46:&lt;/span&gt;                 PageTypeUsage pageTypeUsage = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; PageTypeUsage&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum47&quot;&gt;  47:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum48&quot;&gt;  48:&lt;/span&gt;                         PageTypeId = id,&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum49&quot;&gt;  49:&lt;/span&gt;                         PageTypeName = (&lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt;)dataReader[&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Name&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum50&quot;&gt;  50:&lt;/span&gt;                         FileName = (&lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt;)dataReader[&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;FileName&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum51&quot;&gt;  51:&lt;/span&gt;                         CountPages = pageCount,&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum52&quot;&gt;  52:&lt;/span&gt;                         CountWorkPages = GetNumberOfPagesForPageTypeFromDatabase(id, SqlCountWorkPages)&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum53&quot;&gt;  53:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum54&quot;&gt;  54:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum55&quot;&gt;  55:&lt;/span&gt;                 results.Add(pageTypeUsage);&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum56&quot;&gt;  56:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum57&quot;&gt;  57:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum58&quot;&gt;  58:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum59&quot;&gt;  59:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;catch&lt;/span&gt; (Exception ex)&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum60&quot;&gt;  60:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum61&quot;&gt;  61:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt; errorMessage = &lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Error occured retrieving pagetype usage&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum62&quot;&gt;  62:&lt;/span&gt;         Logger.Error(errorMessage);&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum63&quot;&gt;  63:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;throw&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; Exception(errorMessage, ex);&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum64&quot;&gt;  64:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum65&quot;&gt;  65:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;finally&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum66&quot;&gt;  66:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum67&quot;&gt;  67:&lt;/span&gt;         conn.Close();&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum68&quot;&gt;  68:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum69&quot;&gt;  69:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum70&quot;&gt;  70:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; results;&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum71&quot;&gt;  71:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum72&quot;&gt;  72:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum73&quot;&gt;  73:&lt;/span&gt; &lt;span style=&quot;color: #008000&quot;&gt;/// &amp;lt;summary&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum74&quot;&gt;  74:&lt;/span&gt; &lt;span style=&quot;color: #008000&quot;&gt;/// Gets the number of pages a for page type from database.&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum75&quot;&gt;  75:&lt;/span&gt; &lt;span style=&quot;color: #008000&quot;&gt;/// &amp;lt;/summary&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum76&quot;&gt;  76:&lt;/span&gt; &lt;span style=&quot;color: #008000&quot;&gt;/// &amp;lt;param name=&amp;quot;pageTypeId&amp;quot;&amp;gt;Page type id to count pages for&amp;lt;/param&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum77&quot;&gt;  77:&lt;/span&gt; &lt;span style=&quot;color: #008000&quot;&gt;/// &amp;lt;param name=&amp;quot;query&amp;quot;&amp;gt;Query to run against database&amp;lt;/param&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum78&quot;&gt;  78:&lt;/span&gt; &lt;span style=&quot;color: #008000&quot;&gt;/// &amp;lt;returns&amp;gt;&amp;lt;/returns&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum79&quot;&gt;  79:&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; GetNumberOfPagesForPageTypeFromDatabase(&lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; pageTypeId, &lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt; query)&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum80&quot;&gt;  80:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum81&quot;&gt;  81:&lt;/span&gt;     SqlConnection conn = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; SqlConnection(ConfigurationManager.ConnectionStrings[&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;EPiServerDB&amp;quot;&lt;/span&gt;].ConnectionString);&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum82&quot;&gt;  82:&lt;/span&gt;     SqlCommand cmd = conn.CreateCommand();&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum83&quot;&gt;  83:&lt;/span&gt;     cmd.CommandType = CommandType.Text;&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum84&quot;&gt;  84:&lt;/span&gt;     cmd.CommandText = &lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt;.Format(query, pageTypeId);&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum85&quot;&gt;  85:&lt;/span&gt;     conn.Open();&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum86&quot;&gt;  86:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;object&lt;/span&gt; pageCount = cmd.ExecuteScalar();&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum87&quot;&gt;  87:&lt;/span&gt;     conn.Close();&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum88&quot;&gt;  88:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum89&quot;&gt;  89:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; (&lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;)pageCount;&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum90&quot;&gt;  90:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum91&quot;&gt;  91:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;p&gt;Finally to retrieve the pages for each PageType we also execute the SQL statement and return the results. The first is similar to the above code when retrieving the PageTypes. For each PageType we call the &lt;em&gt;GetTop10PagesByPageType&lt;/em&gt; method that collects the recent pages for the PageType. For each retrieved Page we also need to construct the absolute URL. In the method ‘&lt;em&gt;GetUrlFromPageId&lt;/em&gt;’ we take in a page id and convert that to the absolute URL of the page.&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: &amp;#39;Courier New&amp;#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; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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;public&lt;/span&gt; List&amp;lt;PageUrlByPageType&amp;gt; GetPageUrlByPageType()&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum3&quot;&gt;   3:&lt;/span&gt;     List&amp;lt;PageUrlByPageType&amp;gt; results = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; List&amp;lt;PageUrlByPageType&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum4&quot;&gt;   4:&lt;/span&gt;     SqlConnection conn = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; SqlConnection(ConfigurationManager.ConnectionStrings[&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;EPiServerDB&amp;quot;&lt;/span&gt;].ConnectionString);&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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;try&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum7&quot;&gt;   7:&lt;/span&gt;         SqlCommand cmd = conn.CreateCommand();&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum8&quot;&gt;   8:&lt;/span&gt;         cmd.CommandType = CommandType.Text;&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum9&quot;&gt;   9:&lt;/span&gt;         cmd.CommandText = SqlPageTypeUsage;&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum10&quot;&gt;  10:&lt;/span&gt;         conn.Open();&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum11&quot;&gt;  11:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum12&quot;&gt;  12:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;using&lt;/span&gt; (IDataReader dataReader = cmd.ExecuteReader())&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum14&quot;&gt;  14:&lt;/span&gt;             &lt;span style=&quot;color: #0000ff&quot;&gt;while&lt;/span&gt; (dataReader.Read())&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum16&quot;&gt;  16:&lt;/span&gt;                 &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; id;&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum17&quot;&gt;  17:&lt;/span&gt;                 &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (!&lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;.TryParse(dataReader[&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Id&amp;quot;&lt;/span&gt;].ToString(), &lt;span style=&quot;color: #0000ff&quot;&gt;out&lt;/span&gt; id))&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum18&quot;&gt;  18:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum19&quot;&gt;  19:&lt;/span&gt;                     Logger.Error(&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Error parsing Id&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum20&quot;&gt;  20:&lt;/span&gt;                     &lt;span style=&quot;color: #0000ff&quot;&gt;continue&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum21&quot;&gt;  21:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum22&quot;&gt;  22:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum23&quot;&gt;  23:&lt;/span&gt;                 &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; pageCount;&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum24&quot;&gt;  24:&lt;/span&gt;                 &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (!&lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;.TryParse(dataReader[&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;PageCount&amp;quot;&lt;/span&gt;].ToString(), &lt;span style=&quot;color: #0000ff&quot;&gt;out&lt;/span&gt; pageCount))&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum25&quot;&gt;  25:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum26&quot;&gt;  26:&lt;/span&gt;                     Logger.Error(&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Error parsing PageCount&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum27&quot;&gt;  27:&lt;/span&gt;                     &lt;span style=&quot;color: #0000ff&quot;&gt;continue&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum28&quot;&gt;  28:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum29&quot;&gt;  29:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum30&quot;&gt;  30:&lt;/span&gt;                 &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (dataReader[&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;name&amp;quot;&lt;/span&gt;] == &lt;span style=&quot;color: #0000ff&quot;&gt;null&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum31&quot;&gt;  31:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum32&quot;&gt;  32:&lt;/span&gt;                     Logger.Error(&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Error parsing Name&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum33&quot;&gt;  33:&lt;/span&gt;                     &lt;span style=&quot;color: #0000ff&quot;&gt;continue&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum34&quot;&gt;  34:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum35&quot;&gt;  35:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum36&quot;&gt;  36:&lt;/span&gt;                 &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (dataReader[&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;name&amp;quot;&lt;/span&gt;].ToString().ToLower() == &lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;sysrecyclebin&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum37&quot;&gt;  37:&lt;/span&gt;                     || dataReader[&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;name&amp;quot;&lt;/span&gt;].ToString().ToLower() == &lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;sysroot&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum38&quot;&gt;  38:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum39&quot;&gt;  39:&lt;/span&gt;                     &lt;span style=&quot;color: #0000ff&quot;&gt;continue&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum40&quot;&gt;  40:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum41&quot;&gt;  41:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum42&quot;&gt;  42:&lt;/span&gt;                 PageUrlByPageType pageUrlByPageType = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; PageUrlByPageType&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum43&quot;&gt;  43:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum44&quot;&gt;  44:&lt;/span&gt;                         PageTypeId = id,&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum45&quot;&gt;  45:&lt;/span&gt;                         PageTypeName = (&lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt;)dataReader[&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;name&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum46&quot;&gt;  46:&lt;/span&gt;                         CountPages = pageCount,&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum47&quot;&gt;  47:&lt;/span&gt;                         PageUrls = GetTop10PagesByPageType(id)&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum48&quot;&gt;  48:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum49&quot;&gt;  49:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum50&quot;&gt;  50:&lt;/span&gt;                 results.Add(pageUrlByPageType);&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum51&quot;&gt;  51:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum52&quot;&gt;  52:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum53&quot;&gt;  53:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum54&quot;&gt;  54:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;catch&lt;/span&gt; (Exception ex)&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum55&quot;&gt;  55:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum56&quot;&gt;  56:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt; errorMessage = &lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Error occured retrieving pagetype usage&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum57&quot;&gt;  57:&lt;/span&gt;         Logger.Error(errorMessage);&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum58&quot;&gt;  58:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;throw&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; Exception(errorMessage, ex);&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum59&quot;&gt;  59:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum60&quot;&gt;  60:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;finally&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum61&quot;&gt;  61:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum62&quot;&gt;  62:&lt;/span&gt;         conn.Close();&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum63&quot;&gt;  63:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum64&quot;&gt;  64:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum65&quot;&gt;  65:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; results;&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum66&quot;&gt;  66:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum67&quot;&gt;  67:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum68&quot;&gt;  68:&lt;/span&gt; &lt;span style=&quot;color: #008000&quot;&gt;/// &amp;lt;summary&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum69&quot;&gt;  69:&lt;/span&gt; &lt;span style=&quot;color: #008000&quot;&gt;/// Gets the top 10 pages for a pagetype&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum70&quot;&gt;  70:&lt;/span&gt; &lt;span style=&quot;color: #008000&quot;&gt;/// &amp;lt;/summary&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum71&quot;&gt;  71:&lt;/span&gt; &lt;span style=&quot;color: #008000&quot;&gt;/// &amp;lt;returns&amp;gt;&amp;lt;/returns&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum72&quot;&gt;  72:&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; List&amp;lt;PageUrls&amp;gt; GetTop10PagesByPageType(&lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; pageTypeId)&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum73&quot;&gt;  73:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum74&quot;&gt;  74:&lt;/span&gt;     List&amp;lt;PageUrls&amp;gt; results = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; List&amp;lt;PageUrls&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum75&quot;&gt;  75:&lt;/span&gt;     SqlConnection conn = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; SqlConnection(ConfigurationManager.ConnectionStrings[&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;EPiServerDB&amp;quot;&lt;/span&gt;].ConnectionString);&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum76&quot;&gt;  76:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;try&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum77&quot;&gt;  77:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum78&quot;&gt;  78:&lt;/span&gt;         SqlCommand cmd = conn.CreateCommand();&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum79&quot;&gt;  79:&lt;/span&gt;         cmd.CommandType = CommandType.Text;&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum80&quot;&gt;  80:&lt;/span&gt;         cmd.CommandText = &lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt;.Format(SqlTop10PagesByPageType, pageTypeId);&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum81&quot;&gt;  81:&lt;/span&gt;         conn.Open();&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum82&quot;&gt;  82:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum83&quot;&gt;  83:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;using&lt;/span&gt; (IDataReader dataReader = cmd.ExecuteReader())&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum84&quot;&gt;  84:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum85&quot;&gt;  85:&lt;/span&gt;             &lt;span style=&quot;color: #0000ff&quot;&gt;while&lt;/span&gt; (dataReader.Read())&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum86&quot;&gt;  86:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum87&quot;&gt;  87:&lt;/span&gt;                 &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; id;&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum88&quot;&gt;  88:&lt;/span&gt;                 &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (!&lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;.TryParse(dataReader[&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Id&amp;quot;&lt;/span&gt;].ToString(), &lt;span style=&quot;color: #0000ff&quot;&gt;out&lt;/span&gt; id))&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum89&quot;&gt;  89:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum90&quot;&gt;  90:&lt;/span&gt;                     Logger.Error(&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Error parsing Id&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum91&quot;&gt;  91:&lt;/span&gt;                     &lt;span style=&quot;color: #0000ff&quot;&gt;continue&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum92&quot;&gt;  92:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum93&quot;&gt;  93:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum94&quot;&gt;  94:&lt;/span&gt;                 &lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt; url = GetUrlFromPageId(id);&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum95&quot;&gt;  95:&lt;/span&gt;                 &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt;.IsNullOrEmpty(url))&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum96&quot;&gt;  96:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum97&quot;&gt;  97:&lt;/span&gt;                     &lt;span style=&quot;color: #0000ff&quot;&gt;continue&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum98&quot;&gt;  98:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum99&quot;&gt;  99:&lt;/span&gt;                 PageUrls pageUrls = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; PageUrls&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum100&quot;&gt; 100:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum101&quot;&gt; 101:&lt;/span&gt;                         PageId = id,&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum102&quot;&gt; 102:&lt;/span&gt;                         PageUrl = url&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum103&quot;&gt; 103:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum104&quot;&gt; 104:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum105&quot;&gt; 105:&lt;/span&gt;                 results.Add(pageUrls);&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum106&quot;&gt; 106:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum107&quot;&gt; 107:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum108&quot;&gt; 108:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum109&quot;&gt; 109:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;catch&lt;/span&gt; (Exception ex)&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum110&quot;&gt; 110:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum111&quot;&gt; 111:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt; errorMessage = &lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Error occured retrieving Top10PagesByPageType&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum112&quot;&gt; 112:&lt;/span&gt;         Logger.Error(errorMessage);&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum113&quot;&gt; 113:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;throw&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; Exception(errorMessage, ex);&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum114&quot;&gt; 114:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum115&quot;&gt; 115:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;finally&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum116&quot;&gt; 116:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum117&quot;&gt; 117:&lt;/span&gt;         conn.Close();&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum118&quot;&gt; 118:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum119&quot;&gt; 119:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum120&quot;&gt; 120:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; results;&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum121&quot;&gt; 121:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum122&quot;&gt; 122:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum123&quot;&gt; 123:&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;protected&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt; GetUrlFromPageId(&lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; id)&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum124&quot;&gt; 124:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum125&quot;&gt; 125:&lt;/span&gt;     PageData page = DataFactory.Instance.GetPage(&lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; PageReference(id));&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum126&quot;&gt; 126:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (page.LinkType == PageShortcutType.External)&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum127&quot;&gt; 127:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum128&quot;&gt; 128:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;null&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum129&quot;&gt; 129:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum130&quot;&gt; 130:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum131&quot;&gt; 131:&lt;/span&gt;     UrlBuilder ub = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; UrlBuilder(page.LinkURL);&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum132&quot;&gt; 132:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum133&quot;&gt; 133:&lt;/span&gt;     EPiServer.Web.FriendlyUrlRewriteProvider urm = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; EPiServer.Web.FriendlyUrlRewriteProvider();&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum134&quot;&gt; 134:&lt;/span&gt;     urm.ConvertToExternal(ub, page.PageLink, Encoding.UTF8);&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum135&quot;&gt; 135:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum136&quot;&gt; 136:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt; siteUrl = EPiServer.Configuration.Settings.Instance.SiteUrl.AbsoluteUri;&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum137&quot;&gt; 137:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (siteUrl.EndsWith(&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;/&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum138&quot;&gt; 138:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum139&quot;&gt; 139:&lt;/span&gt;         siteUrl = siteUrl.TrimEnd(&lt;span style=&quot;color: #006080&quot;&gt;&#39;/&#39;&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum140&quot;&gt; 140:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum141&quot;&gt; 141:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt;.Concat(siteUrl, ub.Uri.ToString());&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum142&quot;&gt; 142:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum143&quot;&gt; 143:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;That’s it. In the above post I’ve explained the use of the plugin and how you can develop it. This plugin has proven to be very useful in support for any client question on pages, and for debugging purposes as well. This plugin provides a good insight in the way your editors are using the defined PageTypes and how they use them to create pages. Hopefully this post has helped you to understand the basics and explained the use of it in everyday production environments. &lt;/p&gt;</description>
            <guid>http://world.episerver.com/Blogs/Eric-Vanderfeesten/Dates/2013/5/PageType-Usage-Plugin-with-Recent-Pages-for-each-PageType/</guid>
            <pubDate>Thu, 02 May 2013 12:31:00 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>Programing changes required while Upgrading Episerver Commerce R2 to R2SP1 and R2SP2 - Part 1</title>
            <link>http://world.episerver.com/Blogs/K-Khan-/Dates/2013/5/Programing-changes-required-while-Upgrading-Episerver-Commerce-R2-to-R2SP1-and-R2SP2---Part-1/</link>
            <description>&lt;p&gt;   &lt;p&gt;Below is summary of issue that we have faced in upgrading different sites from R2 to R2SP1 and R2SP2. &lt;/p&gt;     &lt;/p&gt;  &lt;h2&gt;Basic steps&lt;/h2&gt;  &lt;p&gt;&lt;a href=&quot;http://world.episerver.com/Documentation/Items/Installation-Instructions/EPiServer-Commerce/Upgrading-EPiServer-Commerce-from-version-1-R2-to-1-R2-SP1-/&quot;&gt;http://world.episerver.com/Documentation/Items/Installation-Instructions/EPiServer-Commerce/Upgrading-EPiServer-Commerce-from-version-1-R2-to-1-R2-SP1-/&lt;/a&gt;    &lt;br /&gt;And    &lt;br /&gt;&lt;a href=&quot;http://world.episerver.com/Documentation/Items/Installation-Instructions/EPiServer-Commerce/Upgrading-EPiServer-Commerce-from-version-1-R2-SP1-to-1-R2-SP2-/&quot;&gt;http://world.episerver.com/Documentation/Items/Installation-Instructions/EPiServer-Commerce/Upgrading-EPiServer-Commerce-from-version-1-R2-SP1-to-1-R2-SP2-/&lt;/a&gt;&lt;/p&gt;  &lt;h2&gt;&amp;#160;&lt;/h2&gt;  &lt;h2&gt;&amp;#160;&lt;/h2&gt;  &lt;h2&gt;&amp;#160;&lt;/h2&gt;  &lt;h2&gt;Breaking changes:&lt;/h2&gt;  &lt;p&gt;&lt;strong&gt;1 - Issue:     &lt;br /&gt;&lt;/strong&gt;If you try to import the business foundation object / meta-class but you get Access Denied exception. Please check the access to the path     &lt;br /&gt;%CommerceManager%\\app_data\\ImportExport\\Commerce Manager\\metadata&#39;. &lt;/p&gt;  &lt;p&gt;Fix:   &lt;br /&gt;If this folder doesn’t exist, please create it.&lt;/p&gt;  &lt;p&gt;   &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;2 - IShippingGateway:&lt;/strong&gt;&lt;/p&gt; &lt;/p&gt;  &lt;p&gt;Issue:    &lt;br /&gt;Backward compatability Issue. In Commerce R2SP1, IShippingGateway required implement ShippingRate GetRate(Guid methodId, Shipment shipment, ref string message), not ShippingRate GetRate(Guid methodId, LineItem[] items, ref string message). &lt;/p&gt;  &lt;p&gt;Fix:   &lt;br /&gt;Therefore you need to add the new implementation for GetRate in your custom ShippingGateway and change all the call to GetRate function. Then rebuild the solution.&lt;/p&gt;  &lt;p&gt;       &lt;p&gt;&lt;strong&gt;3 - Browsing the site and see the error:&lt;/strong&gt;      &lt;br /&gt;Issue:      &lt;br /&gt;The Type &#39;EPiServer.Business.Commerce.CommerceSettings&#39; needs to be remapped in the Dynamic Data Store, see the Errors collection for more information.&lt;/p&gt; &lt;/p&gt;  &lt;p&gt;Fix:   &lt;br /&gt;Remapping can be done by applying the EPiServer.Data.Dynamic.EPiServerDataStoreAttribute attribute to the type,    &lt;br /&gt;setting its AutomaticallyRemapStore property to true and ensuring the &amp;lt;episerver.dataStore&amp;gt;&amp;lt;dataStore&amp;gt; autoRemapStores attribute in web.config is set to true (or is not defined).    &lt;br /&gt;Alternatively call the Upgrade-EPiRemapDDSTypes cmdlet from Powershell.&lt;/p&gt;  &lt;p&gt;Please run these commands in PowerShell:   &lt;br /&gt;Add-PSSnapin EPiServer.Framework.Install.6.2.267.1    &lt;br /&gt;Upgrade-EPiRemapDDSTypes -ApplicationPath $applicationPath -Type &amp;quot;EPiServer.Business.Commerce.CommerceSettings&amp;quot;     &lt;br /&gt;$appllicationPath is the path to root folder of cms site.&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;&lt;strong&gt;4 - Changes in index data and searching for catalognode:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;If we want to search for the entries/products in a catalognode, we need to use the _outline field. The code should look like this:   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; if (String.IsNullOrEmpty(categoryCode))    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; var productRootNode = CatalogContext.Current.GetCatalogNodes(CommerceSettings.Default.MainCatalogName, CommerceSettings.Default.ProductNodeCode);    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; if (productRootNode.CatalogNode.Count() &amp;lt;= 0)    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; return new List&amp;lt;Entry&amp;gt;();    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; foreach (var node in productRootNode.CatalogNode)    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; //criteria.CatalogNodes.Add(node.ID);    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; else    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; //criteria.CatalogNodes.Add(categoryCode);    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; criteria.Outlines = SearchFilterHelper.GetOutlinesForNode(categoryCode);    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; criteria.CatalogNames.Add(CommerceSettings.Default.MainCatalogName);    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; criteria.StartingRecord = 0;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; criteria.RecordsToRetrieve = 1000;&lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; var entries = SearchFilterHelper.Current.SearchEntries(criteria, out count,   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; entryResponseGroup, false,    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; new TimeSpan(0, 0, 0));    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; if (entries.TotalResults == 0)&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;5 - After rebuilding and building the index, you can get the exception when searching on the site, you can get exception:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Issue:   &lt;br /&gt;System.IndexOutOfRangeException was unhandled by user code    &lt;br /&gt;&amp;#160; Message=Index was outside the bounds of the array.    &lt;br /&gt;&amp;#160; Source=Lucene.Net    &lt;br /&gt;&amp;#160; StackTrace:    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at Lucene.Net.Index.DocumentsWriter.Abort(AbortException ae)    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at Lucene.Net.Index.DocumentsWriter.UpdateDocument(Document doc, Analyzer analyzer, Term delTerm)&lt;/p&gt;  &lt;p&gt;Fix:   &lt;br /&gt;The can be fixed by applying the CustomSearchProvider.&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;&lt;strong&gt;6 - Add the AuthorizedPaymentTotal by code when you see the error below:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Issue:   &lt;br /&gt;Cannot insert the value NULL into column &#39;AuthorizedPaymentTotal&#39;, table &#39;dbEPiServerCommerce.dbo.OrderForm&#39;; column does not allow nulls. UPDATE fails.    &lt;br /&gt;The statement has been terminated.     &lt;br /&gt;Exception Details: System.Data.SqlClient.SqlException: Cannot insert the value NULL into column &#39;AuthorizedPaymentTotal&#39;, table ‘dbEPiServerCommerce.dbo.OrderForm&#39;; column does not allow nulls. UPDATE fails.    &lt;br /&gt;The statement has been terminated.&lt;/p&gt;  &lt;p&gt;Fix:   &lt;br /&gt;//workaround for these fields not accepting nulls    &lt;br /&gt;cart.Cart.OrderForms[0].AuthorizedPaymentTotal = 0;     &lt;br /&gt;cart.Cart.OrderForms[0].CapturedPaymentTotal = 0;&lt;/p&gt;</description>
            <guid>http://world.episerver.com/Blogs/K-Khan-/Dates/2013/5/Programing-changes-required-while-Upgrading-Episerver-Commerce-R2-to-R2SP1-and-R2SP2---Part-1/</guid>
            <pubDate>Thu, 02 May 2013 11:03:57 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>Indexing only referenced VPP-files with EPiServer Find</title>
            <link>http://www.lindstromhenrik.com/indexing-only-referenced-vpp-files-with-episerver-find</link>
            <description>The EPiServer Find CMS integration does not index any files stored in the VPP by default. A convention is included in the integration that index files visible in the file manager and it is enabled by setting the VisibleInFilemanagerVPPIndexingConvention on the FilieIndexer conventions...</description>
            <guid>http://www.lindstromhenrik.com/indexing-only-referenced-vpp-files-with-episerver-find</guid>
            <pubDate>Thu, 02 May 2013 07:00:00 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>List of XForm System Localization Keys in EPiServer 7</title>
            <link>http://cjsharp1.github.io/blog/2013/04/30/list-of-xform-system-localization-keys-in-episerver-7</link>
            <description>&lt;p&gt;I&#39;ve recently been working on translating text that is displayed along with an XForm property. Since the localizations that are shipped with EPiServer 7 are now embedded in the assemblies, it&#39;s not as easy as searching through an XML file for the keys you need to override. So, as a reference, here are the system localization keys related to XForms that are embedded into EPiServer 7.&lt;/p&gt;

&lt;!-- more --&gt;


&lt;p&gt;These are keys and values:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;/xform/datatypes/date1/caption: Date (DD/MM/YYYY) 
/xform/datatypes/date1/inlineerrormessage: Not a valid date. Please enter a date in the format &quot;DD/MM/YYYY&quot;. 
/xform/datatypes/date1/summaryerrormessage: * is not a valid date. Please enter a date in the format &quot;DD/MM/YYYY&quot;. 
/xform/datatypes/date2/caption: Date (MM/DD/YYYY) 
/xform/datatypes/date2/inlineerrormessage: Not a valid date. Please enter a date in the format &quot;MM/DD/YYYY&quot;. 
/xform/datatypes/date2/summaryerrormessage: * is not a valid date. Please enter a date in the format &quot;MM/DD/YYYY&quot;. 
/xform/datatypes/defaulttype/inlineerrormessage: You have entered characters that are not permitted (&quot;&amp;lt;&quot; or &quot;&amp;gt;&quot;). 
/xform/datatypes/defaulttype/summaryerrormessage: You have entered characters that are not permitted (&quot;&amp;lt;&quot; or &quot;&amp;gt;&quot;). 
/xform/datatypes/email/caption: E-mail address 
/xform/datatypes/email/inlineerrormessage: Not a valid e-mail address. 
/xform/datatypes/email/summaryerrormessage: * is not a valid e-mail address. 
/xform/datatypes/integer/caption: Integer 
/xform/datatypes/integer/inlineerrormessage: Not a valid integer. 
/xform/datatypes/integer/summaryerrormessage: * is not a valid integer. 
/xform/datatypes/isodate/caption: Date (YYYY-MM-DD) 
/xform/datatypes/isodate/inlineerrormessage: Not a valid date. Please enter a date in the format &quot;YYYY-MM-DD&quot;. 
/xform/datatypes/isodate/summaryerrormessage: * is not a valid date. Please enter a date in the format &quot;YYYY-MM-DD&quot;. 
/xform/datatypes/positiveinteger/caption: Positive integer 
/xform/datatypes/positiveinteger/inlineerrormessage: Not a valid positive integer. 
/xform/datatypes/positiveinteger/summaryerrormessage: * is not a valid positive integer. 
/xform/denymultipleposts: You have already filled in this form 
/xform/errorpostingtocustomurl: The form could not be sent to a custom address 
/xform/errorpostingtodatabase: The form could not be sent to the database 
/xform/errorpostingtoemail: The form could not be sent to an e-mail address 
/xform/requiredfield/inlineerrormessage: This field is required 
/xform/requiredfield/summaryerrormessage: You haven&#39;t specified all required fields 
/xform/requiredfield/summaryerrormessageformat: You have not specified the required field &quot;{0}&quot;. 
/xform/requirelogon: You must be logged in to answer
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;As you can see, the keys are primarily used to supply the error messages for the validations, and are unrelated to the localization of any other elements in the XForm.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://cjsharp.com/blog/2013/04/11/working-with-localization-and-language-branches-in-episerver-7-mvc/&quot;&gt;As I mentioned in a previous post&lt;/a&gt;, the old &#39;lang&#39; folder has disappeared with the release of EPiServer 7, and &lt;a href=&quot;http://sdkbeta.episerver.com/SDK-html-Container/?path=/SdkDocuments/EPiServerFramework/7/Knowledge%20Base/Developer%20Guide/Localization/Replacing%20LanguageManager%20with%20LocalizationService.htm&amp;amp;vppRoot=/SdkDocuments//EPiServerFramework/7/Knowledge%20Base/Developer%20Guide/&quot;&gt;the documentation explained why&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;If you want to override the system localizations that are shipped with EPiServer products, you will notice that the language files are no longer installed in the lang folder. They are now instead embedded in the assemblies but just as before you can override individual string by placing your own language XML in the lang folder. Of course you can include your localizations through any other LocalizationProvider and they will take precedence over the system localizations as long as the provider is registered before the system ones.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;These translations live in the &#39;en&#39; language branch, which is EPiServer&#39;s default language branch. With the proper localization fallback behavior configured, you&#39;ll see these translations for any language branch. If you want to customize the translations for the &#39;en&#39; language branch, or for a completely different language branch, you would just need add them to your own language XML file and specify the language, which would look something like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&amp;gt;
&amp;lt;languages&amp;gt;
  &amp;lt;language name=&quot;English (United States)&quot; id=&quot;en-US&quot;&amp;gt;
    &amp;lt;xform&amp;gt;
      &amp;lt;requirelogon&amp;gt;Custom logged in alert&amp;lt;/requirelogon&amp;gt;
      &amp;lt;datatypes&amp;gt;
        &amp;lt;email&amp;gt;
          &amp;lt;inlineerrormessage&amp;gt;Custom email error&amp;lt;/inlineerrormessage&amp;gt;
        &amp;lt;/email&amp;gt;
      &amp;lt;/datatypes&amp;gt;
    &amp;lt;/xform&amp;gt;
  &amp;lt;/language&amp;gt;
&amp;lt;/languages&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;If you&#39;re curious about the code I used to get the list, it&#39;s actually pretty simple. You could easily customize this code to retrieve any other system localization areas that you need to override:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;var resources = LocalizationService.Current.GetAllStrings().Where(t =&amp;gt; t.Key.StartsWith(&quot;/xform&quot;)).ToList();
&lt;/code&gt;&lt;/pre&gt;
</description>
            <guid>http://cjsharp1.github.io/blog/2013/04/30/list-of-xform-system-localization-keys-in-episerver-7</guid>
            <pubDate>Wed, 01 May 2013 06:27:00 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>Installing Lucene Solr for EPiServer Commerce (EPi 6) Catalog Search</title>
            <link>http://jorgedoig.com/?p=74</link>
            <description>By default, EPiServer Commerce uses Apache Lucene to perform its catalog search. Though within the files in Commerce Manager there exists Solr. They provide the&#160;necessary&#160;files to install Solr to your Apache search. Why Solr over Lucene? Well Solr wraps around&lt;span class=&quot;ellipsis&quot;&gt;&amp;#8230;&lt;/span&gt;&lt;div class=&quot;read-more&quot;&gt;&lt;a href=&quot;http://jorgedoig.com/installing-lucene-solr-for-episerver-commerce-epi-6-catalog-search/&quot;&gt;Read more &amp;#8250;&lt;/a&gt;&lt;/div&gt;&lt;!-- end of .read-more --&gt;</description>
            <guid>http://jorgedoig.com/?p=74</guid>
            <pubDate>Tue, 30 Apr 2013 14:53:13 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>The annoying “error CS1031: Type expected” after upgrade site from CMS5R2 to CMS6</title>
            <link>http://world.episerver.com/Blogs/Jonas-Lindau/Dates/2013/4/The-annoying-error-CS1031-Type-expected-after-upgrade-site-from-CMS5R2-to-CMS6/</link>
            <description>&lt;p&gt;A few days ago a colleague upgraded a EPiServer site using Deployment Center and got this strange error. According to the dump the error was related to /Shell/Views/Shared/Site.Master. I knew the site was working correctly on my development machine, and I also knew the site was working fine in the test environment, so I ruled out any code-issues. Since there was already a lot of sites running on the production servers I also ruled out any missing dependencies. So what’s left? The Web.config of course!&lt;/p&gt;  &lt;p&gt;The natural approach to find the error was to compare the non-working web.config in the production environment, with the working web.config from the test environment. That turned out to be an easy task since the only thing that was different was three lines, all which had to do with MVC!&lt;/p&gt;  &lt;p&gt;For some reason Deployment Center didn’t care to replace the version of MVC on the production servers. It worked for the same site on my development machine and for the test servers. It also always worked for other sites on out production servers, but not this time.&lt;/p&gt;  &lt;p&gt;So what I did was change the version numbers for System.Web.Mvc as below:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;This is how it looked after upgrade&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;lt;dependentAssembly&amp;gt;   &lt;br /&gt;&amp;#160; &amp;lt;assemblyIdentity name=&amp;quot;System.Web.Mvc&amp;quot; publicKeyToken=&amp;quot;31bf3856ad364e35&amp;quot; culture=&amp;quot;neutral&amp;quot; /&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;bindingRedirect oldVersion=&amp;quot;1.0.0.0-1.65535.65535.65535&amp;quot; newVersion=&amp;quot;1.0.0.0&amp;quot; /&amp;gt;    &lt;br /&gt;&amp;lt;/dependentAssembly&amp;gt;&lt;/p&gt;  &lt;p&gt;&amp;lt;compilation defaultLanguage=&amp;quot;c#&amp;quot; debug=&amp;quot;false&amp;quot;&amp;gt;   &lt;br /&gt;&amp;#160; &amp;lt;assemblies&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;add assembly=&amp;quot;System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&amp;quot; /&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;/assemblies&amp;gt;    &lt;br /&gt;&amp;lt;/compilation&amp;gt;&lt;/p&gt;  &lt;p&gt;&amp;lt;pages validateRequest=&amp;quot;false&amp;quot; enableEventValidation=&amp;quot;false&amp;quot; pageParserFilterType=&amp;quot;System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&amp;quot;&amp;gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;This is what I did change to make it work&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;lt;dependentAssembly&amp;gt;   &lt;br /&gt;&amp;#160; &amp;lt;assemblyIdentity name=&amp;quot;System.Web.Mvc&amp;quot; publicKeyToken=&amp;quot;31bf3856ad364e35&amp;quot; culture=&amp;quot;neutral&amp;quot; /&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;bindingRedirect oldVersion=&amp;quot;1.0.0.0-2.0.0.0&amp;quot; newVersion=&amp;quot;2.0.0.0&amp;quot; /&amp;gt;    &lt;br /&gt;&amp;lt;/dependentAssembly&amp;gt;    &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&amp;lt;compilation defaultLanguage=&amp;quot;c#&amp;quot; debug=&amp;quot;false&amp;quot;&amp;gt;   &lt;br /&gt;&amp;#160; &amp;lt;assemblies&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;add assembly=&amp;quot;System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&amp;quot; /&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;/assemblies&amp;gt;    &lt;br /&gt;&amp;lt;/compilation&amp;gt;&lt;/p&gt;  &lt;p&gt;&amp;lt;pages validateRequest=&amp;quot;false&amp;quot; enableEventValidation=&amp;quot;false&amp;quot; pageParserFilterType=&amp;quot;System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&amp;quot;&amp;gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;And the error is gone!&lt;/p&gt;</description>
            <guid>http://world.episerver.com/Blogs/Jonas-Lindau/Dates/2013/4/The-annoying-error-CS1031-Type-expected-after-upgrade-site-from-CMS5R2-to-CMS6/</guid>
            <pubDate>Tue, 30 Apr 2013 11:01:43 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>EditPanel Manager</title>
            <link>http://world.episerver.com/Blogs/Eric-Vanderfeesten/Dates/2013/4/EditPanel-Manager/</link>
            <description>&lt;p&gt;In order to keep the Edit Panel as clean as can be, I’ve written a small extension that enhances the ability to disable and hide buttons in the EditPanel for specific PageTypes. This post explains the setup for the EditPanelManager extension, which options it currently supports and how the implementation has been done. The main objective of this post is to give insight in a possible solution to the problem and should not by default be read as the best solution. While all code is usable and tested it could well be optimized at places.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The challenge&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The Edit Panel, as you probably know, is one of the areas for which you can use a GuiPlugIn with Area set to PlugInArea.EditPanel to add custom tabs. With these tabs you can add specific functionality to pages or PageTypes for instance which can improve the work for your editors in case you need to provide some functionality that otherwise would mean manual selection or at least non trivial work.&lt;/p&gt;  &lt;p&gt;While this is a great way to extend your specific pages or PageTypes, adding a multitude of these custom GuiPlugIns can make the Edit Panel a bit overwhelming to your editors in the number of tabs they see. Most of the times however your editors won’t be using all of these tabs frequently. Some tabs probably won’t be used at all throughout the site, and perhaps some tabs are only used for a specific PageType.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The basics&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;This extension uses an xml configuration file to manage the tabs in the EditPanel for our PageTypes. I’ll start by explaining this configuration. Further down the post I’ll show how we can hook into EPiServer to influence the actual tabs being displayed in the EditPanel.&lt;/p&gt;  &lt;p&gt;Let’s start with the structure of the xml configuration file. This will explain all of the options that are available in this extension and will provide the basis insights on what to do with those options.&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: &amp;#39;Courier New&amp;#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; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum1&quot;&gt;   1:&lt;/span&gt; &amp;lt;episervereditpanelmanager&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum2&quot;&gt;   2:&lt;/span&gt;   &amp;lt;pagetypes&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum3&quot;&gt;   3:&lt;/span&gt;     &amp;lt;type name=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;MyPageTypeName&amp;quot;&lt;/span&gt; active=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;MyDefaultEditPanelTab&amp;quot;&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum4&quot;&gt;   4:&lt;/span&gt;       &amp;lt;properties&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum5&quot;&gt;   5:&lt;/span&gt;         &amp;lt;property name=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;MyFirstEditPanelTabName&amp;quot;&lt;/span&gt; enable=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;true&amp;quot;&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum6&quot;&gt;   6:&lt;/span&gt;         &amp;lt;property name=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;MySecondEditPanelTabName&amp;quot;&lt;/span&gt; enable=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;false&amp;quot;&lt;/span&gt; ignoreroles=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;MyUserRole&amp;quot;&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum7&quot;&gt;   7:&lt;/span&gt;       &amp;lt;/properties&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum8&quot;&gt;   8:&lt;/span&gt;     &amp;lt;/type&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum9&quot;&gt;   9:&lt;/span&gt;   &amp;lt;/pagetypes&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum10&quot;&gt;  10:&lt;/span&gt; &amp;lt;/episervereditpanelmanager&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;The type element&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Within the ‘&lt;em&gt;pagetypes&lt;/em&gt;’ node you set up a ‘&lt;em&gt;type&lt;/em&gt;’ element. Each type element reflects a single PageType in your EPiServer site structure. The are two attributes on the type element. The first is the ‘&lt;em&gt;name&lt;/em&gt;’ attribute, which is mandatory. The name attribute contains the name of the PageType that you want to manage the EditPanel tabs for. The second attribute is the ‘&lt;em&gt;active&lt;/em&gt;’ attribute, which is optional. This attribute contains the name of the EditPanel tab that you want to set as the default tab which is displayed when an editor selects a page from the PageTree (Note: if this is the same for all your PageTypes or there is no need to customize this for each PageType you should probably use the ‘uiDefaultPanelTab’ in your EPiServer site configuration).&lt;/p&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;The property element&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Within the type element there is a single ‘&lt;em&gt;properties&lt;/em&gt;’ element that contains a number of ‘&lt;em&gt;property&lt;/em&gt;’ elements. Each property element reflects a tab that exists in the EditPanel; like the Preview tab, the Edit tab, the Workflow tab, the Version List tab etc. The are three attributes on the property element. The first is the ‘&lt;em&gt;name&lt;/em&gt;’ attribute, which is mandatory. The name attribute contains the name of the EditPanel tab that you want to manage. The second attribute is the ‘&lt;em&gt;enable&lt;/em&gt;’ attribute, also mandatory. The enable attribute is a Boolean and holds the values ‘true’ or ‘false’. If set to true, the EditPanel tab should be displayed. If set to false the EditPanel tab should not be displayed. The third attribute is the ‘&lt;em&gt;ignoreroles&lt;/em&gt;’ attribute, which is optional. This attribute can hold a comma separated list of user roles. This works as an override to the enable attribute. Users from these user roles are not taken into account on the enable attribute. In the above example this means that the ‘MySecondEditPanelTabName’ is not visible to anyone, except users from the ‘MyUserRole’ user role.&lt;/p&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;p&gt;Hopefully you’re still reading ;) The summary above highlights the functional use of the EditPanelManager extension. The next part will explain some more on how this can be achieved with some code examples as well. Before we get into that just another small example xml configuration. &lt;/p&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Pop quiz&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Try and see if you understand how this would affect the EditPanel of your site editors (Note: spoiler below the example!)&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: &amp;#39;Courier New&amp;#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; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum1&quot;&gt;   1:&lt;/span&gt; &amp;lt;episervereditpanelmanager&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum2&quot;&gt;   2:&lt;/span&gt;   &amp;lt;pagetypes&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum3&quot;&gt;   3:&lt;/span&gt;     &amp;lt;type name=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;TeaserPageType&amp;quot;&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum4&quot;&gt;   4:&lt;/span&gt;       &amp;lt;properties&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum5&quot;&gt;   5:&lt;/span&gt;         &amp;lt;property name=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;View&amp;quot;&lt;/span&gt; enable=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;false&amp;quot;&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum6&quot;&gt;   6:&lt;/span&gt;       &amp;lt;/properties&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum7&quot;&gt;   7:&lt;/span&gt;     &amp;lt;/type&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum8&quot;&gt;   8:&lt;/span&gt;     &amp;lt;type name=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;NewsPageType&amp;quot;&lt;/span&gt; active=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Edit&amp;quot;&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum9&quot;&gt;   9:&lt;/span&gt;       &amp;lt;properties&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum10&quot;&gt;  10:&lt;/span&gt;         &amp;lt;property name=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;View&amp;quot;&lt;/span&gt; enable=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;true&amp;quot;&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum11&quot;&gt;  11:&lt;/span&gt;         &amp;lt;property name=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Edit&amp;quot;&lt;/span&gt; enable=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;true&amp;quot;&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum12&quot;&gt;  12:&lt;/span&gt;         &amp;lt;property name=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Version List&amp;quot;&lt;/span&gt; enable=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;false&amp;quot;&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum13&quot;&gt;  13:&lt;/span&gt;         &amp;lt;property name=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Workflow&amp;quot;&lt;/span&gt; enable=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;false&amp;quot;&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum14&quot;&gt;  14:&lt;/span&gt;         &amp;lt;property name=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Statistics&amp;quot;&lt;/span&gt; enable=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;false&amp;quot;&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum15&quot;&gt;  15:&lt;/span&gt;       &amp;lt;/properties&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum16&quot;&gt;  16:&lt;/span&gt;     &amp;lt;/type&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum17&quot;&gt;  17:&lt;/span&gt;     &amp;lt;type name=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;EventPageType&amp;quot;&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum18&quot;&gt;  18:&lt;/span&gt;       &amp;lt;properties&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum19&quot;&gt;  19:&lt;/span&gt;         &amp;lt;property name=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;View&amp;quot;&lt;/span&gt; enable=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;true&amp;quot;&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum20&quot;&gt;  20:&lt;/span&gt;         &amp;lt;property name=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Edit&amp;quot;&lt;/span&gt; enable=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;false&amp;quot;&lt;/span&gt; ignoreroles=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;WebAdmins, WebEditors&amp;quot;&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum21&quot;&gt;  21:&lt;/span&gt;         &amp;lt;property name=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Version List&amp;quot;&lt;/span&gt; enable=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;false&amp;quot;&lt;/span&gt; ignoreroles=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;WebAdmins, WebEditors&amp;quot;&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum22&quot;&gt;  22:&lt;/span&gt;         &amp;lt;property name=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Workflow&amp;quot;&lt;/span&gt; enable=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;false&amp;quot;&lt;/span&gt; ignoreroles=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;WebAdmins, WebEditors&amp;quot;&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum23&quot;&gt;  23:&lt;/span&gt;         &amp;lt;property name=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Statistics&amp;quot;&lt;/span&gt; enable=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;false&amp;quot;&lt;/span&gt; ignoreroles=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;WebAdmins, WebEditors&amp;quot;&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum24&quot;&gt;  24:&lt;/span&gt;       &amp;lt;/properties&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum25&quot;&gt;  25:&lt;/span&gt;     &amp;lt;/type&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum26&quot;&gt;  26:&lt;/span&gt;   &amp;lt;/pagetypes&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum27&quot;&gt;  27:&lt;/span&gt; &amp;lt;/episervereditpanelmanager&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;p&gt;Ok, so how does the above configuration affect our editors?&lt;/p&gt;
&lt;p&gt;Once logged in, I won’t see the View tab in the EditPanel for the TeaserPageType. Further I won’t see the VersionList, Workflow and Statistics tab on the NewsPageType, and the Edit tab is the default tab when selecting a page of type NewsPageType in the PageTree. If the logged in user has the ‘WebAdmins’ user role he’ll see all five tabs on the EventPageType. If the logged in user has the ‘WebSpecialAdmins’ user role, he’ll only see the ‘View’ tab in the EditPanel.&lt;/p&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Technical Implementation&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;So far for the examples. As promised I’ll dive into the actual implementation.&lt;/p&gt;
&lt;p&gt;We start by creating a GuiPlugIn. Let’s call this ‘EditPanelManager’.&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: &amp;#39;Courier New&amp;#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; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum1&quot;&gt;   1:&lt;/span&gt; [GuiPlugIn(Area = PlugInArea.EditPanel)]&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;class&lt;/span&gt; EditPanelManager : ICustomPlugInLoader&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum3&quot;&gt;   3:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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;private&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;readonly&lt;/span&gt; ILog Logger = LogManager.GetLogger(&lt;span style=&quot;color: #0000ff&quot;&gt;typeof&lt;/span&gt;(EditPanelManager));&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum5&quot;&gt;   5:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum6&quot;&gt;   6:&lt;/span&gt;     &lt;span style=&quot;color: #008000&quot;&gt;//property that holds the current page type config element&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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;public&lt;/span&gt; EPiServerEditPanelManagerPageTypeConfigElement CurrentPageTypeConfigElement&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum9&quot;&gt;   9:&lt;/span&gt;         get; set;&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum10&quot;&gt;  10:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum11&quot;&gt;  11:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum12&quot;&gt;  12:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; PlugInDescriptor[] List()&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum14&quot;&gt;  14:&lt;/span&gt;         &lt;span style=&quot;color: #008000&quot;&gt;//hook LoadComplete-event on EditPanel page&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum15&quot;&gt;  15:&lt;/span&gt;         EPiServer.UI.Edit.EditPanel editPanel = HttpContext.Current.Handler &lt;span style=&quot;color: #0000ff&quot;&gt;as&lt;/span&gt; EPiServer.UI.Edit.EditPanel;&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum17&quot;&gt;  17:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #0000ff&quot;&gt;null&lt;/span&gt; != editPanel)&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum18&quot;&gt;  18:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum19&quot;&gt;  19:&lt;/span&gt;             &lt;span style=&quot;color: #008000&quot;&gt;//ADD SOME LOGIC HERE&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum20&quot;&gt;  20:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum21&quot;&gt;  21:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum22&quot;&gt;  22:&lt;/span&gt;         &lt;span style=&quot;color: #008000&quot;&gt;//Never return a plugin - we don&#39;t want to add tabs.&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum23&quot;&gt;  23:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; PlugInDescriptor[0] { };&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum24&quot;&gt;  24:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum25&quot;&gt;  25:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum26&quot;&gt;  26:&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; EditPanelLoadComplete(&lt;span style=&quot;color: #0000ff&quot;&gt;object&lt;/span&gt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum27&quot;&gt;  27:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum28&quot;&gt;  28:&lt;/span&gt;         &lt;span style=&quot;color: #008000&quot;&gt;//ADD SOME LOGIC HERE&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum29&quot;&gt;  29:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum30&quot;&gt;  30:&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;The next step is to implement the ‘&lt;i&gt;PlugInDescriptor[] List()&lt;/i&gt;’ method from the &lt;em&gt;ICustomPlugInLoader&lt;/em&gt; interface. In short we add an EventHandler to LoadComplete of the EditPanel if the PageType of the current page exists in our xml configuration file.&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: &amp;#39;Courier New&amp;#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; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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;public&lt;/span&gt; PlugInDescriptor[] List()&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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: #008000&quot;&gt;// hook LoadComplete-event on EditPanel page&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum4&quot;&gt;   4:&lt;/span&gt;     EPiServer.UI.Edit.EditPanel editPanel = HttpContext.Current.Handler &lt;span style=&quot;color: #0000ff&quot;&gt;as&lt;/span&gt; EPiServer.UI.Edit.EditPanel;&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum5&quot;&gt;   5:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum6&quot;&gt;   6:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #0000ff&quot;&gt;null&lt;/span&gt; != editPanel)&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum7&quot;&gt;   7:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum8&quot;&gt;   8:&lt;/span&gt;         &lt;span style=&quot;color: #008000&quot;&gt;//get the list of all registered pagetypes from the config file&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum9&quot;&gt;   9:&lt;/span&gt;         List&amp;lt;EPiServerEditPanelManagerPageTypeConfigElement&amp;gt; pageTypeList = EditPanelManagerHelper.GetPageTypeNamesFromConfig();&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum11&quot;&gt;  11:&lt;/span&gt;         &lt;span style=&quot;color: #008000&quot;&gt;//check if the pagetype of the current page exists in the list of pagetypes in the config file&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum12&quot;&gt;  12:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;try&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum14&quot;&gt;  14:&lt;/span&gt;             CurrentPageTypeConfigElement = pageTypeList.First(x =&amp;gt; x.Name.ToLower().Trim() == editPanel.CurrentPage.PageTypeName.ToLower().Trim());&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum16&quot;&gt;  16:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;catch&lt;/span&gt; (Exception ex)&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum17&quot;&gt;  17:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum18&quot;&gt;  18:&lt;/span&gt;             Logger.Debug(&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;error occured while getting the CurrentPageTypeConfigElement&amp;quot;&lt;/span&gt;, ex);&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum20&quot;&gt;  20:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum21&quot;&gt;  21:&lt;/span&gt;         &lt;span style=&quot;color: #008000&quot;&gt;//match found, add the event handler to the LoadComplete event of the editpanel&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum22&quot;&gt;  22:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (CurrentPageTypeConfigElement != &lt;span style=&quot;color: #0000ff&quot;&gt;null&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum23&quot;&gt;  23:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum24&quot;&gt;  24:&lt;/span&gt;             editPanel.LoadComplete += EditPanelLoadComplete;&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum25&quot;&gt;  25:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum26&quot;&gt;  26:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum27&quot;&gt;  27:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum28&quot;&gt;  28:&lt;/span&gt;     &lt;span style=&quot;color: #008000&quot;&gt;//Never return a plugin - we don&#39;t want to add tabs.&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum29&quot;&gt;  29:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; PlugInDescriptor[0] { };&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum30&quot;&gt;  30:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The EventHandler is added to manipulate the way the tabs in the EditPanel are rendered (Thanks to the article ‘&lt;a href=&quot;http://labs.episerver.com/en/Blogs/Allan/Dates/2009/1/Neat-Trick-Modifying-Edit-Mode-Tabs/&quot; target=&quot;_blank&quot;&gt;Neat Trick: Modifying Edit Mode Tabs&lt;/a&gt;’ by Allan Thr&#230;n).&lt;/p&gt;
&lt;p&gt;We also need to implement the LoadComplete event of the EditPanel for which we’ve added the new EventHandler in the ‘PlugInDescriptor[] List()’ method. There are three single line calls in the LoadComplete event. First we get the TabStrip object by looking for the ‘actionTab’ control. Secondly we retrieve all properties (the tabs) that are configured for the current page type in our xml configuration file. Finally, we call our Tab Manager that handles the processing of the individual tabs.&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: &amp;#39;Courier New&amp;#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; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; EditPanelLoadComplete(&lt;span style=&quot;color: #0000ff&quot;&gt;object&lt;/span&gt; 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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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: #008000&quot;&gt;// find the TabStrip with id = &amp;quot;actionTab&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum4&quot;&gt;   4:&lt;/span&gt;     TabStrip actionTabStrip = ControlHelper.FindControl&amp;lt;TabStrip&amp;gt;(sender &lt;span style=&quot;color: #0000ff&quot;&gt;as&lt;/span&gt; Control, &lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;actionTab&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum5&quot;&gt;   5:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum6&quot;&gt;   6:&lt;/span&gt;     &lt;span style=&quot;color: #008000&quot;&gt;//get all properties for this pagetype from the config file&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum7&quot;&gt;   7:&lt;/span&gt;     List&amp;lt;EPiServerEditPanelManagerPropertyConfigElement&amp;gt; elements =&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum8&quot;&gt;   8:&lt;/span&gt;         EditPanelManagerHelper.GetPropertyElementsFromPageTypeConfigElement(CurrentPageTypeConfigElement);&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum9&quot;&gt;   9:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum10&quot;&gt;  10:&lt;/span&gt;     &lt;span style=&quot;color: #008000&quot;&gt;//call our tab manager&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum11&quot;&gt;  11:&lt;/span&gt;     TabStripHelper.SetTabs(actionTabStrip, elements, CurrentPageTypeConfigElement.Active);&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum12&quot;&gt;  12:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Within both the ‘PlugInDescriptor[] List()’ method and the LoadComplete event method there are calls to certain Helper classes. Of course you can set this up any way you like. For this demo I’ve chosen to just simply set up two classes; the EditPanelManagerHelper and the TabStripHelper.&lt;/p&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;EditPanelManagerHelper&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;The EditPanelManagerHelper is used to retrieve the correct PageTypes and properties from our configuration file. It has two methods. The first method is ‘GetPageTypeNamesFromConfig()’ and reads the xml configuration file for all PageTypes defined using the &lt;em&gt;ConfigurationManager&lt;/em&gt;. The second method is ‘GetPropertyElementsFromPageTypeConfigElement()’ that reads all properties for a given PageType present in the xml configuration file.&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: &amp;#39;Courier New&amp;#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; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;class&lt;/span&gt; EditPanelManagerHelper&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;static&lt;/span&gt; List&amp;lt;EPiServerEditPanelManagerPageTypeConfigElement&amp;gt; GetPageTypeNamesFromConfig()&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum5&quot;&gt;   5:&lt;/span&gt;         List&amp;lt;EPiServerEditPanelManagerPageTypeConfigElement&amp;gt; list = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; List&amp;lt;EPiServerEditPanelManagerPageTypeConfigElement&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum6&quot;&gt;   6:&lt;/span&gt;         EPiServerEditPanelManagerConfigSection section = ConfigurationManager.GetSection(&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;episervereditpanelmanager&amp;quot;&lt;/span&gt;) &lt;span style=&quot;color: #0000ff&quot;&gt;as&lt;/span&gt; EPiServerEditPanelManagerConfigSection;&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; (section != &lt;span style=&quot;color: #0000ff&quot;&gt;null&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum9&quot;&gt;   9:&lt;/span&gt;             list.AddRange(section.PageTypes.Cast&amp;lt;EPiServerEditPanelManagerPageTypeConfigElement&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum10&quot;&gt;  10:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum11&quot;&gt;  11:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; list;&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum12&quot;&gt;  12:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum13&quot;&gt;  13:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum14&quot;&gt;  14:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;static&lt;/span&gt; List&amp;lt;EPiServerEditPanelManagerPropertyConfigElement&amp;gt; GetPropertyElementsFromPageTypeConfigElement(EPiServerEditPanelManagerPageTypeConfigElement ePiServerEditPanelManagerPageTypeConfigElement)&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum16&quot;&gt;  16:&lt;/span&gt;         &lt;span style=&quot;color: #008000&quot;&gt;//get element information from pagetype config node&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum17&quot;&gt;  17:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; ePiServerEditPanelManagerPageTypeConfigElement.Elements.Cast&amp;lt;EPiServerEditPanelManagerPropertyConfigElement&amp;gt;().ToList();&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum18&quot;&gt;  18:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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;&amp;#160;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;TabStripHelper&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;The second helper class is the TabStripHelper. This contains the actual logic that controls which tabs are displayed and which are hidden.&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: &amp;#39;Courier New&amp;#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; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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;private&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;readonly&lt;/span&gt; ILog Logger = LogManager.GetLogger(&lt;span style=&quot;color: #0000ff&quot;&gt;typeof&lt;/span&gt;(TabStripHelper));&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum2&quot;&gt;   2:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; SetTabs(TabStrip tabStrip, List&amp;lt;EPiServerEditPanelManagerPropertyConfigElement&amp;gt; elements, &lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt; activeTab)&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; (tabStrip == &lt;span style=&quot;color: #0000ff&quot;&gt;null&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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;return&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum9&quot;&gt;   9:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum10&quot;&gt;  10:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; firstVisibleTab = -1;&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum11&quot;&gt;  11:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; activeTabIndex = -1;&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum12&quot;&gt;  12:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; i = 0; i &amp;lt; tabStrip.Controls.Count; i++)&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; 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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum14&quot;&gt;  14:&lt;/span&gt;         Tab tab = (Tab)tabStrip.Controls[i];&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum15&quot;&gt;  15:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum16&quot;&gt;  16:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt; tabName = tab.Text.ToLower().Trim();&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum17&quot;&gt;  17:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum18&quot;&gt;  18:&lt;/span&gt;         &lt;span style=&quot;color: #008000&quot;&gt;//get element by tab name&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum19&quot;&gt;  19:&lt;/span&gt;         EPiServerEditPanelManagerPropertyConfigElement element = &lt;span style=&quot;color: #0000ff&quot;&gt;null&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum20&quot;&gt;  20:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (elements != &lt;span style=&quot;color: #0000ff&quot;&gt;null&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum21&quot;&gt;  21:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum22&quot;&gt;  22:&lt;/span&gt;             &lt;span style=&quot;color: #0000ff&quot;&gt;try&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum23&quot;&gt;  23:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum24&quot;&gt;  24:&lt;/span&gt;                 IEnumerable&amp;lt;EPiServerEditPanelManagerPropertyConfigElement&amp;gt; list = elements.ToList().Where(x =&amp;gt; x.Name.ToLower().Trim() == tabName);&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum25&quot;&gt;  25:&lt;/span&gt;                 &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (list.Any())&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum26&quot;&gt;  26:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum27&quot;&gt;  27:&lt;/span&gt;                     element = list.Single();&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum28&quot;&gt;  28:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum29&quot;&gt;  29:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum30&quot;&gt;  30:&lt;/span&gt;             &lt;span style=&quot;color: #0000ff&quot;&gt;catch&lt;/span&gt; (Exception ex)&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum31&quot;&gt;  31:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum32&quot;&gt;  32:&lt;/span&gt;                 Logger.Debug(&lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt;.Format(&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;error occured while getting the element for tab &#39;{0}&#39;&amp;quot;&lt;/span&gt;, tabName), ex);&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum33&quot;&gt;  33:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum34&quot;&gt;  34:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum35&quot;&gt;  35:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (element != &lt;span style=&quot;color: #0000ff&quot;&gt;null&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum36&quot;&gt;  36:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum37&quot;&gt;  37:&lt;/span&gt;             &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt;.IsNullOrEmpty(element.IgnoreRoles))&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum38&quot;&gt;  38:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum39&quot;&gt;  39:&lt;/span&gt;                 &lt;span style=&quot;color: #008000&quot;&gt;//set visibility&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum40&quot;&gt;  40:&lt;/span&gt;                 tab.Visible = element.Enable;&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum41&quot;&gt;  41:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum42&quot;&gt;  42:&lt;/span&gt;             &lt;span style=&quot;color: #0000ff&quot;&gt;else&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum43&quot;&gt;  43:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum44&quot;&gt;  44:&lt;/span&gt;                 &lt;span style=&quot;color: #008000&quot;&gt;//check current user roles&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum45&quot;&gt;  45:&lt;/span&gt;                 tab.Visible = (UserHasRole(element.IgnoreRoles) ? !element.Enable : element.Enable);&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum46&quot;&gt;  46:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum47&quot;&gt;  47:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum48&quot;&gt;  48:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum49&quot;&gt;  49:&lt;/span&gt;         &lt;span style=&quot;color: #008000&quot;&gt;//store first visible tab index&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum50&quot;&gt;  50:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (tab.Visible &amp;amp;&amp;amp; firstVisibleTab == -1)&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum51&quot;&gt;  51:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum52&quot;&gt;  52:&lt;/span&gt;             firstVisibleTab = i;&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum53&quot;&gt;  53:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum54&quot;&gt;  54:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum55&quot;&gt;  55:&lt;/span&gt;         &lt;span style=&quot;color: #008000&quot;&gt;//store given active tab index&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum56&quot;&gt;  56:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (!&lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt;.IsNullOrEmpty(activeTab) &amp;amp;&amp;amp; tab.Visible &amp;amp;&amp;amp; tabName == activeTab.ToLower())&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum57&quot;&gt;  57:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum58&quot;&gt;  58:&lt;/span&gt;             activeTabIndex = i;&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum59&quot;&gt;  59:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum60&quot;&gt;  60:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum61&quot;&gt;  61:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum62&quot;&gt;  62:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (tabStrip.SelectedTab == 0)&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum63&quot;&gt;  63:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum64&quot;&gt;  64:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; set = (activeTabIndex &amp;gt; -1 ? activeTabIndex : firstVisibleTab);&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum65&quot;&gt;  65:&lt;/span&gt;         tabStrip.SetSelectedTab(set);&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum66&quot;&gt;  66:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum67&quot;&gt;  67:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum68&quot;&gt;  68:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum69&quot;&gt;  69:&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;bool&lt;/span&gt; UserHasRole(&lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt; roles)&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum70&quot;&gt;  70:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum71&quot;&gt;  71:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt;.IsNullOrEmpty(roles))&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum72&quot;&gt;  72:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum73&quot;&gt;  73:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;true&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum74&quot;&gt;  74:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum75&quot;&gt;  75:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum76&quot;&gt;  76:&lt;/span&gt;     &lt;span style=&quot;color: #008000&quot;&gt;//get current user roles&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum77&quot;&gt;  77:&lt;/span&gt;     List&amp;lt;&lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt;&amp;gt; currentUserRoleList;&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum78&quot;&gt;  78:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;try&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum79&quot;&gt;  79:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum80&quot;&gt;  80:&lt;/span&gt;         List&amp;lt;&lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt;&amp;gt; list = EPiServer.Security.PrincipalInfo.Current.RoleList.ToList();&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum81&quot;&gt;  81:&lt;/span&gt;         currentUserRoleList = list.ConvertAll(x =&amp;gt; x.ToLower());&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum82&quot;&gt;  82:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum83&quot;&gt;  83:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;catch&lt;/span&gt; (Exception)&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum84&quot;&gt;  84:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum85&quot;&gt;  85:&lt;/span&gt;         Logger.Error(&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;error occured while handling the current user role list&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum86&quot;&gt;  86:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;true&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum87&quot;&gt;  87:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum88&quot;&gt;  88:&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; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum89&quot;&gt;  89:&lt;/span&gt;     List&amp;lt;&lt;span style=&quot;color: #0000ff&quot;&gt;string&lt;/span&gt;&amp;gt; roleList = roles.Split(&lt;span style=&quot;color: #006080&quot;&gt;&#39;,&#39;&lt;/span&gt;).ToList();&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum90&quot;&gt;  90:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; roleList.Any(role =&amp;gt; currentUserRoleList.Contains(role.ToLower().Trim()));&lt;/pre&gt;
&lt;!--CRLF--&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum91&quot;&gt;  91:&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; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum92&quot;&gt;  92:&lt;/span&gt;     }&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This helper class contains two methods. The ‘UserHasRole’ method has been added here for convenience, but you probably have another place for this in your codebase. It simply checks the current users role to the provided userrole list from the ‘ignoreroles’ attribute for the current PageType.&lt;/p&gt;
&lt;p&gt;The first method ‘SetTabs()’ holds three input parameters. The current TabStrip (which holds all tabs of the EditPanel), the list of tabs that you configured in your xml configuration file for the given PageType and the name of the activeTab if present in the xml configuration file. It simply iterates over all controls in the TabStrip and compares these to the xml configuration setup.&lt;/p&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;And there you have it, that’s all there is to it. As you can see this example shows how to influence the way tabs are rendered within the EditPanel and can possibly simplify the way your site editors experience the Edit Mode of EPiServer. Feel free to comment! &lt;/p&gt;</description>
            <guid>http://world.episerver.com/Blogs/Eric-Vanderfeesten/Dates/2013/4/EditPanel-Manager/</guid>
            <pubDate>Mon, 29 Apr 2013 23:00:00 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>ImageVault 4 addon update (v4.1.12)</title>
            <link>http://blog.imagevault.se/post/49177511775</link>
            <description>&lt;p&gt;We found an issue when using ImageVault 4 with EPiServer CMS 7 and a MVC site. The issue messes up the routing for the links on the site but this has been corrected and a new ImageVault addon version has been released. It will soon be placed at the official episerver feed but for now it resides on the ImageVault nuget feed.&lt;/p&gt;
&lt;p&gt;To update, add the following nuget feed to your site&lt;/p&gt;
&lt;blockquote&gt;
&lt;div&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://nuget.imagevault.se/nuget/&quot;&gt;http://nuget.imagevault.se/nuget/&lt;/a&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;p&gt;and then click the Install button on the ImageVault addon v 4.1.12.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&quot;image&quot; src=&quot;http://media.tumblr.com/0b15ed6d4ee49bc556626108366f3ccb/tumblr_inline_mm0rjgBQFu1qz4rgp.png&quot; /&gt;&lt;/p&gt;
&lt;p&gt;More on how to add the nuget feed to your episerver configuration can be found in the ImageVault documentation:&#160;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://imagevault.se/en/documentation/api-documentation/?page=installation/manual-installation/episervercms7addon.html&quot;&gt;Manual installation: EPiServer CMS7 ImageVault AddOn&lt;/a&gt;&lt;/p&gt;</description>
            <guid>http://blog.imagevault.se/post/49177511775</guid>
            <pubDate>Mon, 29 Apr 2013 15:51:55 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>Getting “Error–&lt;domain user&gt; is not a valid user or group”, when upgrading?</title>
            <link>http://world.episerver.com/Blogs/Jonas-Lindau/Dates/2013/4/Getting-Errordomain-user-is-not-a-valid-user-or-group-when-upgrading/</link>
            <description>&lt;p&gt;I’ve upgraded a lot of sites in my days, but I still run into new errors. Even when you do it the right way, by upgrading the test-environment and collect as much information you can, there is still a chance it won’t work on the production servers. This error was one of those times…&lt;/p&gt;  &lt;p&gt;At first I tried all the obvious things, like check if account was locked, did it have all the correct permissions etc. When all of this was confirmed I really didn’t have much more ideas. But then it hit me! I checked the account in Active Directory once more, and saw that the account name was so long, the “pre-Windows 2000”-name was truncated. For some reason, EPiServer Deployment Center uses this legacy login name during upgrade, and when the name is truncated it won’t work!&lt;/p&gt;  &lt;p&gt;So this is what I did:&lt;/p&gt;  &lt;p&gt;1. After starting Deployment Center and executed the correct upgrade, this error occurred:&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;/Globals/xmlrpc/30201/2013/04/29/Capture.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;Capture&quot; border=&quot;0&quot; alt=&quot;Capture&quot; src=&quot;/Globals/xmlrpc/30201/2013/04/29/Capture_thumb.png&quot; width=&quot;562&quot; height=&quot;211&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;2. Check the account in Active Directory to find out the name is truncated:&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;/Globals/xmlrpc/30201/2013/04/29/Capture_2.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;Capture_2&quot; border=&quot;0&quot; alt=&quot;Capture_2&quot; src=&quot;/Globals/xmlrpc/30201/2013/04/29/Capture_2_thumb.png&quot; width=&quot;569&quot; height=&quot;150&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;3. Rename the account using a shorter name.&lt;/p&gt;  &lt;p&gt;4. Modify the application-pool so it uses the new username&lt;/p&gt;  &lt;p&gt;5. Run upgrade again.&lt;/p&gt;</description>
            <guid>http://world.episerver.com/Blogs/Jonas-Lindau/Dates/2013/4/Getting-Errordomain-user-is-not-a-valid-user-or-group-when-upgrading/</guid>
            <pubDate>Mon, 29 Apr 2013 11:20:08 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>Building large scale EPiServer sites</title>
            <link>http://joelabrahamsson.com/building-large-scale-episerver-sites/</link>
            <description>It has been proven by numerous sites that EPiServer CMS can handle huge amounts of content. Doing so does bring a few challenges though. Here&#39;s a few few patterns that I&#39;ve identified when it comes to building large scale EPiServer sites with great performance.
&lt;p&gt;Last week I received an e-mail with the subject ”Huge number of pages (&amp;gt;500 000) in EPiServer?” As you can imagine the e-mail contained questions related to whether EPiServer CMS can handle sites with A LOT of content.&lt;/p&gt;
&lt;p&gt;It has been proven on a number of occasions that it indeed can. For instance, several of the biggest newspapers in Sweden, with millions of pages, run EPiServer. There are also government sites with several hundreds of thousands of pages.&lt;/p&gt;
&lt;p&gt;That doesn’t mean that we’re not faced with challenges when building large EPiServer sites though.&lt;/p&gt;
&lt;p&gt;In my experience, what those challenges are differs depending on the type of site, or rather, depending on how the content is structured on the site. While an individual site may be a mix of the two, there are two categories of large scale sites in terms of how they structure their content.&lt;/p&gt;
&lt;h3&gt;Content that fit naturally in a deep hierarchy&lt;/h3&gt;
&lt;p&gt;This is common for government sites and the like. Such sites may publish a lot of content that is organized and exposed to visitors in a hierarchy based on topics, subtopic and so on.&lt;/p&gt;
&lt;p&gt;&lt;img class=&quot;thumbnail-centered&quot; src=&quot;/PageFiles/643/Deep-hierarchy-london.png&quot; alt=&quot;&quot; width=&quot;630&quot; height=&quot;485&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Alternatively the content may fit naturally in a date-based hierarchy, such as an archive with publications.&lt;/p&gt;
&lt;ol&gt; &lt;/ol&gt;
&lt;h3&gt;Content that isn’t hierarchical or the hierarchy is shallow&lt;/h3&gt;
&lt;p&gt;This is very common on media sites such as newspapers. Those sites typically have a shallow hierarchy made up of sections. There may for instance be a first level section called &quot;Sport&quot; and a subsection to that called &quot;Football&quot;.&lt;/p&gt;
&lt;p&gt;An article about one of the Champions League semifinals 2013 is displayed in the context of Sport/Football but beyond that it has no natural place in a tree like structure. On a site with a lot of content this in turn means that an article in context of its place in the hierarchy may have thousands, or even millions, of siblings.&lt;/p&gt;
&lt;p&gt;&lt;img class=&quot;thumbnail-centered&quot; src=&quot;/PageFiles/643/Shallow-hierarchy-mail-online.png&quot; alt=&quot;&quot; width=&quot;696&quot; height=&quot;665&quot; /&gt;&lt;/p&gt;
&lt;ol&gt; &lt;/ol&gt;
&lt;h2&gt;Finding content based on non-hierarchical criteria&lt;/h2&gt;
&lt;p&gt;Given that we’re dealing with a site that has a lot of content that fit nicely into a tree based structure EPiServer CMS works great out-of-the-box for editors. The CMS stores content in a tree, the content tree, and expose that to editors using UI components such as the Page tree and the Block gadget that also lets editors work with content in a tree.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;While there is&lt;/strong&gt; a lot of content, meaning that the content tree has a lot of branches and leafs editors can easily find the right place to publish new content. They can also find old content simply by navigating the content tree, or the site, the same way a public visitor would.&lt;/p&gt;
&lt;p&gt;In cases where the standard navigation doesn’t suffice, such as when an editor or visitors needs to find content that, in their view, isn’t placed where it should be on the site, basic free text search functionality typically can handle that.&lt;/p&gt;
&lt;p&gt;As for developers building navigation components is typically easy as all they have to do is utilize the page tree. EPiServer&#39;s methods for doing that, such as Get, GetChildren and GetAncestors are highly optimized and aggresively cached with clever dependencies for releasing their caches when needed and only then.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;However, no matter&lt;/strong&gt; how natural the content hierarchy is there are usually a number of requirements for components that lists content in a way that isn’t based on the hierarchy. Examples of such components could for instance be the most recently published pages of a certain type, all articles published be a certain author or department and all publications categorized with a certain keyword.&lt;/p&gt;
&lt;p&gt;For such requirements EPiServer CMS only has the method FindPagesWithCriteria to offer. Besides obvious usability issues for developers FPWC has some serious performance issues, especially on a site with a large volume of content.&lt;/p&gt;
&lt;p&gt;In other words, on a large scale EPiServer site with content fitting naturally into a deep hierarchy we’re faced with the challenge of finding content based on non-hierarchical criteria.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;There are two&lt;/strong&gt; common solutions to this problem. One is to somehow store the answer to such questions at a time where we know that the answer is changing. For instance, this may mean storing a list of the ten last published pages of a given type serialized into a property somewhere or in the Dynamic Data Store, updating each time a page is published. This requires quite a lot of development time and, worse, it requires us to know what questions will need answering beforehand. It’s also rather error prone.&lt;/p&gt;
&lt;p&gt;The second, and much better, common solution to this is to use a search engine. This has been done on a number of large EPiServer sites using different search engines. Today though the obvious solution is to use &lt;a href=&quot;/link/6f0db1b72ffa49968a45c16b1146b95a.aspx?id=43&amp;amp;epslanguage=en&quot;&gt;EPiServer Find&lt;/a&gt;, the search and content retrieval product that EPiServer offers. Find was in many ways built exactly to address this problem in a way that offers great usability for developers and short development time.&lt;/p&gt;
&lt;p class=&quot;conclusion&quot;&gt;&lt;strong&gt;Solution:&lt;/strong&gt; Use a EPiServer Find to create navigations listings of content that are not based on the contents place in the content tree.&lt;/p&gt;
&lt;h2&gt;Non-hierarchical content&lt;/h2&gt;
&lt;p&gt;When the content can’t naturally be fitted into a deep hierarchy additional challenges arise. First, EPiServer’s API and editorial interface is designed for sites organizing content in a tree. If the content can’t be organized into a deep hierarchy performance will suffer. Here’s how I put it in my reply to the e-mail:&lt;/p&gt;
&lt;blockquote&gt;“The content tree can handle millions of items BUT if those items aren&#39;t stored in a deep hierarchy there will be performance problems. That is, if you have a page with ten thousand children you have a problem. If you have a page with a hundred children and each of those have a hundred children you won&#39;t have a problem.”&lt;/blockquote&gt;
&lt;p&gt;While I knew this from experience, after sending that reply, I decided to conduct a few experiments to prove it.&lt;/p&gt;
&lt;p&gt;In the context of a scheduled job I wrote code that created ten thousand pages below the same parent. It also created a hundred pages below another common parent and then a hundred pages below each of those pages. Everything was done in batches of a hundred pages and the mean time for creating a page during each batch was logged.&lt;/p&gt;
&lt;p&gt;Let’s look at the results for creating 100x100 pages in a hierarchy first.&lt;/p&gt;
&lt;table class=&quot;table table-striped table-bordered table-condensed&quot; border=&quot;0&quot;&gt;
&lt;thead&gt; 
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Batch&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Avg. time per published page (ms)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/thead&gt; 
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1-100&lt;/td&gt;
&lt;td&gt;22&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;201-300&lt;/td&gt;
&lt;td&gt;22&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;501-600&lt;/td&gt;
&lt;td&gt;22&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;901-1000&lt;/td&gt;
&lt;td&gt;24&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1901-2000&lt;/td&gt;
&lt;td&gt;24&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4901-5000&lt;/td&gt;
&lt;td&gt;33&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;9901-10000&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/td&gt;
&lt;td&gt;30&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;There are of course some variances which would likely even themselves out with a larger sample (I ran the test only four times), but it&#39;s pretty clear that it takes almost exactly the same amount of time to create page number ten thousand as page number one when storing pages in a hiearchy where each page has ninetynine siblings.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Now, let’s compare that to creating 10000 pages below the same parent.&lt;/p&gt;
&lt;table class=&quot;table table-striped table-bordered table-condensed&quot; border=&quot;0&quot;&gt;
&lt;thead&gt; 
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Batch&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Avg. time per published page (ms)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/thead&gt; 
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1-100&lt;/td&gt;
&lt;td&gt;22&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;201-300&lt;/td&gt;
&lt;td&gt;26&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;501-600&lt;/td&gt;
&lt;td&gt;34&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;901-1000&lt;/td&gt;
&lt;td&gt;50&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1901-2000&lt;/td&gt;
&lt;td&gt;83&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4901-5000&lt;/td&gt;
&lt;td&gt;180&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;9901-10000&lt;span&gt; &lt;/span&gt;&lt;/td&gt;
&lt;td&gt;414&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;As we can see the time required to publish a page grows based on the number of existing pages below the page’s parent page. Plotted into a diagram we can see that this growth is linear.&lt;/p&gt;
&lt;p&gt;&lt;img class=&quot;thumbnail-centered&quot; src=&quot;/PageFiles/643/time-growth.png&quot; alt=&quot;&quot; width=&quot;347&quot; height=&quot;208&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Beyond API performance issues, expanding the tree node for a page revealing it’s ten thousand pages in edit mode takes time. Below is what FireBug reported for me when I tried to expand a none with ten thousand children.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img class=&quot;thumbnail-centered&quot; src=&quot;/PageFiles/643/loading-10000-children.png&quot; alt=&quot;&quot; width=&quot;400&quot; height=&quot;216&quot; /&gt;&lt;/p&gt;
&lt;p&gt;After receiving the response from the server Firefox reported an unresponsive JavaScript on the page and it took several minutes before I actually got to see the pages in the page tree.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Of course, even if it the page tree wouldn&#39;t have any issues with displaying thousands of children for a node such a list would hardly be useful for editors.&lt;/p&gt;
&lt;p class=&quot;conclusion&quot;&gt;&lt;strong&gt;Conclusion:&lt;/strong&gt; EPiServer is built and optimized for sites that stores content in a hierarchy in which each node has hundreds and not thousands of child nodes.&lt;/p&gt;
&lt;p&gt;Clearly, EPiServer&#39;s page tree doesn&#39;t work well for large scale sites with huge volumes of non-hierarchical content. Not in terms of performance and not in terms of editor usability.&lt;/p&gt;
&lt;p&gt;Luckily there&#39;s a fairly easy solution that has proven to work very well. In fact, I&#39;ve seen it done so many times that I&#39;d call it a pattern. What is is? Faking it!&lt;/p&gt;
&lt;h3&gt;Structuring bulk content in arbitrary hierarchies&lt;/h3&gt;
&lt;p&gt;We know that EPiServer needs, or prefers, organizing pages in such a way that each node in its content tree doesn&#39;t have more than hundreds of immediate children. EPiServer does not however care about why a certain page belongs in a certain place in the tree. Therefor we can automatically place pages in a hierarchy based on some arbitrary criteria.&lt;/p&gt;
&lt;p&gt;For articles on a media site this is commonly done by placing them in a structure based on publish date.&lt;/p&gt;
&lt;p&gt;&lt;img class=&quot;thumbnail-centered&quot; src=&quot;/PageFiles/643/page-tree-date-structure.png&quot; alt=&quot;&quot; width=&quot;394&quot; height=&quot;191&quot; /&gt;&lt;/p&gt;
&lt;p&gt;There are a number of ways to implement such functionality but it typically involves:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Defining a root node for a certain type of content.&lt;/li&gt;
&lt;li&gt;Hooking up to events from EPiServer&#39;s API listening to when content is created.&lt;/li&gt;
&lt;li&gt;When a page of a matching type is created ensure that there is a place for it in the date structure below the root, otherwise create it.&lt;/li&gt;
&lt;li&gt;Move the newly created content to its parent in the date structure.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Of course, when content resides in a structure whose only purpose is to work well with EPiServer performance wise we can&#39;t utilize the content hierarchy when building navigations. The solution to that typically involves four things:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Defining one or&lt;/strong&gt; several properties on the content types that will be used for &quot;bulk content&quot;. These properties are typically of type PageReference, ContentReference or ContentArea. For instance, an article may have a property named Section of type PageReference which points to the Football section.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Utilizing the above&lt;/strong&gt; mentioned property/properties when rendering pages to determine in what context they should be shown. For instance, an article about a Champions League game may have a Section property pointing to a page named Football which in turn is a child of a page named Sport. Based on that the article&#39;s content is displayed framed by a header, navigation elements and right column from Football or Sport.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Using a search&lt;/strong&gt; engine to create listings. Essentially I&#39;m talking about the same problem as we looked at before here, finding content based on non-hierarchical criteria. The only difference is that we now need to apply the same solution in more places as the majority of the content of the site&#39;s content is organized in such a way in the content tree that it can&#39;t be used to build navigations and listings. &lt;br /&gt;&lt;strong&gt;With that said&lt;/strong&gt;, we can still utilize EPiServer&#39;s standard API methods for components such as the main navigation as those pages aren&#39;t the &quot;bulk content&quot; and therefor works well with the page tree. Again while we can use pretty much any search engine that offers good performance and scalability, EPiServer Find is the best option as it was born out of these specific needs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Rewriting URLs.&lt;/strong&gt; By default URLs on an EPiServer site is built up using the page&#39;s name prefixed by the name of each of its ancestors in the page tree. When storing articles or other content in a structure that has nothing to do with how visitors sees the page on the site URLs won&#39;t seem very logical. For instance an URL like /2013/04/23/champions-league.. is hardly helpful and doesn&#39;t look very good. With older versions of EPiServer CMS we typically handled that using a custom URL rewriter. Nowadays with EPiServer 7 we do it using &lt;a href=&quot;/link/e9ec501e09a64e74bdad2df4f1102ae4.aspx?id=526&amp;amp;epslanguage=en&quot;&gt;custom routing&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p class=&quot;conclusion&quot;&gt;&lt;strong&gt;Solution:&lt;/strong&gt; Automatically organize non-hierarchical content in arbitrary hierarchies based on creation date, first letter in their names or some other criteria. Use properties on the content to tie it to pages in the page tree which provide the context in which the content should be rendered. Use EPiServer Find to build listings.&lt;/p&gt;
&lt;p&gt;Using the above approach we solve the performance issues when dealing with non-hierarchical content of the type that is often found on media sites, blogs and the like. While that works great we have one more problem to solve - how editors create and find the content for which the page tree is more or less useless.&lt;/p&gt;
&lt;h3&gt;Custom components for editorial workflows&lt;/h3&gt;
&lt;p&gt;We could tell editors &quot;To create a new article click on the Articles node in the page tree. We have some code that will automatically move it a few levels down in a date based structure. Oh, and don&#39;t forget to set the Section property.&quot; However, odds are we wouldn&#39;t find much jobs afterwards and we&#39;d see buch of angry comments about EPiServer on Twitter.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Clearly, if we&#39;re&lt;/strong&gt; dealing with the type of site that the page tree doesn&#39;t work well with we can&#39;t just be content with solving performance issues. We&#39;ll also need to extend EPiServer&#39;s edit mode to provide good workflows for editors.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Exactly how such components should work and be implemented differs from site to site but it typically involves functionality to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create &quot;bulk content&quot; without having to use the page tree gadget.&lt;/li&gt;
&lt;li&gt;Either automatically populating &quot;infrastructure properties&quot; such as Section or making it very easy for editors to do so.&lt;/li&gt;
&lt;li&gt;List the most recent content. Especially on media sites it&#39;s a very common requirement to have a list that displays all articles that have either been published today, not yet been published or is scheduled to be published.&lt;/li&gt;
&lt;li&gt;Find content based on criteria such as author, publish date and section.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I&#39;ve built such functionality both in EPiServer 6 and EPiServer 7 and based on those experiences I&#39;ve created the &lt;a href=&quot;/link/c307dee82d384e9cbfa436f08a8b949d.aspx?id=509&amp;amp;epslanguage=en&quot;&gt;PowerSlice&lt;/a&gt; project. PowerSlice is one way of addressing several of the above requirements and may solve all needs for some sites. For other sites it may be used for inspiration.&lt;/p&gt;
&lt;p&gt;&lt;img class=&quot;thumbnail thumbnail-centered&quot; src=&quot;/PageFiles/643/creating-content-in-slice.png&quot; alt=&quot;&quot; width=&quot;377&quot; height=&quot;152&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Either way, it&#39;s&lt;/strong&gt; very much possible to build the components needed by editors. With EPiServer 7 it typically involves creating custom Dojo/Dijit widgets and utilizing EPiServer Find.&lt;/p&gt;
&lt;p class=&quot;conclusion&quot;&gt;&lt;strong&gt;Solution:&lt;/strong&gt; Extend EPiServer&#39;s edit mode with custom components tailor made for the needs of the editors. PowerSlice may be an option and/or used for inspiration.&lt;/p&gt;
&lt;p&gt;Are you still with me? Perhaps it&#39;s about time we looked at an example.&lt;/p&gt;
&lt;h2&gt;An example - this site&lt;/h2&gt;
&lt;p&gt;While this site doesn&#39;t exactly fit the &quot;large scale&quot; description as it&#39;s primarily a blog it, along with certain parts of many other &quot;small&quot; sites, does have non-hierarchical content. Therefor I applied the above mentioned techniques to it, meaning that we can look at it as an example of how a large scale site, such as a media site, can be built.&lt;/p&gt;
&lt;h3&gt;Organizing pages&lt;/h3&gt;
&lt;p&gt;In terms of hiearchy there are two types of pages on the site. Articles and tags are automatically organized in two separate structures. Sections and standard pages are not.&lt;/p&gt;
&lt;p&gt;All articles resider under a node below the start page. Under that node they are grouped first by year and then by month.&lt;/p&gt;
&lt;p&gt;&lt;img class=&quot;thumbnail-centered&quot; src=&quot;/PageFiles/643/example-page-tree.png&quot; alt=&quot;&quot; width=&quot;258&quot; height=&quot;516&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Articles have a property named MainCategory edited using a drop down from which it&#39;s possible to select one of the categories (sections) on the site.&lt;/p&gt;
&lt;p&gt;&lt;img class=&quot;thumbnail-centered&quot; src=&quot;/PageFiles/643/example-category-property.png&quot; alt=&quot;&quot; width=&quot;228&quot; height=&quot;40&quot; /&gt;&lt;/p&gt;
&lt;p&gt;This property is used for breadcrumbs and context specific things when rendering an article.&lt;/p&gt;
&lt;p&gt;&lt;img class=&quot;thumbnail-centered&quot; src=&quot;/PageFiles/643/Example-MainCategory-usage.png&quot; alt=&quot;&quot; width=&quot;448&quot; height=&quot;77&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Articles also have a content area property to which other categories can be added.&lt;/p&gt;
&lt;p&gt;&lt;img class=&quot;thumbnail-centered&quot; src=&quot;/PageFiles/643/example-additional-categories-property.png&quot; alt=&quot;&quot; width=&quot;590&quot; height=&quot;92&quot; /&gt;&lt;/p&gt;
&lt;p&gt;MainCategory and any categories added to AdditionalCategories are combined by a code only property on articles named AllCategories.&lt;/p&gt;
&lt;p&gt;New articles can be created using a UI component that&#39;s created using PowerSlice.&lt;/p&gt;
&lt;p&gt;&lt;img class=&quot;thumbnail-centered&quot; src=&quot;/PageFiles/643/Example-create-new-article.png&quot; alt=&quot;&quot; width=&quot;477&quot; height=&quot;273&quot; /&gt;&lt;/p&gt;
&lt;p&gt;When an article is created it&#39;s initial parent is the root node for articles. Using a modified version of my old open source project &lt;a href=&quot;https://github.com/joelabrahamsson/PageStructureBuilder&quot;&gt;PageStructureBuilder&lt;/a&gt; the article as automatically moved to a year/month structure.&lt;/p&gt;
&lt;h3&gt;Listings and routing&lt;/h3&gt;
&lt;p&gt;Categories/sections list articles &quot;belonging&quot; to them based ordered by publication date. This is done using a fairly simple search query using EPiServer Find that filters on article&#39;s AllCategories property.&lt;/p&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;_searchClient.Search()
    .Filter(page =&amp;gt; page.Categories.Match(currentPage.ContentLink))
    .CurrentlyPublished()   
    .FilterOnReadAccess()
    .OrderByDescending(x =&amp;gt; x.StartPublish);&lt;/pre&gt;
&lt;p&gt;As for URLs I use a custom partial router, which I&#39;ve &lt;a href=&quot;/link/e9ec501e09a64e74bdad2df4f1102ae4.aspx?id=526&amp;amp;epslanguage=en&quot;&gt;previously described in great detail&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Dealing with traffic&lt;/h2&gt;
&lt;p&gt;So far this article has been about how to build sites with large volumes of content on EPiServer CMS. There&#39;s of course another way to interpret &quot;large scale sites&quot; - sites with a lot of traffic.&lt;/p&gt;
&lt;p&gt;Again, it&#39;s already been proven by a number of existing EPiServer customers that EPiServer can handle huge volumes of traffic. With that said, it&#39;s of course also very much possible to build a site on EPiServer that crumbles once it&#39;s hit with more than a couple of concurrent requests.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A robust EPiServer&lt;/strong&gt; site that can handle a lot of traffic and let editors work efficiently at the same time requires a good implementation. And a good implementation requires skilled and experienced developers who know what they are doing.&lt;/p&gt;
&lt;p&gt;In general EPiServer CMS&#39;s API is highly optimized and the most significant methods for getting content based on the hierarchy are cached. As for EPiServer Find it&#39;s fast, highly scalable and also has mechanisms for caching that can be used when needed. So, as first step in hardening a site for production it&#39;s absolutely vital to use the API methods visely. Having done so the site will hold well on its own.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Sometimes though, &lt;/strong&gt;we&#39;re dealing with a site that has so much traffic that it&#39;s not just enough use caching to prevent database calls. The actual rendered HTML output needs to be cached as well. For that EPiServer offers a fairly basic &lt;a href=&quot;/link/cc5f6e31902d4913b22a2f7c573bbde7.aspx?id=184&amp;amp;epslanguage=en&quot;&gt;output cache&lt;/a&gt; that can be used.&lt;/p&gt;
&lt;p&gt;While that may be an option, for site with really, really, really much traffic we may need even more efficient output caching. In those cases we can either construct a custom output cache to use on the webservers or, which I prefer, use a web content accelerator/caching reverse proxy such as Varnish. We may also want to look in to using a CDN instead or as a compliment.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;One thing to&lt;/strong&gt; beware of though is that any form of output caching, with the exception of partial caching, will limit editors ability to use some of the functionality built into the CMS such as personalization. If that&#39;s a problem we can often work around that by loading parts of pages using JavaScript and not caching such requests. Of course that means more requests to the site though.&lt;/p&gt;
&lt;p&gt;In general, my philosophy is to build the site as robust and performant as possible without so that it can handle the traffic without any other form of caching. After that, if it&#39;s needed or economically motivated some sort of cache can be put in front of the site.&lt;/p&gt;
&lt;p&gt;This approach has two benefits. First of all we can choose to use output caching for the right reasons. Second, using output caching tends to hide performance problems in the application and while those may not be a problem at first they may be whenever the cache is released or if there&#39;s an issue with the output cache. Then it&#39;s very valuable if the web applciation can hold on its own.&lt;/p&gt;
&lt;h2&gt;Summary&lt;/h2&gt;
&lt;ul class=&quot;check&quot;&gt;
&lt;li&gt;EPiServer CMS can handle sites with millions of pages.&lt;/li&gt;
&lt;li&gt;For large scale sites FindPagesWithCriteria doesn&#39;t work for non-hierarchical queries. Use EPiServer Find for that.&lt;/li&gt;
&lt;li&gt;EPiServer relies on content being split up into a hierarchy. If the content doesn&#39;t fit naturally into such a hiearchy, make one up and use a combination of properties, Find and edit mode extensions create new content and build listings.&lt;/li&gt;
&lt;/ul&gt;
</description>
            <guid>http://joelabrahamsson.com/building-large-scale-episerver-sites/</guid>
            <pubDate>Mon, 29 Apr 2013 09:13:03 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>Creating a Link to a Page in your EPiServer 7 MVC View</title>
            <link>http://cjsharp1.github.io/blog/2013/04/28/creating-a-link-to-a-page-in-your-episerver-7-mvc-view</link>
            <description>&lt;p&gt;When developing an EPiServer 7 site (or really any site, for that matter), making a link to a page is one of the most common things you&#39;ll do. So, I thought I&#39;d do something a little more basic and explore how to handle this task in your front-end page and block templates, specifically using MVC Razor views. In this post, we&#39;ll look at what you can currently use to create a link to a page, then I&#39;ll introduce some extension methods that you can use to give yourself a little more flexibility in your MVC view.&lt;/p&gt;

&lt;!-- more --&gt;


&lt;h2&gt;Current Options and Limitations&lt;/h2&gt;

&lt;p&gt;First of all, resist the temptation to solely rely on the &lt;code&gt;LinkURL&lt;/code&gt; property in the &lt;code&gt;PageData&lt;/code&gt; object. This will return an internal link to the page that isn&#39;t very user friendly. Sure, when you click the link it takes you to the correct page, but we don&#39;t want to be showing these links to the outside world. Instead, rely on the helpers and extensions that EPiServer 7 provides.&lt;/p&gt;

&lt;h3&gt;Html.PageLink&lt;/h3&gt;

&lt;p&gt;The simplest and most common way to create a link to page is to use EPiServer&#39;s &lt;code&gt;Html.PageLink&lt;/code&gt; helper. Using this helper, you can pass in a &lt;code&gt;PageData&lt;/code&gt; object, a &lt;code&gt;PageReference&lt;/code&gt;, or even a &lt;code&gt;LinkItem&lt;/code&gt;, and it will create an HTML anchor, using the clean, friendly URL to the page. For the text of the link, if you do not supply it with a text string, it will use the &lt;code&gt;PageName&lt;/code&gt; property for the page (or the &lt;code&gt;Text&lt;/code&gt; property for a &lt;code&gt;LinkItem&lt;/code&gt; object).&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;@Html.PageLink(Model.SomePageReference)
@Html.PageLink(Model.SomePageData)
@Html.PageLink(&quot;A link to a page&quot;, Model.SomeLinkItem)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You can also pass in route data information that can change the URL (helpful when working with language branches) or additional HTML attributes to add to the anchor tag.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;@Html.PageLink(&quot;A link to a Swedish page&quot;, Model.SomePageReference, new { language = &quot;sv-SE&quot; }, null)
@Html.PageLink(&quot;A link with a class&quot;, Model.SomePageReference, null, new { @class = &quot;link-class&quot; })
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Be sure to check &lt;a href=&quot;http://world.episerver.com/Documentation/Class-library/?documentId=cms/7/95e55ffc-6ea1-f864-ce31-ceee26ee9b0a&quot;&gt;the SDK for this helper&lt;/a&gt;, because there are a lot more options you could use that might be a better fit for your needs.&lt;/p&gt;

&lt;p&gt;In most cases, this HTML helper is what you&#39;ll use to create a link to a page. There are some situations, however, where you&#39;ll need a little more flexibility. A common example is when you want to wrap an image tag with an anchor tag, or when you want to wrap more elements. To solve that situation, you could build an image link HTML helper, or you could just retrieve the actual URL to the page using &lt;code&gt;Url.PageUrl&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;Url.PageUrl&lt;/h3&gt;

&lt;p&gt;Another way is to use EPiServer&#39;s &lt;code&gt;Url.PageUrl&lt;/code&gt; helper. This helper only takes one parameter: the internal URL for the page. It will then use EPiServer&#39;s &lt;code&gt;PermanentLinkUtility&lt;/code&gt; to find the friendly URL to the page, and return only the URL as a string. You could then take that string and use it directly in an HTML anchor tag.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;@Url.PageUrl(Model.SomePageData.LinkURL)&quot;&amp;gt;
    A link to a page
&amp;lt;/a&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This covers a lot of the other cases when you need better flexibility when creating a link to a page. The only thing I don&#39;t like about this, though, is that you need to have the &lt;code&gt;PageData&lt;/code&gt; of the page to use it. So if you have a &lt;code&gt;PageReference&lt;/code&gt; property on your page or block type, you&#39;ll need to use &lt;code&gt;IContentLoader&lt;/code&gt; or &lt;code&gt;IContentRepository&lt;/code&gt; to get the &lt;code&gt;PageData&lt;/code&gt; from the &lt;code&gt;PageReference&lt;/code&gt;. Wouldn&#39;t it be easier to just pass in a &lt;code&gt;PageData&lt;/code&gt; or a &lt;code&gt;PageReference&lt;/code&gt; object instead?&lt;/p&gt;

&lt;h2&gt;Another Option: Extending the UrlHelper&lt;/h2&gt;

&lt;p&gt;The solution I put together, which I think provides the best of both worlds, is &lt;em&gt;heavily&lt;/em&gt; based on the code for EPiServer&#39;s &lt;code&gt;Html.PageLink&lt;/code&gt; helper. It only returns the friendly URL to a page like &lt;code&gt;Url.PageUrl&lt;/code&gt;, but still gives you the flexibility to pass in a &lt;code&gt;PageData&lt;/code&gt; or a &lt;code&gt;PageReference&lt;/code&gt; object like &lt;code&gt;Html.PageLink&lt;/code&gt;. Rather than extending &lt;code&gt;HtmlHelper&lt;/code&gt;, it extends &lt;code&gt;UrlHelper&lt;/code&gt; and works alongside of the &lt;code&gt;Url.PageUrl&lt;/code&gt; helper.&lt;/p&gt;

&lt;h3&gt;UrlExtensions.cs&lt;/h3&gt;

&lt;pre&gt;&lt;code&gt;public static class UrlExtensions
{
    public static string PageUrl(this UrlHelper urlHelper, PageReference pageLink)
    {
        return UrlExtensions.PageUrl(urlHelper, pageLink, (object)null, (IContentRepository)null);
    }

    public static string PageUrl(this UrlHelper urlHelper, PageReference pageLink, object routeValues)
    {
        return UrlExtensions.PageUrl(urlHelper, pageLink, routeValues, (IContentRepository)null);
    }

    public static string PageUrl(this UrlHelper urlHelper, PageData page)
    {
        return UrlExtensions.PageUrl(urlHelper, page, (object)null);
    }

    public static string PageUrl(this UrlHelper urlHelper, PageData page, object routeValues)
    {
        if (!PageDataExtensions.HasTemplate(page))
            return string.Empty;

        switch (page.LinkType)
        {
            case PageShortcutType.Normal:
            case PageShortcutType.Shortcut:
            case PageShortcutType.FetchData:
                return UrlExtensions.PageUrl(urlHelper, page.PageLink, routeValues, (IContentLoader)null, (IPermanentLinkMapper)null, (LanguageSelectorFactory)null);

            case PageShortcutType.External:
                return page.LinkURL;

            case PageShortcutType.Inactive:
                return string.Empty;

            default:
                return string.Empty;
        }
    }

    private static string PageUrl(this UrlHelper urlHelper, PageReference pageLink, object routeValues, IContentRepository contentRepository)
    {
        if (contentRepository == null)
            contentRepository = ServiceLocator.Current.GetInstance&amp;lt;IContentRepository&amp;gt;();
        if (PageReference.IsNullOrEmpty(pageLink))
            return string.Empty;
        PageData page = contentRepository.Get&amp;lt;PageData&amp;gt;((ContentReference)pageLink);
        return UrlExtensions.PageUrl(urlHelper, page, routeValues);
    }

    private static string PageUrl(this UrlHelper urlHelper, PageReference pageLink, object routeValues, IContentLoader contentQueryable, IPermanentLinkMapper permanentLinkMapper, LanguageSelectorFactory languageSelectorFactory)
    {
        RouteValueDictionary routeValueDictionary = new RouteValueDictionary(routeValues);
        if (!routeValueDictionary.ContainsKey(RoutingConstants.LanguageKey))
            routeValueDictionary[RoutingConstants.LanguageKey] = (object)ContentLanguage.PreferredCulture.Name;
        if (!routeValueDictionary.ContainsKey(RoutingConstants.ActionKey))
            routeValueDictionary[RoutingConstants.ActionKey] = (object)&quot;index&quot;;
        routeValueDictionary[RoutingConstants.NodeKey] = (object)pageLink;
        UrlExtensions.SetAdditionalContextValuesForContent(urlHelper, pageLink, routeValueDictionary, contentQueryable, permanentLinkMapper, languageSelectorFactory);
        return urlHelper.Action((string)null, routeValueDictionary);
    }

    private static void SetAdditionalContextValuesForContent(this UrlHelper urlHelper, PageReference pageLink, RouteValueDictionary values, IContentLoader contentQueryable, IPermanentLinkMapper permanentLinkMapper, LanguageSelectorFactory languageSelectorFactory)
    {
        bool IdKeep = HttpContext.Current.Request.QueryString[&quot;idkeep&quot;] != null;
        contentQueryable = contentQueryable ?? ServiceLocator.Current.GetInstance&amp;lt;IContentLoader&amp;gt;();
        permanentLinkMapper = permanentLinkMapper ?? ServiceLocator.Current.GetInstance&amp;lt;IPermanentLinkMapper&amp;gt;();
        languageSelectorFactory = languageSelectorFactory ?? ServiceLocator.Current.GetInstance&amp;lt;LanguageSelectorFactory&amp;gt;();
        IContent content = contentQueryable.Get&amp;lt;IContent&amp;gt;(pageLink, languageSelectorFactory.Fallback(values[RoutingConstants.LanguageKey] as string ?? ContentLanguage.PreferredCulture.Name, true));
        if (content == null)
            return;
        if (IdKeep)
            values[&quot;id&quot;] = (object)content.ContentLink.ToString();
        UrlExtensions.SetAdditionalContextValuesForPage(values, IdKeep, content);
    }

    private static void SetAdditionalContextValuesForPage(RouteValueDictionary values, bool IdKeep, IContent content)
    {
        PageData pageData = content as PageData;
        if (pageData == null)
            return;
        if (pageData.LinkType == PageShortcutType.Shortcut)
        {
            PropertyPageReference propertyPageReference = pageData.Property[&quot;PageShortcutLink&quot;] as PropertyPageReference;
            if (propertyPageReference != null &amp;amp;&amp;amp; !PageReference.IsNullOrEmpty(propertyPageReference.PageLink))
            {
                values[RoutingConstants.NodeKey] = (object)propertyPageReference.PageLink;
                if (IdKeep)
                    values[&quot;id&quot;] = (object)((object)propertyPageReference).ToString();
            }
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;At this point, I&#39;m just supporting passing in &lt;code&gt;PageData&lt;/code&gt; and &lt;code&gt;PageReference&lt;/code&gt; objects, but it could easily be extended to support the other objects that &lt;code&gt;Html.PageLink&lt;/code&gt; supports. I also made it support additional route data information, which will help when creating links to pages in another language branch.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;@Url.PageUrl(Model.SomePageReference, new { language = &quot;sv-SE&quot; })&quot;&amp;gt;
    &amp;lt;img src=&quot;swedish_flag.png&quot; /&amp;gt;
&amp;lt;/a&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I hope you find this useful, and that it gives you the most flexibility you need when creating a link to a page in your EPiServer site!&lt;/p&gt;
</description>
            <guid>http://cjsharp1.github.io/blog/2013/04/28/creating-a-link-to-a-page-in-your-episerver-7-mvc-view</guid>
            <pubDate>Mon, 29 Apr 2013 06:00:00 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>CMS 7 Subscriptions “bug”</title>
            <link>http://world.episerver.com/Blogs/Per-Nergard/Dates/2013/4/CMS-7-Subscriptions-bug/</link>
            <description>&lt;p&gt;The other day the first task was to build a subscription page. The Alloy demo templates doesn’t contain an example so I needed a quick brushing up on the topic.&lt;/p&gt;  &lt;p&gt;The conclusion is that subscriptions work in the same way as in older versions of EPiServer. Not an extremely well documented area but that might be the topic of another post.&lt;/p&gt;  &lt;p&gt;So our subscription template needs a property named “EPSUBSCRIBE-ROOT”. &lt;/p&gt;  &lt;p&gt;So now the problems begins. In C# we can’t use a hyphen (-) in class or property names. We have the same issue with the property&amp;#160; “EPSUBSCRIBE-EXCLUDE” that is optional to include on pages that should not be sent out in the subscription job.&lt;/p&gt;  &lt;p&gt;EPiServer has created a bug for this issue.&lt;/p&gt;  &lt;p&gt;To get around this until EPiServer has released a fix we have to create the properties through admin mode.&lt;/p&gt;</description>
            <guid>http://world.episerver.com/Blogs/Per-Nergard/Dates/2013/4/CMS-7-Subscriptions-bug/</guid>
            <pubDate>Fri, 26 Apr 2013 12:56:13 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>EpiServer CMS 6 Useful SQL Queries</title>
            <link>http://world.episerver.com/Blogs/K-Khan-/Dates/2013/4/EpiServer-CMS-6-Useful-SQL-Queries/</link>
            <description>&lt;p&gt;Here is a set of few useful queries that we have been using since CMS 5 internally for debugging and improving customer experience. I have not tested these with CMS 7.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;List All Web Pages with Their Properties and Current Values     &lt;br /&gt;&lt;/strong&gt;    &lt;br /&gt;Below Query can help web editors to audit their contents.&lt;/p&gt;  &lt;p&gt;select distinct tblPageLanguage.LinkURL &#39;Web Page URL&#39;, tblPageLanguage.Name &#39;Web Page Name&#39;,tblPageDefinition.Name   &lt;br /&gt;&#39;Property Name&#39;, &#39;Property Value&#39; =    &lt;br /&gt;case    &lt;br /&gt;when tblProperty.Number is null and tblProperty.FloatNumber is null and    &lt;br /&gt;tblProperty.PageType is null and tblProperty.PageLink is null and tblProperty.Date is null and    &lt;br /&gt;tblProperty.String is null and tblProperty.LongString is null    &lt;br /&gt;then &#39;Boolean: &#39; + cast( tblProperty.Boolean as varchar( 40 ) )    &lt;br /&gt;when tblProperty.Number is not null then &#39;Number: &#39;+ cast( tblProperty.Number as varchar( 40 ) )    &lt;br /&gt;when tblProperty.FloatNumber is not null then &#39;FloatNumber: &#39;+ cast( tblProperty.FloatNumber as    &lt;br /&gt;varchar( 40 ) )    &lt;br /&gt;when tblProperty.PageType is not null then &#39;PageType: &#39;+ cast( tblProperty.PageType as    &lt;br /&gt;varchar(40))    &lt;br /&gt;when tblProperty.PageLink is not null then &#39;PageLink: &#39;+ cast( tblProperty.PageLink as    &lt;br /&gt;varchar( 40 ) )    &lt;br /&gt;when tblProperty.Date is not null then &#39;Date: &#39;+ cast( tblProperty.Date as varchar( 40 ) )    &lt;br /&gt;when tblProperty.String is not null then &#39;String: &#39;+ cast( tblProperty.String as varchar( 40 ) )    &lt;br /&gt;when tblProperty.LongString is not null then &#39;LongString: &#39;+ cast( tblProperty.LongString as    &lt;br /&gt;varchar( 40 ) )    &lt;br /&gt;else cast( &#39;Error Determining Value!&#39; as varchar( 40 ) )    &lt;br /&gt;end    &lt;br /&gt;from tblProperty     &lt;br /&gt;inner join tblPage on tblProperty.fkPageID = tblPage.pkID     &lt;br /&gt;inner join tblPageDefinition on tblProperty.fkPageDefinitionID = tblPageDefinition.pkID    &lt;br /&gt;inner join tblPageLanguage on tblpage.pkID = tblPageLanguage.fkPageID    &lt;br /&gt;order by tblPageLanguage.LinkURL, tblPageLanguage.Name, tblPageDefinition.Name&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;SQL Query to List All User Tables and Their Columns In a SQL Server Database&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;select sysobjects.Name, syscolumns.Name   &lt;br /&gt;from sysobjects inner join syscolumns on sysobjects.id = syscolumns.id    &lt;br /&gt;where sysobjects.xtype = &#39;U&#39;    &lt;br /&gt;order by sysobjects.Name, syscolumns.colorder&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;SQL Server Procedure to Display the Web Page Hierarchy&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;It can help us to investigate large tree structures&lt;/p&gt;  &lt;p&gt;IF EXISTS (SELECT name FROM sysobjects   &lt;br /&gt;WHERE name = &#39;ShowHierarchy&#39; AND type = &#39;P&#39;)    &lt;br /&gt;DROP PROCEDURE ShowHierarchy    &lt;br /&gt;go    &lt;br /&gt;CREATE PROC dbo.ShowHierarchy ( @Root int ) AS BEGIN    &lt;br /&gt;SET NOCOUNT ON    &lt;br /&gt;DECLARE @PageID int, @PageName varchar(30)    &lt;br /&gt;SET @PageName = (SELECT tblPageLanguage.Name FROM dbo.tblPage inner join tblPageLanguage on tblpage.pkID = tblPageLanguage.fkPageID WHERE pkID = @Root)    &lt;br /&gt;PRINT REPLICATE( &#39;-&#39;, @@NESTLEVEL * 4) + @PageName    &lt;br /&gt;SET @PageID = (SELECT MIN( pkID ) FROM dbo.tblPage WHERE fkParentID = @Root)    &lt;br /&gt;WHILE @PageID IS NOT NULL    &lt;br /&gt;BEGIN    &lt;br /&gt;EXEC dbo.ShowHierarchy @PageID    &lt;br /&gt;SET @PageID = (SELECT MIN( pkID ) FROM dbo.tblPage    &lt;br /&gt;WHERE fkParentID = @Root AND pkID &amp;gt; @PageID)    &lt;br /&gt;END    &lt;br /&gt;END    &lt;br /&gt;go    &lt;br /&gt;ShowHierarchy 1    &lt;br /&gt;go&lt;/p&gt;  &lt;p&gt;OUTPUT will be something like&lt;/p&gt;  &lt;p&gt;--------Home   &lt;br /&gt;------------Browse catalogue    &lt;br /&gt;----------------Publications    &lt;br /&gt;--------------------Carousel    &lt;br /&gt;------------------------Publications Banner 1    &lt;br /&gt;------------------------Publications Banner 2    &lt;br /&gt;------------------------Publications Banner 3    &lt;br /&gt;------------------------Publications Banner 4    &lt;br /&gt;--------------------Featured Products    &lt;br /&gt;------------------------Product 3    &lt;br /&gt;------------------------Product 2    &lt;br /&gt;------------------------Product 1    &lt;br /&gt;--------------------Most Popular Products&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;List All Page Types and Their Properties&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;We used below query to make Properties Labels more readable for web editors.&lt;/p&gt;  &lt;p&gt;select tblPageType.Name &#39;Page Type Name&#39;, tblPageType.Description &#39;Page Type Description&#39;,   &lt;br /&gt;tblPageType.FileName &#39;Page Template File&#39;, tblPageDefinition.Name &#39;Property Name&#39;,    &lt;br /&gt;tblPageDefinition.EditCaption &#39;Edit Heading&#39;, tblPageDefinition.HelpText &#39;Help Text&#39;    &lt;br /&gt;from tblPageType inner join tblPageDefinition    &lt;br /&gt;on tblPageType.pkID = tblPageDefinition.fkPageTypeID    &lt;br /&gt;order by tblPageType.Name, tblPageDefinition.FieldOrder&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;&lt;strong&gt;List All Page Template Files, Page Types and Web Pages&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;select distinct tblPageType.FileName &#39;Page Template File&#39;, tblPageType.Name &#39;Page Type Name&#39;,   &lt;br /&gt;tblPageType.Description &#39;Page Type Description&#39;, tblPageLanguage.Name &#39;Web Page Name&#39;,    &lt;br /&gt;tblPageLanguage.LinkURL &#39;Web Page URL&#39;    &lt;br /&gt;from tblPageType    &lt;br /&gt;inner join tblPage on tblPageType.pkID = tblPage.fkPageTypeID    &lt;br /&gt;inner join tblPageLanguage on tblPage.pkID = tblPageLanguage.fkPageID    &lt;br /&gt;order by tblPageLanguage.Name&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;List All Defined Page Types&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;select Name, Filename from tblPageType   &lt;br /&gt;order by Name&lt;/p&gt;</description>
            <guid>http://world.episerver.com/Blogs/K-Khan-/Dates/2013/4/EpiServer-CMS-6-Useful-SQL-Queries/</guid>
            <pubDate>Thu, 25 Apr 2013 15:28:16 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>EPiServer.ImageMap revisited</title>
            <link>http://www.tech-fellow.lv/?p=6272</link>
            <description>If somebody is using some legacy technologies like image maps then probably there are good news that EPiServer.ImageMap editor plugin has been revisited to make it work with EPiServer 7. &amp;#160; Installation There are few steps that you need to take in order to make plugin available for editors: 1. Download latest source from (need &lt;span class=&quot;ellipsis&quot;&gt;&amp;#8230;&lt;/span&gt; &lt;span class=&quot;more-link-wrap&quot;&gt;&lt;a href=&quot;http://www.tech-fellow.lv/2013/04/episerver-imagemap-revisited/&quot; class=&quot;more-link&quot;&gt;&lt;span&gt;Read More ...&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;</description>
            <guid>http://www.tech-fellow.lv/?p=6272</guid>
            <pubDate>Tue, 23 Apr 2013 15:05:10 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>On-page editing and forms editing stop working in EPiServer 7</title>
            <link>http://shahinalborz.se/?p=638</link>
            <description>Working in EpiServer 7 we discovered that some pages, without any obvious reason, were suddenly not editable anymore. Navigating in edit mode, the particular pages did not get the onpage edit borders and clicking the forms editing button would just make the ajax loader keep going forever. No errors in the logfile either. After some [...]</description>
            <guid>http://shahinalborz.se/?p=638</guid>
            <pubDate>Tue, 23 Apr 2013 13:58:42 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>Set up a user friendly Edit Mode before the training</title>
            <link>http://world.episerver.com/Blogs/Maria-Sognefors/Dates/2013/4/Set-up-a-user-friendly-Edit-Mode-before-the-training/</link>
            <description>&lt;p&gt;   &lt;p&gt;&lt;strong&gt;EPiServer is, as you probably already know a very flexible system. There is plenty to do to adapt the tool for both visitors and editors. I am so often surprised with that so few do anything about the editor interface.&lt;/strong&gt;&lt;/p&gt;     &lt;/p&gt;  &lt;p&gt;   &lt;p&gt;&lt;a href=&quot;http://www.7minds.se/blogg/2013/4/anvandarvanlighet-i-episerver/&quot;&gt;This blog post is translated with Google Translate. Read the post in Swedish here&lt;/a&gt;&lt;/p&gt;     &lt;/p&gt;  &lt;p&gt;   &lt;p&gt;I think one reason is that it is so easy to change so that nobody does. The developers do not see it as a problem that there are fields with strange names or tabs that can not benefit from. It does not matter that there are many folders in File Manager, for they are, after all, not be used. But from my perspective, one can not be more wrong. It is exactly this that matters. &lt;/p&gt;     &lt;/p&gt;  &lt;p&gt;   &lt;p&gt;A person who has never seen EPiServer has no idea that these things are easy to change and think it must be so. The field where an editor to write his text named Main Body does not think it is logical for that to which to write their body. This creates two problems, and the risk is that the person think that the system is not user friendly and boring. The second problem is that it makes it unnecessarily difficult for a person to learn the system.&lt;/p&gt;     &lt;/p&gt;  &lt;p&gt;   &lt;p&gt;My advice to you is that already in the requirement specifications of the website to ensure that all names and field right from the start. There is no reason to delay it. I get so often hear, that we take it later. The problem is that &amp;quot;later&amp;quot; rarely comes. It is simply not done. Even if you do not do it right so it MUST be done before the training of editors. It is often when the editors meet the system the first time and you know how they say, &lt;strong&gt;FIRST IMPRESSION LAST&lt;/strong&gt;. &lt;/p&gt;     &lt;/p&gt;  &lt;p&gt;   &lt;p&gt;To simplify for you as a specifier / clients I have made a list of things that need to be examined in EPiServer before training so that editor mode is as easy as possible to learn and understand. If you do not know how things should be done, bring the list to your provider and go through it together. Most of the points concerning EPiServer 6 and earlier, but it&#39;s good to go through the list even for EPiServer 7. &lt;/p&gt;     &lt;/p&gt;  &lt;h3&gt;Name and help texts on field&lt;/h3&gt;  &lt;p&gt;   &lt;p&gt;All fields in templates may have their own names and help texts. These are often quite technical names and help texts are often lacking. There should be good clear name that makes it easy to understand what each field should contain. This can be done in XML files, so that it is possible to have the editor interface in multiple languages, if desired. Making decisions about which language you should have prior training. Change preferably not on the default name from EPiServer, then this will affect the user documentation to come. &lt;/p&gt;     &lt;/p&gt;  &lt;h3&gt;Order in the field &lt;/h3&gt;  &lt;p&gt;   &lt;p&gt;Put the fields in a logical order, so that it becomes easy to fill a page with content. Determine if certain fields should be mandatory or not. Also make sure that it is logical to understand why some fields located on a particular tab. Generally speaking, it may be appropriate to place fields such as page is built, top down simply. &lt;/p&gt;     &lt;/p&gt;  &lt;h3&gt;Flaps position, name and any permissions &lt;/h3&gt;  &lt;p&gt;   &lt;p&gt;Determine the order in which tabs to show and which names they should have. Put any rights if not all to see all the tabs. &lt;/p&gt;     &lt;/p&gt;  &lt;h3&gt;Settings in the editor field &lt;/h3&gt;  &lt;p&gt;   &lt;p&gt;As the new editor, it is perfectly possible to have different settings on different editor field in the same template. The preamble field would not normally allow the same opportunities as a body field. It would certainly not have as great a field. All this can be customized. Making decisions about size, buttons and design in each field. See attached example from another customer. Please read an old blog post about it here. &lt;/p&gt;     &lt;/p&gt;  &lt;h3&gt;Permission to templates / templates available and name &lt;/h3&gt;  &lt;p&gt;   &lt;p&gt;When creating a new page, often appear all templates in a list. Which to be displayed can be controlled in various ways and by those that will be available for a certain template, but also by permission. It needs to be fixed so that editors do not think they can create all kinds of pages. Also give all templates logical names and help texts. Sort them in a logical order in the places where they are more in the same list. &lt;/p&gt;     &lt;/p&gt;  &lt;h3&gt;Structure and permissions in the file manager &lt;/h3&gt;  &lt;p&gt;   &lt;p&gt;About EPiServer file manager is used, there should be a finished structure with permissions on the folders. There must be a logical way to find files and know where to invest. Failure to do this from the beginning, the file manager will be like a haystack that it is impossible to find anything in. It is important to determine the starting points to use, and structure them so that the correct starting point is displayed first. &lt;/p&gt;     &lt;/p&gt;  &lt;h3&gt;Folder structure for block &lt;/h3&gt;  &lt;p&gt;   &lt;p&gt;If you use EPiServer 7, we also need a folder structure of and access rights to the block.&amp;#160; &lt;/p&gt;     &lt;/p&gt;  &lt;h3&gt;Folders in the form handler &lt;/h3&gt;  &lt;p&gt;   &lt;p&gt;It is quite common that there are lots of forms and hence a need to put them in different folders that you should find. Create these folders before training, we learn editors to find right from the start.&lt;/p&gt;     &lt;/p&gt;  &lt;h3&gt;Permissions in tree structure &lt;/h3&gt;  &lt;p&gt;   &lt;p&gt;The various permissions that different groups will have, should be established before the training. It will be silly if a person has the right to do things during the course, but do not have it then. The danger is that it leads to becoming confused by too many things during the course and then when you come back you become frustrated because you can not do things that made during the course. You often think you make a mistake, though, this is actually the system that has limitations. &lt;/p&gt;     &lt;/p&gt;  &lt;h3&gt;Clear up the tree structure&lt;/h3&gt;  &lt;p&gt;   &lt;p&gt;The tree should be as clean as possible, with as much &amp;quot;real&amp;quot; data as possible. Remove whatever tests and other devices and control up to any systemic side is a little hidden for editors. The tree should as far as possible reflect the structure you see on the website, it is most logical for the editor. &lt;/p&gt;     &lt;/p&gt;  &lt;h3&gt;Multi language / Globalization &lt;/h3&gt;  &lt;p&gt;   &lt;p&gt;In many solutions the language support enabled, though it is not supposed to work in multiple languages. Should the site be only in one language, this function should be disabled. &lt;/p&gt;     &lt;/p&gt;  &lt;h3&gt;Workflows&lt;/h3&gt;  &lt;p&gt;Should workflows used? If not then hide this tab.&lt;/p&gt;</description>
            <guid>http://world.episerver.com/Blogs/Maria-Sognefors/Dates/2013/4/Set-up-a-user-friendly-Edit-Mode-before-the-training/</guid>
            <pubDate>Tue, 23 Apr 2013 13:48:52 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>CMS 7.1 upgrade issues</title>
            <link>http://world.episerver.com/Blogs/Per-Nilsson/Dates/2013/4/CMS-71-upgrade-issues/</link>
            <description>&lt;p style=&quot;width: 100.88%; height: 64px&quot;&gt;Since the release of 7.1 we have had a few cases reporting problems with the update and one example is that edit/admin mode ends up being white without any errors. One possible solution for this is to empty the Temporary ASP.NET files for the site and its listed in the Known issues section for the installations &lt;/p&gt;  &lt;p style=&quot;width: 96.39%; height: 85px&quot;&gt;   &lt;br /&gt;&lt;a href=&quot;http://world.episerver.com/Documentation/Items/Installation-Instructions/EPiServer-CMS/Version-7/Installation-Instructions---EPiServer-7-CMS/Installation-Instructions---EPiServer-7-1-CMS/&quot;&gt;http://world.episerver.com/Documentation/Items/Installation-Instructions/EPiServer-CMS/Version-7/Installation-Instructions---EPiServer-7-CMS/Installation-Instructions---EPiServer-7-1-CMS/&lt;/a&gt;&lt;/p&gt;  &lt;p style=&quot;width: 100%; height: 60px&quot;&gt;We have received cases where this wasn&#39;t a solution and are investigating the causes for the issues. It has however been hard to reproduce but it got top priority within EPiServer and we will update the Known issues whenever we have more information. &lt;/p&gt;  &lt;p&gt;If the section doesn&#39;t help for your installation then please report your problem on the link below and if you got an environment where the issue can be reproduced it’s even better:&lt;/p&gt;  &lt;p&gt;&amp;#160; &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;http://world.episerver.com/en/Support/Register-Support-Incident/&quot;&gt;Register Support Incident&lt;/a&gt;&lt;/p&gt;</description>
            <guid>http://world.episerver.com/Blogs/Per-Nilsson/Dates/2013/4/CMS-71-upgrade-issues/</guid>
            <pubDate>Mon, 22 Apr 2013 16:41:55 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>How to choose a search solution for your EPiServer site</title>
            <link>http://www.epinova.no/blog/arild-henrichsen/dates/2013/4/how-to-choose-a-search-solution-for-your-episerver-site/</link>
            <description>There&#39;s a jungle of search products out there. Matching their features with your requirements is critical to making the right choice for your site.</description>
            <guid>http://www.epinova.no/blog/arild-henrichsen/dates/2013/4/how-to-choose-a-search-solution-for-your-episerver-site/</guid>
            <pubDate>Sun, 21 Apr 2013 03:50:26 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>How EPiServer&#39;s HTML helper PropertyFor works</title>
            <link>http://joelabrahamsson.com/how-episervers-html-helper-propertyfor-works/</link>
            <description>&lt;p&gt;When using Web Forms the standard/default/recommended way to render an EPiServer property is to use the EPiServer:Property control. When using ASP.NET MVC its counterpart is the HTML helper &lt;strong&gt;&lt;span class=&quot;code-concept&quot;&gt;PropertyFor&lt;/span&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;That is, PropertyFor is the counterpart the Property control in MVC in terms of being the recommended way to render a property. It is&amp;nbsp;however &lt;em&gt;not&lt;/em&gt; the equivalent of the Property control in terms of functionality.&lt;/p&gt;
&lt;h2&gt;Wrapping elements&lt;/h2&gt;
&lt;p&gt;As you may know, the Property control always wraps the property value in a HTML element. The element differs depending on the property type and can be customized using the CustomTag attribute on the control. This isn&#39;t the case with PropertyFor.&lt;/p&gt;
&lt;p&gt;To examplify, let&#39;s look at the code below where we use the PropertyFor method to render a string property.&lt;/p&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;&amp;lt;div&amp;gt;
    @Html.PropertyFor(x =&amp;gt; x.Heading)
&amp;lt;/div&amp;gt;&lt;/pre&gt;
&lt;p&gt;Given the Heading property has the value &quot;Banana&quot;, the above will output the following when the page is rendered in view mode.&lt;/p&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;&amp;lt;div&amp;gt;
    Banana
&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;/pre&gt;
&lt;p&gt;When the page is rendered in edit mode the output will instead be:&lt;/p&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;&amp;lt;div&amp;gt;
    &amp;lt;div class=&quot;epi-editContainer&quot; data-epi-property-name=&quot;Heading&quot; data-epi-use-mvc=&quot;True&quot;&amp;gt;Banana&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;&lt;/pre&gt;
&lt;p&gt;As you can see, the property&#39;s value has been wrapped in a div with a CSS class and a couple of data-attributes.&amp;nbsp;&lt;/p&gt;
&lt;p class=&quot;conclusion&quot;&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;: PropertyFor &lt;em&gt;never&lt;/em&gt; wraps the property&#39;s value in an element when rendering it in view mode. &lt;em&gt;It always&lt;/em&gt; wraps the property&#39;s value in an element when rendering it in edit mode.&lt;/p&gt;
&lt;h3&gt;CustomTag and CssClass&lt;/h3&gt;
&lt;p&gt;As I&#39;ve previously written about, it&#39;s possible to &lt;a href=&quot;/link/7e15400e6eaf4ab7921d0a1becacb9b3.aspx?id=283&amp;amp;epslanguage=en&quot;&gt;pass settings such as CustomTag and CssClass to PropertyFor&lt;/a&gt;. With the Property control the CustomTag setting controls the type of element that the property is wrapped in and the CssClass setting adds one or more CSS classes to the wrapping element.&lt;/p&gt;
&lt;p&gt;Let&#39;s modify the previous example to see what PropertyFor does with them.&lt;/p&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;&amp;lt;div&amp;gt;
    @Html.PropertyFor(x =&amp;gt; x.Heading, new { CustomTag = &quot;h1&quot;, CssClass =&quot;muted&quot; })
&amp;lt;/div&amp;gt;&lt;/pre&gt;
&lt;p&gt;In view mode this changes the output to:&lt;/p&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;&amp;lt;div&amp;gt;
    Banana
&amp;lt;/div&amp;gt;&lt;/pre&gt;
&lt;p&gt;That&#39;s right, it doesn&#39;t change the output at all.&lt;/p&gt;
&lt;p&gt;What about when rendered in edit mode?&lt;/p&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;&amp;lt;div&amp;gt;
    &amp;lt;h1 class=&quot;epi-editContainer&quot; data-epi-property-name=&quot;Heading&quot; data-epi-use-mvc=&quot;True&quot; data-epi-property-rendersettings=&quot;{&amp;amp;quot;customTag&amp;amp;quot;:&amp;amp;quot;h1&amp;amp;quot;,&amp;amp;quot;cssClass&amp;amp;quot;:&amp;amp;quot;muted&amp;amp;quot;}&quot; class=&quot;heading&quot;&amp;gt;Banana&amp;lt;/h1&amp;gt;
&amp;lt;/div&amp;gt;&lt;/pre&gt;
&lt;p&gt;Starting with CustomTag we can see that setting it to h1 changed the type of the wrapping element that PropertyFor added in edit mode.&lt;/p&gt;
&lt;p class=&quot;conclusion&quot;&gt;&lt;strong&gt;Conclusion:&lt;/strong&gt; CustomTag changes the type of element that wrapes the rendered property when rendered in edit mode.&lt;/p&gt;
&lt;p&gt;As for CssClass that added a class attribute with the specified value to the element. However, there already was another class attribute on the element and our custom CSS class wasn&#39;t added to that. It was added as a separate class attribute, meaning that the browser will ignore it. Here&#39;s how FireBug sees the rendered markup:&lt;/p&gt;
&lt;p&gt;&lt;img class=&quot;thumbnail&quot; src=&quot;/PageFiles/633/firebug-custom-class.png&quot; alt=&quot;&quot; width=&quot;625&quot; height=&quot;74&quot; /&gt;&lt;/p&gt;
&lt;p&gt;So, it appears that while CustomTag changes the type of wrapping element that PropertyFor renderes the property in in edit mode CssClass doesn&#39;t, in practice, have any effect on the class attribute on the wrapping element.&lt;/p&gt;
&lt;p&gt;However, there&#39;s another setting we can pass to PropertyFor, EditContainerClass. Let&#39;s see what happens if we use that instead of CssClass, like this:&lt;/p&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;&amp;lt;div&amp;gt;
    @Html.PropertyFor(x =&amp;gt; x.Heading, new { CustomTag = &quot;h1&quot;, EditContainerClass =&quot;muted&quot; })
&amp;lt;/div&amp;gt;&lt;/pre&gt;
&lt;p&gt;That produces the following when rendered in edit mode:&lt;/p&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;&amp;lt;div&amp;gt;
    &amp;lt;h1 class=&quot;muted&quot; data-epi-property-name=&quot;Heading&quot; data-epi-use-mvc=&quot;True&quot; data-epi-property-rendersettings=&quot;{&amp;amp;quot;customTag&amp;amp;quot;:&amp;amp;quot;h1&amp;amp;quot;,&amp;amp;quot;editContainerClass&amp;amp;quot;:&amp;amp;quot;muted&amp;amp;quot;}&quot;&amp;gt;Banana&amp;lt;/h1&amp;gt;
&amp;lt;/div&amp;gt;&lt;/pre&gt;
&lt;p&gt;Look at that. No second class attribute has been added and the first has changed from &quot;epi-editContainer&quot; to the value we specified in EditContainerClass.&lt;/p&gt;
&lt;p class=&quot;conclusion&quot;&gt;&lt;strong&gt;Conclusion:&lt;/strong&gt; CssClass does not change the CSS class for the wrapping element when rendered in edit mode. EditContainerClass does.&lt;/p&gt;
&lt;p&gt;Us specifying CustomTag, CssClass and, later, EditContainerClass also brought another change to the rendered markup in edit mode - a data-epi-property-rendersettings attribute was added to the wrapping element. The attributes value looks to be the serialized version of the anonymous object we used to pass the settings to PropertyFor with.&lt;/p&gt;
&lt;h2&gt;How PropertyFor renders property values&lt;/h2&gt;
&lt;p&gt;So far we&#39;ve looked at how and when PropertyFor wraps the output for a property. But, beyond rendering a wrapping element in edit mode, how does it actually render a property?&lt;/p&gt;
&lt;p&gt;In Web Forms the Property control uses the ClassFactory&amp;nbsp;&lt;/p&gt;
&lt;p&gt;DisplayTemplates&lt;/p&gt;
&lt;p&gt;AdditionalViewData in display templates&lt;/p&gt;
&lt;p&gt;Null check&lt;/p&gt;
</description>
            <guid>http://joelabrahamsson.com/how-episervers-html-helper-propertyfor-works/</guid>
            <pubDate>Sat, 20 Apr 2013 14:04:32 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>EPiServer 7 patch 2, MVC and session state</title>
            <link>http://www.popkram.com/blog/?p=2202</link>
            <description>When my colleague Niklas Melinder applied patch 2 for EPiServer 7 he ran into trouble when the site was deployed to our acceptance server. The site started to throw &amp;#8220;System.InvalidOperationException: The SessionStateTempDataProvider class requires session state to be enabled.&amp;#8221;. Since our acceptance environment runs with sessions state switched off it was pretty clear what caused [...]</description>
            <guid>http://www.popkram.com/blog/?p=2202</guid>
            <pubDate>Sat, 20 Apr 2013 13:22:45 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>Automatically Populating Page or Block Type Properties for a Language Branch in EPiServer 7</title>
            <link>http://cjsharp1.github.io/blog/2013/04/19/automatically-populating-page-or-block-type-properties-for-a-language-branch-in-episerver-7</link>
            <description>&lt;p&gt;The creation and editing of content for multiple language sites in EPiServer 7 has recently become a topic of conversation in some of our projects. We occasionally receive feedback from our clients who are looking for ways to reduce the amount of time it takes to enter content, while also being consistent with the page and block layout.&lt;/p&gt;

&lt;p&gt;One big change with the new Edit Mode in EPiServer 7, which was available in EPiServer 6 (and technically is still available in the &lt;a href=&quot;http://world.episerver.com/Blogs/Alexander-Haneng/Dates/2013/1/5-Secrets-in-EPiServer-CMS-7-Edit-Mode/&quot;&gt;old Edit Mode&lt;/a&gt;), is that feature to compare the language branches for a page side-by-side has been removed. This was useful for editors who need to keep the content for pages consistent between each language branch, as it allowed them to easily compare the different language branches.&lt;/p&gt;

&lt;p&gt;So to help this, we created a property attribute called &lt;code&gt;[AutoPopulateLanguageBranch]&lt;/code&gt;. Whenever a editor translates a page or block, this copies the values from the master language branch to the new language branch for the decorated page or block type properties. This keeps the content consistent between the language branches, which, at the same time, helps speed up the process of entering content.&lt;/p&gt;

&lt;!-- more --&gt;


&lt;h2&gt;The Code&lt;/h2&gt;

&lt;p&gt;First of all, the ability to translate blocks for different language branches was added with &lt;a href=&quot;http://world.episerver.com/Documentation/Items/Release-Notes/EPiServer-CMS/EPiServer-7/Release-Notes--EPiServer-7-1-CMS/&quot;&gt;the release of EPiServer 7.1&lt;/a&gt;. If you are not running EPiServer 7.1, I recommend &lt;a href=&quot;http://world.episerver.com/Documentation/Items/Installation-Instructions/EPiServer-CMS/Version-7/Installation-Instructions---EPiServer-7-CMS/Installation-Instructions---EPiServer-7-1-CMS/&quot;&gt;upgrading your project&lt;/a&gt; before you start using this attribute.&lt;/p&gt;

&lt;p&gt;We just need three things: the &lt;code&gt;[AutoPopulateLanguageBranch]&lt;/code&gt; attribute to decorate our properties, an initialization module to monitor when we should copy our property values, and an &lt;code&gt;IContent&lt;/code&gt; extension method to actually copy the decorated property values.&lt;/p&gt;

&lt;h3&gt;AutoPopulateLanguageBranchAttribute.cs&lt;/h3&gt;

&lt;p&gt;We start with a simple attribute to decorate our page type properties and block type properties.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;[AttributeUsage(AttributeTargets.Property)]
public class AutoPopulateLanguageBranchAttribute : Attribute
{
}
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;AutoPopulateLanguageBranchInitializationModule.cs&lt;/h3&gt;

&lt;p&gt;The first main piece of this is the initialization module. This attaches (and detaches) the &lt;code&gt;InitializeContentLanguageBranch&lt;/code&gt; method to the &lt;code&gt;LoadedDefaultContent&lt;/code&gt; event of the &lt;code&gt;DataFactory&lt;/code&gt;, which &lt;a href=&quot;http://world.episerver.com/Documentation/Class-library/?documentId=cms/7/fedd145e-c37d-fb4b-9b78-599dea86f360&quot;&gt;&quot;occurs when a new content item has been created and initialized&quot;&lt;/a&gt;. This method is essentially just some preventative checks and content data setup. We need to make sure we have legitimate content, and that the content we are working with is not on the master language branch. Then, we grab the content data from the master language branch, so we have something to copy over to the new language branch. Once we have everything, we send it over to &lt;code&gt;ContentExtensions&lt;/code&gt; for the copying of property values.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;[InitializableModule]
[ModuleDependency(typeof(EPiServer.Web.InitializationModule))]
public class AutoPopulateLanguageBranchInitializationModule : IInitializableModule
{
    public void Initialize(EPiServer.Framework.Initialization.InitializationEngine context)
    {
        DataFactory.Instance.LoadedDefaultContent += InitializeContentLanguageBranch;
    }

    public void Preload(string[] parameters)
    {
    }

    public void Uninitialize(EPiServer.Framework.Initialization.InitializationEngine context)
    {
        DataFactory.Instance.LoadedDefaultContent -= InitializeContentLanguageBranch;
    }

    private void InitializeContentLanguageBranch(object sender, ContentEventArgs e)
    {
        if (e.Content != null &amp;amp;&amp;amp; e.Content.ContentGuid != Guid.Empty)
        {
            var contentLanguage = new ContentLanguageEventArgs(e.Content);
            if (contentLanguage != null &amp;amp;&amp;amp; !contentLanguage.IsMasterLanguageBranch)
            {
                var contentLoader = ServiceLocator.Current.GetInstance&amp;lt;IContentLoader&amp;gt;();
                var masterLanguageContent = contentLoader.Get&amp;lt;IContent&amp;gt;(contentLanguage.ContentLink, new LanguageSelector(contentLanguage.MasterLanguageBranch));
                if (masterLanguageContent != null)
                {
                    e.Content.InitializeDefaultPropertyData(masterLanguageContent);
                }
            }
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;ContentExtensions.cs&lt;/h3&gt;

&lt;p&gt;The second main piece is the extension method &lt;code&gt;InitializeDefaultPropertyData&lt;/code&gt; for the &lt;code&gt;IContent&lt;/code&gt; interface. Once again, we do some preventative checks, then get the page/block &lt;code&gt;Type&lt;/code&gt;, so we can look through the properties and see which ones are decorated with the &lt;code&gt;[AutoPopulateLanguageBranch]&lt;/code&gt; attribute. After we have on all the properties, we simply copy the &lt;code&gt;Value&lt;/code&gt; over from the &lt;code&gt;sourceContent&lt;/code&gt; to the &lt;code&gt;targetContent&lt;/code&gt;. Finally, we return the &lt;code&gt;targetContent&lt;/code&gt; back to the module.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;public static class ContentExtensions
{
    public static IContent InitializeDefaultPropertyData(this IContent targetContent, IContent sourceContent)
    {
        if (sourceContent == null || 
            sourceContent.GetType() != targetContent.GetType() || 
            sourceContent.GetType().BaseType == null)
        {
            return targetContent;
        }

        var type = sourceContent.GetType().BaseType;

        foreach (var property in type.GetProperties().Where(p =&amp;gt; p.GetCustomAttributes(typeof(AutoPopulateLanguageBranchAttribute), true).Length &amp;gt; 0))
        {
            if (property != null &amp;amp;&amp;amp; 
                targetContent.Property[property.Name] != null &amp;amp;&amp;amp; 
                targetContent.Property[property.Name].IsLanguageSpecific)
            {
                targetContent.Property[property.Name].Value = sourceContent.Property[property.Name].Value;
            }
        }

        return targetContent;
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;The Usage&lt;/h2&gt;

&lt;p&gt;Using the &lt;code&gt;[AutoPopulateLanguageBranch]&lt;/code&gt; attribute is really straightforward... Just decorate the properties that you want to copy over in your page types or block types.&lt;/p&gt;

&lt;p&gt;So for a page type, it could look something like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;[ContentType(GUID = &quot;00000000-0000-0000-0000-000000000000&quot;)]
public class StandardPage : PageData
{
    [CultureSpecific]
    [AutoPopulateLanguageBranch]
    public virtual XhtmlString MainBody { get; set; }

    [CultureSpecific]
    [AutoPopulateLanguageBranch]
    public virtual ContentArea MainContentArea { get; set; }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Or for a block type:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;[ContentType(GUID = &quot;00000000-0000-0000-0000-000000000000&quot;)]
public class ImageBlock : BlockData
{
    [CultureSpecific]
    [AutoPopulateLanguageBranch]
    [UIHint(UIHint.Image)]
    public virtual Url Image { get; set; }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;It&#39;s pretty obvious that the &lt;code&gt;[AutoPopulateLanguageBranch]&lt;/code&gt; attribute is commonly seen next to the &lt;code&gt;[CultureSpecific]&lt;/code&gt; attribute. If the property is not decorated with &lt;code&gt;[CultureSpecific]&lt;/code&gt;, then it will be skipped during the copy process.&lt;/p&gt;

&lt;p&gt;A nice part about this attribute is that it can populate a page&#39;s &lt;code&gt;ContentArea&lt;/code&gt; property with the blocks that are placed in it, and if the block has not yet been translated to the new language branch, it will fallback and show the content data for the block&#39;s master language branch. This is what the block will look like on a page in Edit Mode:&lt;/p&gt;

&lt;p&gt;&lt;img class=&quot;center&quot; src=&quot;/assets/images/AutoPopulateLanguageBranch/UntranslatedBlock.PNG&quot; /&gt;&lt;/p&gt;

&lt;p&gt;That gives the editor a really good visual cue that the block needs to be translated to the new language branch.&lt;/p&gt;
</description>
            <guid>http://cjsharp1.github.io/blog/2013/04/19/automatically-populating-page-or-block-type-properties-for-a-language-branch-in-episerver-7</guid>
            <pubDate>Fri, 19 Apr 2013 07:02:00 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>Add UIHint to an EPiServer property without affecting its editor</title>
            <link>http://joelabrahamsson.com/add-uihint-to-an-episerver-property-without-affecting-its-editor/</link>
            <description>&lt;p&gt;We can use UI hints to make the PropertyFor and DisplayFor methods use a specific display template when rendering properties with ASP.NET MVC.&lt;/p&gt;
&lt;p&gt;For instance, when rendering a property like this...&lt;/p&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;[UIHint(&quot;Banana&quot;)]&lt;br /&gt;public virtual string Heading { get; set; }&lt;/pre&gt;
&lt;p&gt;...using Html.PropertyFor() it will be &quot;sent&quot; to a display template named Banana, given such a template exists.&lt;/p&gt;
&lt;p&gt;There&#39;s just one problem. When adding a UI hint that no editor descriptor cares about we loose the original editing functionality for the property and it will be edited using the &quot;legacy&quot; editing functionality. That is, instead of a textbox for a string property editors will see a button saying &quot;Click the button to edit&quot;.&lt;/p&gt;
&lt;p&gt;To fix that, use an overload for the UIHint attribute and specify&amp;nbsp;&lt;strong&gt;&lt;span class=&quot;code-concept&quot;&gt;PresentationLayer.Website&lt;/span&gt;&lt;/strong&gt;, like this:&lt;/p&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;[UIHint(&quot;Banana&quot;, PresentationLayer.Website)]&lt;br /&gt;public virtual string Heading { get; set; }&lt;/pre&gt;
&lt;p&gt;One caveat, while this works great with PropertyFor it won&#39;t work with DisplayFor which won&#39;t recognize the UI hint any longer.&lt;/p&gt;
</description>
            <guid>http://joelabrahamsson.com/add-uihint-to-an-episerver-property-without-affecting-its-editor/</guid>
            <pubDate>Thu, 18 Apr 2013 15:49:30 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>Specify z-index for a property&#39;s overlay in EPiServer&#39;s on page edit mode</title>
            <link>http://joelabrahamsson.com/specify-z-index-for-a-propertys-overlay-in-episervers-on-page-edit-mode/</link>
            <description>&lt;p&gt;Sometimes two property values overlap when rendered in a template. It may for instance be a string property whose value should be rendered on top of an image which is also a property. Or it may be a link/URL property that should be rendered at the of a string property.&lt;/p&gt;
&lt;p&gt;By default both properties will have an overlay, the thin blue border that is positioned on top of the element in which the property value is rendered. However, only one of them will be clickable.&lt;/p&gt;
&lt;p&gt;To handle that we can specify the z-index for the overlay for the property that isn&#39;t clickable. To do so add a&amp;nbsp;&lt;strong&gt;&lt;span class=&quot;code-concept&quot;&gt;data-epi-overlay-z-index&lt;/span&gt;&lt;/strong&gt; attribute to the element that contains the property. For instance, when using ASP.NET MVC and Razor:&lt;/p&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;&amp;lt;h1 data-epi-overlay-z-index=&quot;123&quot; @Html.EditAttributes(x =&amp;gt; x.Heading)&amp;gt;
    @Model.Heading
&amp;lt;/h1&amp;gt;&lt;br /&gt;&lt;/pre&gt;
</description>
            <guid>http://joelabrahamsson.com/specify-z-index-for-a-propertys-overlay-in-episervers-on-page-edit-mode/</guid>
            <pubDate>Thu, 18 Apr 2013 15:31:47 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>ImageVault 4 is now available for EPiServer 7 CMS!</title>
            <link>http://blog.imagevault.se/post/48273577641</link>
            <description>&lt;p&gt;The use of digital media on the web has rapidly increased during the past years and every organization today has the need to use some type of digital media (e.g. images or streaming media) to convey their message in an efficient manner. Today’s users also has a greater expectation on their CMS platform to have some kind of capability for managing digital media in a more structured way that facilitates the process of using digital assets on the web.&lt;/p&gt;
&lt;p&gt;In the report ”Digital Asset Management Q2&amp;#160;2012” Forester highlight Digital Asset Management’s touch points with Content Management: &lt;/p&gt;
&lt;p&gt;&lt;em&gt;Organizations look to integrate rich media management solutions with other enterprise applications &amp;#8212; particularly those that deliver online content. And DAM’s role in supporting persuasive content makes it an important part of the new set of CXM solutions for engaging customer experiences.&lt;/em&gt; &lt;br /&gt;&lt;br /&gt;Find out more about ImageVault 4 and EPiServer 7 CMS &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://world.episerver.com/Articles/Items/Media-Asset-Management-for-EPiServer-CMS/&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=&quot;image&quot; src=&quot;http://media.tumblr.com/4ddf4b1dd11e4f10c776174970977f74/tumblr_inline_mleajevyO21qz4rgp.png&quot; /&gt;&lt;/p&gt;




&lt;p&gt;&lt;img alt=&quot;image&quot; src=&quot;http://media.tumblr.com/b8d4c10d6352cfc33d3e21840b792c68/tumblr_inline_mleak3EoXs1qz4rgp.png&quot; /&gt;&lt;/p&gt;</description>
            <guid>http://blog.imagevault.se/post/48273577641</guid>
            <pubDate>Thu, 18 Apr 2013 14:30:24 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>Changes to the module.config for EPiServer 7.1</title>
            <link>http://world.episerver.com/Blogs/Ben-McKernan/Dates/2013/4/Changes-to-the-moduleconfig-for-EPiServer-71/</link>
            <description>&lt;p&gt;I’ve seen on the forum that there have been several people having issues running their custom dojo code after the EPiServer 7.1 update. So I thought I’d mention these issues, their cause and the solution.&lt;/p&gt;
&lt;h2&gt;Required Resources Key Changed for CMS&lt;/h2&gt;
&lt;p&gt;So I’ve demonstrated in previous blog posts that it’s possible to initialize a module without having a component. This was done by using a little trick to add an initializer script to the required resources for CMS by adding the following to your module.config file.&lt;/p&gt;
&lt;div id=&quot;codeSnippetWrapper&quot; style=&quot;overflow: auto; cursor: text; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; text-align: left; margin: 20px 0px 10px; line-height: 12pt; max-height: 200px; width: 97.5%; background-color: #f4f4f4; border: silver 1px solid; padding: 4px;&quot;&gt;
&lt;div id=&quot;codeSnippet&quot; style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;clientResources&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;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&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;=&quot;epi.cms.widgets.base&quot;&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;path&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;=&quot;initialize.js&quot;&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;resourceType&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;=&quot;Script&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;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;clientResources&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;With the upgrade to dojo 1.8.3 we changed the dojo package name for CMS to be epi-cms. This is due to the fact that dojo has made changes in their loader which means that dot or slash separated package names are no longer supported. To be consistent with our naming we also changed the key for required resources. So the following are now the required resource keys:&lt;/p&gt;
&lt;p&gt;EPiServer 7: &lt;span style=&quot;font-family: monospace;&quot;&gt;epi.cms.widgets.base&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;EPiServer 7.1: &lt;span style=&quot;font-family: monospace;&quot;&gt;epi-cms.widgets.base&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;JavaScript Package Naming&lt;/h2&gt;
&lt;p&gt;As mentioned previously dojo have changed their loader to be fully AMD compliant and as such dot or slash separated names are no longer supported. For example the following is no longer supported:&lt;/p&gt;
&lt;div id=&quot;codeSnippetWrapper&quot; style=&quot;overflow: auto; cursor: text; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; text-align: left; margin: 20px 0px 10px; line-height: 12pt; max-height: 200px; width: 97.5%; background-color: #f4f4f4; border: silver 1px solid; padding: 4px;&quot;&gt;
&lt;div id=&quot;codeSnippet&quot; style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;dojoModules&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;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&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;=&quot;my.addon&quot;&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;path&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;=&quot;scripts/addon&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;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;dojoModules&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;My suggestion if you are in this situation is to change the delimiter from dot or slash to be a dash instead. Meaning that in the above example the package name would instead be &lt;span style=&quot;font-family: monospace;&quot;&gt;my-addon.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Hopefully this helps anybody who runs into similar issues!&lt;/p&gt;</description>
            <guid>http://world.episerver.com/Blogs/Ben-McKernan/Dates/2013/4/Changes-to-the-moduleconfig-for-EPiServer-71/</guid>
            <pubDate>Thu, 18 Apr 2013 10:50:15 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>How to Delete the Language Branch for a Page or a Block in EPiServer 7</title>
            <link>http://cjsharp1.github.io/blog/2013/04/17/how-to-delete-the-language-branch-for-a-page-or-a-block-in-episerver-7</link>
            <description>&lt;p&gt;The release of EPiServer 7 has brought numerous changes to the way editors interact with Edit Mode. One such change is the process needed to remove the language branch for a page or a block. Of course, you could always use the &lt;a href=&quot;http://world.episerver.com/Blogs/Alexander-Haneng/Dates/2013/1/5-Secrets-in-EPiServer-CMS-7-Edit-Mode/&quot;&gt;old Edit Mode&lt;/a&gt; to complete this task, but let&#39;s find out how to do this in EPiServer 7&#39;s new Edit Mode.&lt;/p&gt;

&lt;!-- more --&gt;


&lt;h2&gt;The EPiServer 6 Way&lt;/h2&gt;

&lt;p&gt;&lt;img class=&quot;right&quot; src=&quot;/assets/images/DeleteLanguageBranch/DeleteLangBranchEPi6.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;In EPiServer 6, the process to delete the language branch for a page was pretty straightforward, primarily because the &quot;Delete Language&quot; link was located in the context menu (right-click) of the page.&lt;/p&gt;

&lt;p&gt;If you prefer to use EPiServer 7&#39;s old Edit Mode, this hasn&#39;t changed at all; you&#39;ll still get the context menu and this menu still looks the same.&lt;/p&gt;

&lt;p&gt;One issue with EPiServer 6, though, was that you couldn&#39;t delete a language branch for the Start Page. The workaround to solve this was to point the site&#39;s Start Page to a different page, remove the language branch, then point the site&#39;s Start Page back to the correct one. This might not be a big deal for development environments, but once you move to a production server, this could possibly cause some issues.&lt;/p&gt;

&lt;h2&gt;The EPiServer 7 Way&lt;/h2&gt;

&lt;p&gt;In EPiServer 7, since the context menu was removed, the link to delete the language branch for a page or a block had to be relocated. You&#39;ll now find the link in the Versions gadget.&lt;/p&gt;

&lt;p&gt;&lt;img class=&quot;right&quot; src=&quot;/assets/images/DeleteLanguageBranch/DeleteLangBranchEPi7.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;In the navigation pane or the assets pane, click the &quot;Settings&quot; button (the little cog) in the upper corner next to the &quot;Pin&quot; button, and click the &quot;Add Gadgets&quot; link. In the modal that opens, scroll down and click &quot;Versions&quot;. (Simply clicking &quot;Versions&quot; will add the gadget; you will not recieve any notifications that it added the gadget.) The gadget will appear by default at the bottom of the navigation/assets pane. Once the gadget has been added and is visible, you&#39;ll find the &quot;Delete &lt;em&gt;{insert your current language}&lt;/em&gt; Language Branch&quot; link when you click the &quot;More options&quot; button.&lt;/p&gt;

&lt;p&gt;You should note that the Versions gadget that you open in the navgiation pane is the same that you open in the assets pane. So if you are trying to delete the language branch for a block, you need to go into the block&#39;s &quot;Edit&quot; screen, otherwise you&#39;ll still be working with the page&#39;s version. It&#39;s probably good idea to actually read the &quot;Delete Language Branch&quot; confirmation window, so you don&#39;t make a mistake when deleting the language branch. &lt;strong&gt;Deleting the language branch for a page or a block does not put it in the Trash. It cannot be undone.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;EPiServer 7 also now has the ability to delete a language branch for the Start Page. The same link in the Versions gadget will allow you to do this.&lt;/p&gt;

&lt;p&gt;Unfortunately, you will not be able to delete the language branch if you&#39;re on the master language branch (typically the &quot;EN&quot; branch). The link will be grayed out, diabled, and unclickable.&lt;/p&gt;
</description>
            <guid>http://cjsharp1.github.io/blog/2013/04/17/how-to-delete-the-language-branch-for-a-page-or-a-block-in-episerver-7</guid>
            <pubDate>Thu, 18 Apr 2013 04:57:00 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>Configuring TinyMCE using EPiServer custom property settings</title>
            <link>http://www.markeverard.com/?p=2092</link>
            <description>The TinyMCE rich-text editor provides great flexibility for editors to create and mark-up content within EPiServer. TinyMCE is a seemingly infinitely configurable tool and can be configured to show / hide many of its available features.&#160; One of the ways EPiServer Administrators / Developers / Integrators can help is by configuring TinyMCE to only show [...]</description>
            <guid>http://www.markeverard.com/?p=2092</guid>
            <pubDate>Wed, 17 Apr 2013 14:19:39 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>Hide pages in the page tree in EPiServer 7</title>
            <link>http://tedgustaf.com//link/13d760d0ca0048efa67c621c53d4ae50.aspx?id=321&amp;epslanguage=en</link>
            <description>&lt;p class=&quot;intro&quot;&gt;Sometimes it could be useful to manipulate how certain pages are displayed in the page tree in EPiServer 7. Because the page tree is loaded from a REST based store, all you really need to do is provide a custom implementation of the ContentQuery responsible for...&lt;/p&gt;&lt;p&gt;Sometimes it could be useful to manipulate how certain pages are displayed in the page tree in EPiServer 7. Because the page tree is loaded from a REST based store, all you really need to do is provide a custom implementation of the ContentQuery responsible for loading the children.&lt;/p&gt;
&lt;p&gt;The REST stores in EPiServer are discovered at application startup. The &lt;strong&gt;ContentStructureStore&lt;/strong&gt; which is used for loading content into the page tree (no shit?), will be provided with a number of ContentQuery classes at initialization. One of them is &lt;strong&gt;EPiServer.Cms.Shell.UI.Rest.ContentQuery.GetChildrenQuery&lt;/strong&gt;.&lt;/p&gt;
&lt;h3&gt;Provide your custom query&lt;/h3&gt;
&lt;p&gt;First add a reference to &lt;strong&gt;EPiServer.Cms.Shell.UI assembly&lt;/strong&gt;. Yes, you will now have a dependency to an EPiServer module, so think about that for a moment.&lt;/p&gt;
&lt;p&gt;Then add your own &lt;strong&gt;GetChildrenQuery&lt;/strong&gt; class. You get alot of goodies through the &lt;strong&gt;ContentQueryParameters&lt;/strong&gt; object passed to &lt;strong&gt;GetContent&lt;/strong&gt;, such as &lt;strong&gt;CurrentPrincipal&lt;/strong&gt;, &lt;strong&gt;CurrentLanguage&lt;/strong&gt; etc.&lt;/p&gt;
&lt;p&gt;So, short example. I’ll hide all content that have a name containing “Alloy”.&lt;/p&gt;
&lt;div id=&quot;codeSnippetWrapper&quot; style=&quot;overflow: auto; cursor: text; font-size: 8pt; height: 229px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; text-align: left; margin: 20px 0px 10px; line-height: 12pt; max-height: 200px; width: 97.5%; background-color: #f4f4f4; border: silver 1px solid; padding: 4px;&quot;&gt;
&lt;div id=&quot;codeSnippet&quot; style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;using&lt;/span&gt; System;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;using&lt;/span&gt; System.Collections.Generic;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;using&lt;/span&gt; System.Diagnostics;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;using&lt;/span&gt; System.Linq;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;using&lt;/span&gt; System.Web;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;using&lt;/span&gt; EPiServer.Cms.Shell.UI.Rest.ContentQuery;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;using&lt;/span&gt; EPiServer.Core;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;using&lt;/span&gt; EPiServer.ServiceLocation;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;namespace&lt;/span&gt; EPiServer.Templates.Alloy.Business&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;{&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;    [ServiceConfiguration(&lt;span style=&quot;color: #0000ff;&quot;&gt;typeof&lt;/span&gt;(IContentQuery))]&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 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; MyGetChildrenQuery : GetChildrenQuery&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;    {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        &lt;span style=&quot;color: #0000ff;&quot;&gt;public&lt;/span&gt; MyGetChildrenQuery(IContentQueryHelper queryHelper, IContentRepository contentRepository, LanguageSelectorFactory languageSelectorFactory) : &lt;span style=&quot;color: #0000ff;&quot;&gt;base&lt;/span&gt;(queryHelper, contentRepository, languageSelectorFactory)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;        {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;        &lt;span style=&quot;color: #0000ff;&quot;&gt;protected&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;override&lt;/span&gt; IEnumerable&amp;lt;IContent&amp;gt; GetContent(ContentQueryParameters parameters)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;        {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;            &lt;span style=&quot;color: #0000ff;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;base&lt;/span&gt;.GetContent(parameters).Where(x =&amp;gt; !x.Name.Contains(&lt;span style=&quot;color: #006080;&quot;&gt;&quot;Alloy&quot;&lt;/span&gt;));&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;        }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;&quot;&gt;    }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;overflow: visible; font-size: 8pt; font-family: &#39;Courier New&#39;, courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;&quot;&gt;}&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;</description>
            <guid>http://tedgustaf.com//link/13d760d0ca0048efa67c621c53d4ae50.aspx?id=321&amp;epslanguage=en</guid>
            <pubDate>Wed, 17 Apr 2013 12:18:04 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>EPiServer Find 101</title>
            <link>http://joelabrahamsson.com/episerver-find-101/</link>
            <description>New to EPIServer Find and want a jump start? Here&#39;s what you need to know.
&lt;p&gt;If you&#39;re new to EPiServer Find and going to use it in a project, or just want to try it out, there&#39;s plenty of &lt;a href=&quot;http://find.episerver.com/Documentation&quot;&gt;documentation on Find&#39;s site&lt;/a&gt;. There&#39;s also training offered by EPiServer. Not to mention &lt;a href=&quot;/link/a9a0b4855c45469aba7b15a506e8b30f.aspx?id=58826&amp;amp;epslanguage=en&quot;&gt;the forum&lt;/a&gt; on EPiServer World.&lt;/p&gt;
&lt;p&gt;Sometimes you need a little quick start though. Here&#39;s the most essential things to know about Find&#39;s .NET API and CMS integration.&lt;/p&gt;
&lt;h2&gt;Setting up&lt;/h2&gt;
&lt;p&gt;You can grab yourself a free test index at &lt;a href=&quot;http://find.episerver.com&quot;&gt;find.episerver.com&lt;/a&gt;.&amp;nbsp;Once you have created your index you can copy and paste the necessary configuration into your app.config or web.config.&lt;/p&gt;
&lt;p&gt;&lt;img class=&quot;thumbnail-centered&quot; src=&quot;/PageFiles/623/Find-configuration.png&quot; alt=&quot;&quot; width=&quot;714&quot; height=&quot;378&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Finally you need to download and reference Find&#39;s .NET API. That&#39;s easily done through NuGet given that you have EPiServer&#39;s NuGet feed added as a package source. There&#39;s three packages to choose from. For an EPiServer CMS site install&amp;nbsp;&lt;strong&gt;EPiServer Find CMS Integration&lt;/strong&gt;. For any other type of .NET application install&amp;nbsp;&lt;strong&gt;EPiServer Find Client API&lt;/strong&gt;.&lt;/p&gt;
&lt;h2&gt;Communicating with the REST API&lt;/h2&gt;
&lt;p&gt;You can use the .NET API from any .NET application. When doing so, all communication with Find&#39;s REST API goes through an instance of the &lt;strong&gt;&lt;span class=&quot;code-concept&quot;&gt;IClient&lt;/span&gt;&lt;/strong&gt; interface. To obtain such an instance when not using the CMS integration you can use the &lt;strong&gt;&lt;span class=&quot;code-concept&quot;&gt;Client.CreateFromConfig()&lt;/span&gt;&lt;/strong&gt; method to create it based on settings in app.config/web.config.&lt;/p&gt;
&lt;p&gt;If you&#39;re using the CMS integration or any other integration for other EPiServer products&amp;nbsp;&lt;em&gt;always&lt;/em&gt; use the singleton &lt;strong&gt;&lt;span class=&quot;code-concept&quot;&gt;SearchClient.Instance&lt;/span&gt;&lt;/strong&gt;. This is important. The singleton is preconfigured with conventions set up for CMS content.&lt;/p&gt;
&lt;blockquote&gt;&quot;If you&#39;re using the CMS integration&amp;nbsp;always&amp;nbsp;use the singleton SearchClient.Instance&quot;&lt;/blockquote&gt;
&lt;h2&gt;Finding things&lt;/h2&gt;
&lt;p&gt;Once you have a client search for indexed objects (CMS objects are automatically indexed upon save) using the &lt;strong&gt;&lt;span class=&quot;code-concept&quot;&gt;Search&amp;lt;T&amp;gt;()&lt;/span&gt;&lt;/strong&gt; method where T is the type of objects you want to search for. The method supports inheritance and searching for objects that implement an interface.&lt;/p&gt;
&lt;p&gt;The Search method returns an object which you can add queries and filters to. Use the &lt;strong&gt;&lt;span class=&quot;code-concept&quot;&gt;For&lt;/span&gt;&lt;/strong&gt; method for free text search. Use the &lt;strong&gt;&lt;span class=&quot;code-concept&quot;&gt;Filter&lt;/span&gt;&lt;/strong&gt; method to apply criterias.&lt;/p&gt;
&lt;p&gt;The Filter method is very similar to LINQ&#39;s Where method but has a slightly different syntax. You can filter on any property of a &quot;simple&quot; type, such as int, string, DateTime, double, GUID etc. Check out &lt;a href=&quot;http://find.episerver.com/Documentation/dotnet-api-filtering&quot;&gt;the documentation&lt;/a&gt; for more information or use Intellisense.&lt;/p&gt;
&lt;p&gt;You can use methods with familiar names from LINQ to apply sorting, projections and paging - &lt;strong&gt;&lt;span class=&quot;code-concept&quot;&gt;OrderBy&lt;/span&gt;&lt;/strong&gt;, &lt;strong&gt;&lt;span class=&quot;code-concept&quot;&gt;Select&lt;/span&gt;&lt;/strong&gt;,&amp;nbsp;&lt;strong&gt;&lt;span class=&quot;code-concept&quot;&gt;Skip&lt;/span&gt;&lt;/strong&gt;, &lt;strong&gt;&lt;span class=&quot;code-concept&quot;&gt;Take&lt;/span&gt;&lt;/strong&gt; etc.&lt;/p&gt;
&lt;p&gt;Once you&#39;re done building your search request execute it against the REST API and get the result using the &lt;strong&gt;&lt;span class=&quot;code-concept&quot;&gt;GetResult()&lt;/span&gt;&lt;/strong&gt; method. The returned object will be an object the implements IEnumerable&amp;lt;T&amp;gt; so you can start iterating over the results straight away.&lt;/p&gt;
&lt;p&gt;Note that if you&#39;re searching for CMS objects such as PageData and want to fetch the full objects you shouldn&#39;t use GetResult but instead use the &lt;strong&gt;&lt;span class=&quot;code-concept&quot;&gt;GetContentResult()&lt;/span&gt;&lt;/strong&gt; method. When using the integration for CMS 6, that&#39;s called GetPagesResult.&lt;/p&gt;
&lt;blockquote&gt;&quot;if you&#39;re searching for CMS objects such as PageData and want to fetch the full objects ... use the GetContentResult() method&quot;&lt;/blockquote&gt;
&lt;h3&gt;Unified Search&lt;/h3&gt;
&lt;p&gt;One of the things that makes Find powerful and easy to use at the same time is the fact that it let&#39;s us index our own .NET object and search for them in a strongly typed way. Sometimes though, such as building a search page, we want to search over many different types. Find makes that easy to using a concept called &lt;a href=&quot;http://find.episerver.com/Documentation/unified-search&quot;&gt;Unified Search&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In general - use the regular Search method for building listings, navigations and specialized search page with ease and use Unified Search when building free text search pages where users should search in *everything*.&lt;/p&gt;
&lt;h2&gt;Where to go from here&lt;/h2&gt;
&lt;p&gt;That&#39;s it. A few key concepts to get you started and a few important things to remember to avoid being faced by a YSOD.&lt;/p&gt;
&lt;p&gt;Once you&#39;ve familiarized yourself with Find&#39;s .NET API you can move on to &lt;a href=&quot;http://find.episerver.com/Documentation/dotnet-api-indexing&quot;&gt;indexing custom objects&lt;/a&gt; or why not check out some of the more specialized and interesting methods such as &lt;a href=&quot;http://find.episerver.com/Documentation/dotnet-api-more-like-related-documents&quot;&gt;MoreLike&lt;/a&gt; and &lt;a href=&quot;http://find.episerver.com/Documentation/dotnet-api-boosting-with-filters&quot;&gt;BoostMatching&lt;/a&gt;. Also, don&#39;t miss out of the many types of &lt;a href=&quot;http://find.episerver.com/Documentation/dotnet-api-facets&quot;&gt;facets&lt;/a&gt; which you can use to build many interesting things.&lt;/p&gt;
&lt;p&gt;Want to build a search page for an EPiServer site quickly? &lt;a href=&quot;/link/d90bae5d27f847289132b12e7b94750f.aspx?id=254&amp;amp;epslanguage=en&quot;&gt;Here&#39;s one&lt;/a&gt; complete with annotated source code for you.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Happy Finding!&lt;/strong&gt;&lt;/p&gt;
</description>
            <guid>http://joelabrahamsson.com/episerver-find-101/</guid>
            <pubDate>Tue, 16 Apr 2013 22:36:20 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>Unwanted Lucene Search Results in EpiServer Commerce R2</title>
            <link>http://kkhan-episerver.blogspot.com/2013/04/unwanted-lucene-search-results-in.html</link>
            <description>&lt;br /&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;Issue:&lt;/b&gt; User was getting unexpected search results for products, e.g. with a search key word ‘Sate’ he was getting same result as for ‘Site’. Although for most of the clients they will happy with these results but this particular client was unhappy with this result due to their business requirements. We do not have any word like ‘Sate’ in our Database or in Index file for Lucene. Clearly it was Fuzzy search that was causing this although in code we have set FuzzySearch = false;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Reason: &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background: white; color: green; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;// Perform Lucene search&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; line-height: 115%; mso-highlight: white;&quot;&gt;SearchResults&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt; line-height: 115%;&quot;&gt; results = searchFilterHelper.SearchEntries(criteria) &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 115%; mso-highlight: white;&quot;&gt;as&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt; line-height: 115%;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; line-height: 115%; mso-highlight: white;&quot;&gt;SearchResults&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt; line-height: 115%;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; line-height: 115%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;In the Mediachase.Commerce.Website, Version=5.2.243.2, SearchFilterHelper&#39;s SearchEntries() method, below:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;public virtual ISearchResults SearchEntries(CatalogEntrySearchCriteria criteria) {&amp;nbsp; try&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; _Results = &lt;b&gt;Manager.Search(criteria);&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;catch (SystemException)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; if (HttpContext.Current.IsDebuggingEnabled)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; throw;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;// Perform fuzzy search if nothing has been found&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;if (_Results.TotalCount == 0)&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; criteria.IsFuzzySearch = true;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; criteria.FuzzyMinSimilarity = 0.7f;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; _Results = Manager.Search(criteria);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;return _Results;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;As you can see there is an initial call to Manager.Search().&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Before returning, the TotalCount property on the ISearchResults object returned is checked to see if there were no results.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;If there are no results a fuzzy search is done.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;That was causing the issue although iSFuzzySearch was false at the time of request.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;Fix:&lt;/b&gt; A fix is present in Episerver Commerce R2 Sp2. There is an extra Function is available that can be used to stop FuzzySearch if no result is found with actual keyword.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt;&lt;/b&gt;&amp;nbsp;&lt;span style=&quot;color: brown;&quot;&gt;virtual&lt;/span&gt;&amp;nbsp;ISearchResults&amp;nbsp;&lt;b&gt;&lt;span style=&quot;color: midnightblue;&quot;&gt;SearchEntries&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: darkgreen;&quot;&gt;(&lt;/span&gt;CatalogEntrySearchCriteria criteria&lt;span style=&quot;color: darkgreen;&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;bool&lt;/span&gt;&lt;/b&gt;&amp;nbsp;isFuzzySearch&lt;span style=&quot;color: darkgreen;&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;float&lt;/span&gt;&lt;/b&gt;&amp;nbsp;minSimilarity&lt;span style=&quot;color: darkgreen;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background: white; color: green; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;// Perform Lucene search&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; line-height: 115%; mso-highlight: white;&quot;&gt;SearchResults&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt; line-height: 115%;&quot;&gt; results = searchFilterHelper.SearchEntries(criteria,&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 115%; mso-highlight: white;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt; line-height: 115%;&quot;&gt;,0) &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 115%; mso-highlight: white;&quot;&gt;as&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt; line-height: 115%;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; line-height: 115%; mso-highlight: white;&quot;&gt;SearchResults&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt; line-height: 115%;&quot;&gt;;&lt;/span&gt;&lt;b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;i&gt;Special thanks to Jeff from EpiServer’s Developer Support team to find out the reason and fix.&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;Example Code&lt;/b&gt;:&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;internal&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;CatalogIndexSearchDataSource&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; CreateDataSource(&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;SearchFilterHelper&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; filter, &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; pageNo, &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; pageSize, &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;ref&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; totalRows, &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;bool&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; cacheResults, &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; cacheTime, &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; nodeString, &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; keywords, &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;List&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;gt; metaClasses)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; currentCulture = &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;Thread&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;.CurrentThread.CurrentUICulture;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;Thread&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;.CurrentThread.CurrentUICulture = &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;CultureInfo&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;SiteContext&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;.Current.LanguageName);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; recordsToRetrieve = pageSize;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;//cache timeout&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;TimeSpan&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; cacheTimeout = &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;TimeSpan&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;(0, (&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;)cacheTime, 0);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;// Perform search&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;SearchSort&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; sortObject = &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;// Put default sort order if none is set&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; (sortObject == &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sortObject = &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;CatalogEntrySearchCriteria&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;.DefaultSortOrder;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; criteria = filter.CreateSearchCriteria(keywords, sortObject);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;//If meta classes are given to search.&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; (metaClasses != &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;foreach&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; metaClass &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;in&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; metaClasses)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; criteria.SearchIndex.Add(metaClass);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;//Add catalogs&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;foreach&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; row &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;in&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;CatalogContext&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;.Current.GetCatalogDto(&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;SiteContext&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;.Current.SiteId).Catalog)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; (row.IsActive &amp;amp;&amp;amp; row.StartDate &amp;lt;= &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;FrameworkContext&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;.Current.CurrentDateTime &amp;amp;&amp;amp; row.EndDate &amp;gt;= &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;FrameworkContext&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;.Current.CurrentDateTime)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;criteria.CatalogNames.Add(row.Name);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;//add catalog nodes&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; (!&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;.IsNullOrEmpty(nodeString))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;foreach&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; outline &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;in&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;SearchFilterHelper&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;.GetOutlinesForNode(nodeString))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; criteria.Outlines.Add(outline);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;CatalogIndexSearchDataSource&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; dataSource = &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;// No need to perform search if no catalogs specified&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; (criteria.CatalogNames.Count != 0)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;Entries&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; entries = &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;Entries&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;// Perform Lucene search&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;SearchResults&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; results = searchFilterHelper.SearchEntries(criteria,&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;,0) &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;as&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;SearchResults&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;// Get IDs we need&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;[] resultIndexes = results.GetIntResults(pageNumber , maxRows+5); &lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;// we add padding here to accomodate entries that might have been deleted since last indexing&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; (resultIndexes.Length &amp;gt; 0)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;[] productResultIndexes = &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;RefinementHelper&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;.GetParentProducts(pageSize, pageNumber, resultIndexes, &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;ref&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; totalRows);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;// Retrieve actual entry objects, with no caching&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; entries = &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;CatalogContext&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;.Current.GetCatalogEntries(productResultIndexes, &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;TimeSpan&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;(), responseGroup);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;// Add in attribute information&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AddAttributes(entries, results);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;// Insert to the cache collection&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; entries.TotalResults = totalRows;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;CatalogCache&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;.Insert(cacheKey, entries, cacheTimeout);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dataSource = &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;CatalogIndexSearchDataSource&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; { TotalResults = totalRows, CatalogEntries = entries };&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;Thread&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;.CurrentThread.CurrentUICulture = currentCulture;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; dataSource;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;</description>
            <guid>http://kkhan-episerver.blogspot.com/2013/04/unwanted-lucene-search-results-in.html</guid>
            <pubDate>Tue, 16 Apr 2013 10:33:00 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>Sending settings from the server to your editor</title>
            <link>http://world.episerver.com/Blogs/Linus-Ekstrom/Dates/2013/4/Sending-settings-from-the-server-to-your-editor/</link>
            <description>&lt;p&gt;I got a question how you can send settings that are defined on the server to an editor. It’s really quite simple so lets have a look on a simple example. We start by defining an editor descriptor and adding an entry in the EditorConfiguration dictionary:&lt;/p&gt;
&lt;div id=&quot;codeSnippetWrapper&quot;&gt;
&lt;div id=&quot;codeSnippet&quot; style=&quot;text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;&quot;&gt;
&lt;pre style=&quot;text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;&quot;&gt;[EditorDescriptorRegistration(TargetType = &lt;span style=&quot;color: #0000ff;&quot;&gt;typeof&lt;/span&gt;(&lt;span style=&quot;color: #0000ff;&quot;&gt;string&lt;/span&gt;), UIHint = &lt;span style=&quot;color: #006080;&quot;&gt;&quot;author&quot;&lt;/span&gt;)]&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 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; AuthorEditorDescriptor : EditorDescriptor&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;&quot;&gt;{&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #0000ff;&quot;&gt;public&lt;/span&gt; AuthorEditorDescriptor()&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;&quot;&gt;    {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;&quot;&gt;        ClientEditingClass = &lt;span style=&quot;color: #006080;&quot;&gt;&quot;alloy.editors.AuthorSelector&quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;&quot;&gt;        EditorConfiguration[&lt;span style=&quot;color: #006080;&quot;&gt;&quot;foo&quot;&lt;/span&gt;] = &lt;span style=&quot;color: #006080;&quot;&gt;&quot;bar&quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;&quot;&gt;    }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;&quot;&gt;}&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The settings in the EditorConfiguration dictionary is mixed on to the editor instance when started so you can access these settings as they were regular properties of your editor. This sample checks the value of foo in the postCreate-method:&lt;/p&gt;
&lt;div id=&quot;codeSnippetWrapper&quot;&gt;
&lt;div id=&quot;codeSnippet&quot; style=&quot;text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;&quot;&gt;
&lt;pre style=&quot;text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;&quot;&gt;postCreate: &lt;span style=&quot;color: #0000ff;&quot;&gt;function&lt;/span&gt; () {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;&quot;&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #0000ff;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #0000ff;&quot;&gt;this&lt;/span&gt;.foo === &lt;span style=&quot;color: #006080;&quot;&gt;&quot;bar&quot;&lt;/span&gt;) {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;&quot;&gt;        alert(&lt;span style=&quot;color: #006080;&quot;&gt;&quot;Happy happy joy&quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;&quot;&gt;    }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style=&quot;text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;&quot;&gt;},&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;And when the editor starts we get:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;/Globals/xmlrpc/25614/2013/04/16/image_2.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;image&quot; src=&quot;/Globals/xmlrpc/25614/2013/04/16/image_thumb.png&quot; border=&quot;0&quot; alt=&quot;image&quot; width=&quot;393&quot; height=&quot;208&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description>
            <guid>http://world.episerver.com/Blogs/Linus-Ekstrom/Dates/2013/4/Sending-settings-from-the-server-to-your-editor/</guid>
            <pubDate>Tue, 16 Apr 2013 09:20:10 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>How to Add Valid Elements (like iframes) to TinyMCE in EPiServer 7</title>
            <link>http://cjsharp1.github.io/blog/2013/04/15/how-to-add-valid-elements-like-iframes-to-tinymce-in-episerver-7</link>
            <description>&lt;p&gt;In a recent EPiServer 7 project, our client needed support for iframes and some other HTML tags in the &lt;a href=&quot;http://www.tinymce.com/&quot;&gt;TinyMCE WYSIWYG editor&lt;/a&gt;. Luckily, the way you add valid elements to TinyMCE hasn&#39;t changed much between EPiServer 6 and EPiServer 7, though some small issues have made the update a little more involved. In this post, I&#39;ll show you how to add valid elements to TinyMCE and how to fix the issues you&#39;ll potentially encounter along the way.&lt;/p&gt;

&lt;!-- more --&gt;


&lt;h2&gt;What Hasn&#39;t Changed&lt;/h2&gt;

&lt;p&gt;Like EPiServer 6, you need to add a simple class to your project to register the extended valid elements. The name and location of the class does not matter, as long as it is compiled into your project. The most important part of this that we are focusing on is the &lt;code&gt;TinyMCEPluginNonVisual&lt;/code&gt; attribute&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;[TinyMCEPluginNonVisual(AlwaysEnabled = true, EditorInitConfigurationOptions = &quot;{ extended_valid_elements: &#39;iframe[src|frameborder=0|alt|title|width|height|align|name]&#39; }&quot;)]
public class TinyMceExtendedValidElements
{
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;As you can see in above code, our example is pretty simple. We are just telling TinyMCE to allow the iframe tag and some attributes.&lt;/p&gt;

&lt;p&gt;Next, you need to update &lt;code&gt;episerver.config&lt;/code&gt;...&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;episerver&amp;gt;
    ... some configuration ... 
    &amp;lt;tinyMCE mergedConfigurationProperties=&quot;valid_elements, extended_valid_elements, invalid_elements, valid_child_elements&quot; /&amp;gt;
&amp;lt;/episerver&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Where Issues Arise&lt;/h2&gt;

&lt;p&gt;After you add the class to your project and update the configuration file, you may notice that the TinyMCE editor doesn&#39;t load. If you open up &lt;a href=&quot;http://fiddler2.com/&quot;&gt;Fiddler&lt;/a&gt; or your browser&#39;s developer tool utility, you can see a 404 error is thrown for a particular JavaScript file.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/EPiServerTinyMCE/EPiServerTinyMCE_Error1a.PNG&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/EPiServerTinyMCE/EPiServerTinyMCE_Error1b.PNG&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The browser is looking for a file in the path &lt;code&gt;/util/Editor/tinymce/plugins//editor_plugin.js&lt;/code&gt;. The &lt;code&gt;//&lt;/code&gt; hints that something is missing, and that something is the plug-in name. So from here, we can update our class to include the PlugInName...&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;[TinyMCEPluginNonVisual(PlugInName = &quot;TinyMceExtendedValidElements&quot;, AlwaysEnabled = true, EditorInitConfigurationOptions = &quot;{ extended_valid_elements: &#39;iframe[src|frameborder=0|alt|title|width|height|align|name]&#39; }&quot;)]
public class TinyMceExtendedValidElements
{
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And when we build the project and refresh the browser, we can see the exact path that TinyMCE needs:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/EPiServerTinyMCE/EPiServerTinyMCE_Error2.PNG&quot; /&gt;&lt;/p&gt;

&lt;p&gt;But now the issue is that we don&#39;t have a file at that location, and in fact, we don&#39;t need one. &lt;a href=&quot;http://tedgustaf.com&quot;&gt;Ted Nyberg&lt;/a&gt; used to &lt;a href=&quot;http://tedgustaf.com/blog/2011/4/upgrading-to-episerver-cms-6-r2/&quot;&gt;a good workaround&lt;/a&gt; to solve this... Simply use an empty file handler to serve up a blank file. Here is the code for our empty file handler:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;public class EmptyFileHandler : IHttpHandler
{
    public bool IsReusable
    {
        get { return true; }
    }

    public void ProcessRequest(HttpContext context)
    {
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Then to hook this up, just add this configuration to &lt;code&gt;web.config&lt;/code&gt; that only targets the path that TinyMCE is looking for:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;configuration&amp;gt;
    ... some configuration ... 
    &amp;lt;location path=&quot;util/editor/tinymce/plugins&quot;&amp;gt;
        &amp;lt;system.webServer&amp;gt;
            &amp;lt;handlers&amp;gt;
                &amp;lt;add name=&quot;TinyMceExtendedValidElements&quot; path=&quot;/util/editor/tinymce/plugins/TinyMceExtendedValidElements/editor_plugin.js&quot; verb=&quot;GET&quot; type=&quot;MyEPiServerProject.Business.Handlers.EmptyFileHandler, MyEPiServerProject&quot; /&amp;gt;
            &amp;lt;/handlers&amp;gt;
        &amp;lt;/system.webServer&amp;gt;
    &amp;lt;/location&amp;gt;
&amp;lt;/configuration&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And there we have it! Now TinyMCE will stop removing iframe tags from the saved content.&lt;/p&gt;

&lt;p&gt;From here, you can simply update the parameter in the &lt;code&gt;TinyMCEPluginNonVisual&lt;/code&gt; attribute on the class to allow any other tags and attributes that you need to support in your content.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Resources:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.frederikvig.com/2010/10/how-to-add-support-for-iframes-and-other-elements-to-tinymce-in-episerver-cms/&quot;&gt;How to add support for iframes (and other elements) to TinyMCE in EPiServer CMS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://tedgustaf.com/blog/2011/4/upgrading-to-episerver-cms-6-r2/&quot;&gt;Experiences from upgrading to EPiServer CMS 6 R2&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
            <guid>http://cjsharp1.github.io/blog/2013/04/15/how-to-add-valid-elements-like-iframes-to-tinymce-in-episerver-7</guid>
            <pubDate>Tue, 16 Apr 2013 05:23:00 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>Clone a purchase order and convert into cart</title>
            <link>http://kkhan-episerver.blogspot.com/2013/04/clone-purchase-order-and-convert-into_15.html</link>
            <description>&lt;br /&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;We have a requirement for our client that he can&amp;nbsp;masquerade&amp;nbsp;user and can create a new cart based on some existing Purchase Order(e.g. for damaged/lost orders). &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Option 1: Get The OrderForm and other objects from PurchaseOrder and assign it to new Cart.&lt;br /&gt;It did not work as result was a nasty output. On saving Purchase Order for new cart, OrderForm from Parent was assigned to new cart and parent Purchase order lost its associated OrderForms.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Option 2:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Clone the Purchase Order and create a cart based on that but it will not work because. (I tested this with EpiServer Commerce R2SP2)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; line-height: 115%;&quot;&gt;Type &#39;Mediachase.Commerce.Orders.&lt;span style=&quot;color: red;&quot;&gt;PurchaseOrder&lt;/span&gt;&#39; in Assembly &#39;Mediachase.Commerce, Version=5.2.628.0, Culture=neutral, PublicKeyToken=6e58b501b34abce3&#39; is &lt;span style=&quot;color: red;&quot;&gt;not marked as serializable&lt;/span&gt;.&lt;/span&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Solution:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;We can clone OrderForms and OrderAddresses. Therefore I created a clone copy of OrderForm and order addresses and added that into the Cart. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;Below piece of code helped me to&amp;nbsp;achieve&lt;/span&gt;&amp;nbsp;this. Note I have not tested/run workflows.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;Cart&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; mycart = &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;OrderContext&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;.Current.GetCart(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&quot;replacementcart&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;SecurityContext&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;.Current.CurrentUserId);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CopyCart(mycart, Order);&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt; line-height: 115%;&quot;&gt;//Delete and added a new Payment(Zero Charged)&lt;br /&gt;//Convert into Purchase Order&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; line-height: 115%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt; line-height: 115%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background: white; color: grey; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;///&lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: grey; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: grey; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;///&lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; Copy cart&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: grey; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;///&lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: grey; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: grey; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;///&lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: grey; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&amp;lt;param name=&quot;_cart&quot;&amp;gt;&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: grey; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;///&lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: grey; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&amp;lt;param name=&quot;orderGroup&quot;&amp;gt;&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; CopyCart(&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;Cart&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; _cart, &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;PurchaseOrder&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; orderGroup)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;// Initial validation&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; (_cart == &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;throw&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;ArgumentNullException&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&quot;_cart&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; (orderGroup == &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;throw&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;ArgumentNullException&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&quot;orderGroup&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;// need to set meta data context before cloning&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;MetaDataContext&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;.DefaultCurrent = &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;OrderContext&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;.MetaDataContext;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;OrderForm&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; of = orderGroup.OrderForms[0].Clone() &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;as&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;OrderForm&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;// Remove existing Order Forms&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; i = _cart.OrderForms.Count-1 ; i&amp;gt;=0;i--)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _cart.OrderForms[i].Delete();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;//Add order Forms to basket from PurchasOrder.&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _cart.OrderForms.Add(of);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;// Remove existing Order Addresses&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; i = _cart.OrderAddresses.Count-1 ; i&amp;gt;=0;i--)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _cart.OrderAddresses[i].Delete();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;foreach&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;OrderAddress&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; address &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;in&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; orderGroup.OrderAddresses)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;MetaDataContext&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;.DefaultCurrent = &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;OrderContext&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;.MetaDataContext;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;OrderAddress&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; oa = address.Clone() &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;as&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;OrderAddress&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _cart.OrderAddresses.Add(oa);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _cart.SetParent(_cart);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _cart.AddressId = orderGroup.AddressId;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _cart.AffiliateId = orderGroup.AffiliateId;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _cart.ApplicationId = orderGroup.ApplicationId;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _cart.BillingCurrency = orderGroup.BillingCurrency;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _cart.CustomerId = orderGroup.CustomerId;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _cart.CustomerName = orderGroup.CustomerName;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;_cart.ProviderId = orderGroup.ProviderId;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _cart.Status = orderGroup.Status;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _cart.Owner = orderGroup.Owner;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _cart.OwnerOrg = orderGroup.OwnerOrg;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _cart.ShippingTotal = orderGroup.ShippingTotal;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;_cart.SiteId = orderGroup.SiteId;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _cart.SubTotal = orderGroup.SubTotal;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _cart.TaxTotal = orderGroup.TaxTotal;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _cart.Total = orderGroup.Total;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _cart.AcceptChanges();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt; line-height: 115%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;</description>
            <guid>http://kkhan-episerver.blogspot.com/2013/04/clone-purchase-order-and-convert-into_15.html</guid>
            <pubDate>Mon, 15 Apr 2013 11:38:00 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>Pattern for EPiServer block preview MVC controller</title>
            <link>http://joelabrahamsson.com/pattern-for-episerver-block-preview-mvc-controller/</link>
            <description>&lt;pre class=&quot;prettyprint&quot;&gt;using System.Web.Mvc;
using EPiServer.Core;
using EPiServer.Framework.DataAnnotations;
using EPiServer.Framework.Web;
using EPiServer.Web;

namespace MySite
{
    [TemplateDescriptor(
        Inherited = true,
        TemplateTypeCategory = TemplateTypeCategories.MvcController,
        Tags = new [] { RenderingTags.Preview },
        AvailableWithoutTag = false)]
    public class PreviewController : Controller, IRenderTemplate&amp;lt;BlockData&amp;gt;
    {
        public ActionResult Index(IContent currentContent)
        {
            //TODO: Create model suitable for the view and return ViewResult
            return View();
        }
    }
}&lt;/pre&gt;
&lt;p&gt;Explained:&lt;/p&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;using System.Web.Mvc;
using EPiServer.Core;
using EPiServer.Framework.DataAnnotations;
using EPiServer.Framework.Web;
using EPiServer.Web;

namespace MySite
{
    [TemplateDescriptor(
        //Support everything inheriting from BlockData.
        Inherited = true,
        //By default controllers implementing IRenderTemplate&amp;lt;T&amp;gt; where T is BlockData
        //are registered as partial renderers. As this will be a &quot;full page&quot; renderer
        //we need to change that.
        TemplateTypeCategory = TemplateTypeCategories.MvcController,
        //Should only be used for preview
        Tags = new [] { RenderingTags.Preview },
        AvailableWithoutTag = false)]
    public class PreviewController : Controller,
        //Register as template for BlockData. To only support a specific type
        //change the type parameter from BlockData to that type and optionally
        //set Inherited = false in the the TemplateDescriptor attribute above.
        IRenderTemplate&amp;lt;BlockData&amp;gt;
    {
        public ActionResult Index(
            //While we implement IRenderTemplate for BlockData model binding
            //can only deal with IContent, ie shared blocks in this case.
            IContent currentContent
            )
        {
            //TODO: Create model suitable for the view and return ViewResult
            return View();
        }
    }
}&lt;/pre&gt;
</description>
            <guid>http://joelabrahamsson.com/pattern-for-episerver-block-preview-mvc-controller/</guid>
            <pubDate>Mon, 15 Apr 2013 10:26:49 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>Hiding EPiServer properties from editors</title>
            <link>http://joelabrahamsson.com/hiding-episerver-properties-from-editors/</link>
            <description>&lt;p&gt;When managing a property in EPiServer&#39;s admin mode there is a setting named &quot;&lt;strong&gt;Display in Edit Mode&lt;/strong&gt;&quot;. To control this setting from code in EPiServer 7 use the&amp;nbsp;&lt;strong&gt;&lt;span class=&quot;code-concept&quot;&gt;ScaffoldColumn&lt;/span&gt;&lt;/strong&gt; attribute.&lt;/p&gt;
&lt;p&gt;When set to false it will hide the property from editors, meaning that while they may seem the rendered value in preview mode they won&#39;t see a blue box around it and they won&#39;t be able to click on the property to edit it. The property won&#39;t be visible in forms editing mode either.&lt;/p&gt;
&lt;p&gt;There is also the &lt;strong&gt;&lt;span class=&quot;code-concept&quot;&gt;Editable&lt;/span&gt;&lt;/strong&gt; attribute. When this is set to false the property will still be visible to editors in both preview mode, with a blue box around it, and in forms editing mode. The editor for it will however be disabled, meaning that while editors can inspect the property&#39;s value they can&#39;t modify it.&lt;/p&gt;
</description>
            <guid>http://joelabrahamsson.com/hiding-episerver-properties-from-editors/</guid>
            <pubDate>Sun, 14 Apr 2013 16:10:08 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>Working with Localization and Language Branches in EPiServer 7 MVC</title>
            <link>http://cjsharp1.github.io/blog/2013/04/11/working-with-localization-and-language-branches-in-episerver-7-mvc</link>
            <description>&lt;p&gt;One powerful feature that EPiServer 7 provides is the localization of page content and the creation of language branches for your site, which allows you to create a multi-language, international site without the need for a huge amount of work. In this post, we&#39;ll look at how to configure, utilize, and develop for localization in EPiServer 7.&lt;/p&gt;

&lt;!-- more --&gt;


&lt;h2&gt;Languages Branches in Edit Mode&lt;/h2&gt;

&lt;p&gt;When comparing to previous versions of EPiServer, the latest release of EPiServer 7 has dramatically changed the way you work with language branches in Edit Mode. While some may think this new approach is taking a step backwards, it definitely takes a bit more steps to add a language branch to a page. But at the same time, it provides better organization when working with multi-site EPiServer applications.&lt;/p&gt;

&lt;h3&gt;Adding Languages&lt;/h3&gt;

&lt;p&gt;Let&#39;s first start with adding languages. This part has not changed between EPiServer 6 CMS and EPiServer 7. In Admin Mode, under the Config tab, you&#39;ll find the &quot;Manage Website Languages&quot; page. On this page, you can add a new language, enable/disable languages, and set access rights for a language branch. One thing to note that the access rights in the area only control which languages editors/administrators can work with in Edit Mode. It does not affect access rights on the visitor&#39;s side.&lt;/p&gt;

&lt;p&gt;Also, the list of languages that you can add is generated from the .NET Framework&#39;s &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo%28v=vs.80%29.aspx&quot;&gt;CultureInfo class in the System.Globalization namespace&lt;/a&gt;, and only contains the language codes that adhere to the RFC 1766 standard. If you want to add a custom language code, you&#39;ll need to add a custom culture, and this culture will need to be added on any server the site lives on.&lt;/p&gt;

&lt;h3&gt;Making Languages Available&lt;/h3&gt;

&lt;p&gt;After all the languages you want to support are added and enabled, you need to make them available in Edit Mode. Click on the Root Page of your EPiServer site, go into Forms Editing mode, click the &quot;Tools&quot; dropdown, and select &quot;Language Settings&quot;. Click the &quot;Change&quot; button in the &quot;Available Languages&quot; section, check all of the languages you want to make available for editing, then click &quot;Save&quot;. If you already have a Start Page set up and configured, you may need to do the same steps on the Start Page.&lt;/p&gt;

&lt;h3&gt;Changing the Master Language&lt;/h3&gt;

&lt;p&gt;If you want to change the master language for the site, you don&#39;t necessarily need to worry about this in EPiServer 7, primarily because you no longer need the Root Page to be in the same language branch as your master language. After you add, enable, and make available the language branches you want to use, just assign the &quot;master&quot; language to the host name, and switch to that language branch. If you have previously created pages in the old &quot;master&quot; language, you can just remove them then disable that language branch.&lt;/p&gt;

&lt;h3&gt;Adding a Page to a Language Branch&lt;/h3&gt;

&lt;p&gt;The biggest change between EPiServer 6 CMS and EPiServer 7 is the steps needed to switch from one language branch to another in order to add a new page:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open the navigation pane&lt;/li&gt;
&lt;li&gt;Click the &quot;Sites&quot; tab&lt;/li&gt;
&lt;li&gt;Click the &quot;Settings&quot; button (the little cog) in the bottom right of the navigation pane and choose &quot;Show All Languages&quot; (you might be able to skip this step if you are using EPiServer 7.1)&lt;/li&gt;
&lt;li&gt;Expand the current site and select the language you want (Edit Mode will reload)&lt;/li&gt;
&lt;li&gt;Open the navigation pane again&lt;/li&gt;
&lt;li&gt;Click the &quot;Settings&quot; button (the little cog) in the bottom right and select &quot;Show All Languages&quot;&lt;/li&gt;
&lt;li&gt;Click the page in the other language and click the button &quot;Translate&quot;&lt;/li&gt;
&lt;li&gt;Edit the page&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;I find it useful to pin the navigation pane open when working on sites with multiple languages.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; If you are using EPiServer 7.1, the &quot;Show All Languages&quot; text has been switched to say &quot;Show Content Not in &lt;em&gt;{insert your current language}&lt;/em&gt;&quot;. Also, the flow of language handling has been improved (see below).&lt;/p&gt;

&lt;h3&gt;Translating Blocks and Their Folders (added in EPiServer 7.1)&lt;/h3&gt;

&lt;p&gt;Much like translating pages, with the release of EPiServer 7.1, you can now translate blocks and the folders they live in. &lt;a href=&quot;/link/976fea2756744165b944e4b4ede9e4a7.aspx?id=66142&amp;amp;epslanguage=en&quot;&gt;From the release notes:&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Now you can translate blocks and their folders in the same way as for pages with the option Show All Languages for the shared blocks gadget. This option will show blocks and folders for all languages. Not translated blocks have a language code representing the fallback language, when this is turned off only blocks and folders that are available for the current language will be shown.&lt;/p&gt;&lt;/blockquote&gt;

&lt;h3&gt;Edit Mode &quot;View As&quot; Settings (added in EPiServer 7.1)&lt;/h3&gt;

&lt;p&gt;Also added in EPiServer 7.1 is the improved flow of language handling, which added a new option to the view settings. When you click the &quot;Toggle view settings&quot; button (the little eye) in Edit Mode, you&#39;ll see a new option with your current language branch.&lt;/p&gt;

&lt;p&gt;Clicking that will open the &quot;View in this language&quot; dropdown with all enabled languages for the site. When you select one of those languages, it will display the currently viewed page in the selected language, though it will not switch completely to that language branch. If the page does not exist in the selected language, it will give you direct link to translate it, which will switch Edit Mode to that language branch.&lt;/p&gt;

&lt;h2&gt;Language Provider Configuration&lt;/h2&gt;

&lt;p&gt;In EPiServerFramework.config, you can configure the location of your language files, the fallback behavior, and the fallback culture:&lt;/p&gt;

&lt;p&gt;&lt;div class=&quot;bogus-wrapper&quot;&gt;&lt;notextile&gt;&lt;figure class=&quot;code&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;table&gt;&lt;tr&gt;&lt;td class=&quot;gutter&quot;&gt;&lt;pre class=&quot;line-numbers&quot;&gt;&lt;span class=&quot;line-number&quot;&gt;1&lt;/span&gt;
&lt;span class=&quot;line-number&quot;&gt;2&lt;/span&gt;
&lt;span class=&quot;line-number&quot;&gt;3&lt;/span&gt;
&lt;span class=&quot;line-number&quot;&gt;4&lt;/span&gt;
&lt;span class=&quot;line-number&quot;&gt;5&lt;/span&gt;
&lt;span class=&quot;line-number&quot;&gt;6&lt;/span&gt;
&lt;span class=&quot;line-number&quot;&gt;7&lt;/span&gt;
&lt;span class=&quot;line-number&quot;&gt;8&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;code class=&quot;&quot;&gt;&lt;span class=&quot;line&quot;&gt;&amp;lt;localization fallbackBehavior=&quot;Echo, MissingMessage, FallbackCulture&quot; fallbackCulture=&quot;en-US&quot;&gt;&amp;lt;/p&gt;
&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;&amp;lt;pre&gt;&amp;lt;code&gt;&amp;lt;providers&amp;gt;
&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;    &amp;lt;add virtualPath=&quot;~/Resources/LanguageFiles&quot; name=&quot;languageFiles&quot; type=&quot;EPiServer.Framework.Localization.XmlResources.FileXmlLocalizationProvider, EPiServer.Framework&quot; /&amp;gt;
&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;&amp;lt;/providers&amp;gt;
&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;&amp;lt;/code&gt;&amp;lt;/pre&gt;
&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;&amp;lt;p&gt;&amp;lt;/localization&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/notextile&gt;&lt;/div&gt;&lt;/p&gt;

&lt;p&gt;Notice in the configuration the values in the &lt;code&gt;fallbackBehavior&lt;/code&gt; attribute. There are four possible values available:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Echo&lt;/strong&gt; - If no match for the key is found, and if the key does not start with a &#39;#&#39; or a &#39;/&#39;, it will return back the key unmodified.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;MissingMessage&lt;/strong&gt; - If no match for the key is found, it will return a message stating that the resource could not be found.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;FallbackCulture&lt;/strong&gt; - If no match for the key is found, it will attempt to return the resource from the culture specified in the &lt;code&gt;fallbackCulture&lt;/code&gt; attribute.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;None&lt;/strong&gt; - If no match for the key is found, nothing will be returned.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;If you would like to use a custom localization provider, check out &lt;a href=&quot;https://world.episerver.com/Documentation/HTML-Documentation/?path=/SdkDocuments/episerverframework/7/Knowledge%20Base/Developer%20Guide/Localization/CustomLocalizationProvider.htm&amp;amp;vppRoot=/SdkDocuments//episerverframework/7/Knowledge%20Base/Getting%20Started/&quot;&gt;this page in the EPiServer documentation&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;Linking to Another Language Branch&lt;/h2&gt;

&lt;p&gt;Getting your visitors to a different language branch has became much easier with EPiServer 7 MVC. You just need to provide the language code to the route data.&lt;/p&gt;

&lt;p&gt;For example, in your front-end views (using Razor):&lt;/p&gt;

&lt;p&gt;&lt;div class=&quot;bogus-wrapper&quot;&gt;&lt;notextile&gt;&lt;figure class=&quot;code&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;table&gt;&lt;tr&gt;&lt;td class=&quot;gutter&quot;&gt;&lt;pre class=&quot;line-numbers&quot;&gt;&lt;span class=&quot;line-number&quot;&gt;1&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;code class=&quot;&quot;&gt;&lt;span class=&quot;line&quot;&gt;@Html.PageLink(&quot;Link Text&quot;, pageData.PageLink, new { language = &quot;sv-SE&quot; }, null)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/notextile&gt;&lt;/div&gt;&lt;/p&gt;

&lt;p&gt;Or your back-end code:&lt;/p&gt;

&lt;p&gt;&lt;div class=&quot;bogus-wrapper&quot;&gt;&lt;notextile&gt;&lt;figure class=&quot;code&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;table&gt;&lt;tr&gt;&lt;td class=&quot;gutter&quot;&gt;&lt;pre class=&quot;line-numbers&quot;&gt;&lt;span class=&quot;line-number&quot;&gt;1&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;code class=&quot;&quot;&gt;&lt;span class=&quot;line&quot;&gt;return RedirectToAction(&quot;Index&quot;, new { language = &quot;sv-SE&quot; });&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/notextile&gt;&lt;/div&gt;&lt;/p&gt;

&lt;h2&gt;Back-End Localization&lt;/h2&gt;

&lt;p&gt;To access localization data from the back-end code, use an instance of the &lt;code&gt;LocalizationService&lt;/code&gt;, which is part of the &lt;code&gt;EPiServer.Framework.Localization&lt;/code&gt; namespace.&lt;/p&gt;

&lt;p&gt;&lt;div class=&quot;bogus-wrapper&quot;&gt;&lt;notextile&gt;&lt;figure class=&quot;code&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;table&gt;&lt;tr&gt;&lt;td class=&quot;gutter&quot;&gt;&lt;pre class=&quot;line-numbers&quot;&gt;&lt;span class=&quot;line-number&quot;&gt;1&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;code class=&quot;&quot;&gt;&lt;span class=&quot;line&quot;&gt;var translatedValue = LocalizationService.Current.GetString(&quot;/sometemplate/somevalue&quot;);&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/notextile&gt;&lt;/div&gt;&lt;/p&gt;

&lt;p&gt;Other methods in this class allow you to return all localization keys available, or to return localization data for a specified culture. I recommend checking out the &lt;a href=&quot;http://sdkbeta.episerver.com/Class-Library/EPiServerFramework/RenderPage/?documentId=episerverframework/7/d2290188-6b17-9f90-1d66-6d9d7bc0950e&quot;&gt;LocalizationService class in the EPiServer 7 SDK&lt;/a&gt; when it comes to finding the right method for your needs.&lt;/p&gt;

&lt;p&gt;From the back-end, you can also override the &lt;code&gt;fallbackBehavior&lt;/code&gt; language provider configuration attribute directly in the method from the &lt;code&gt;LocalizationService&lt;/code&gt; instance. For example, if you do not want to show any fallback text, you can pass in &lt;code&gt;FallbackBehaviors.None&lt;/code&gt; as a parameter:&lt;/p&gt;

&lt;p&gt;&lt;div class=&quot;bogus-wrapper&quot;&gt;&lt;notextile&gt;&lt;figure class=&quot;code&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;table&gt;&lt;tr&gt;&lt;td class=&quot;gutter&quot;&gt;&lt;pre class=&quot;line-numbers&quot;&gt;&lt;span class=&quot;line-number&quot;&gt;1&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;code class=&quot;&quot;&gt;&lt;span class=&quot;line&quot;&gt;var translatedValue = LocalizationService.Current.GetString(&quot;/sometemplate/somevalue&quot;, FallbackBehaviors.None);&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/notextile&gt;&lt;/div&gt;&lt;/p&gt;

&lt;p&gt;Alternatively, if you want to directly specify the fallback text, you can just pass in a string:&lt;/p&gt;

&lt;p&gt;&lt;div class=&quot;bogus-wrapper&quot;&gt;&lt;notextile&gt;&lt;figure class=&quot;code&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;table&gt;&lt;tr&gt;&lt;td class=&quot;gutter&quot;&gt;&lt;pre class=&quot;line-numbers&quot;&gt;&lt;span class=&quot;line-number&quot;&gt;1&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;code class=&quot;&quot;&gt;&lt;span class=&quot;line&quot;&gt;var translatedValue = LocalizationService.Current.GetString(&quot;/sometemplate/somevalue&quot;, &quot;Fallback String&quot;);&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/notextile&gt;&lt;/div&gt;&lt;/p&gt;

&lt;h2&gt;Front-End Localization&lt;/h2&gt;

&lt;p&gt;To access localization data from the front-end view (in our case, using Razor), use the &lt;code&gt;Translate&lt;/code&gt; helper, which is a provided EPiServer MVC HTML helper:&lt;/p&gt;

&lt;p&gt;&lt;div class=&quot;bogus-wrapper&quot;&gt;&lt;notextile&gt;&lt;figure class=&quot;code&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;table&gt;&lt;tr&gt;&lt;td class=&quot;gutter&quot;&gt;&lt;pre class=&quot;line-numbers&quot;&gt;&lt;span class=&quot;line-number&quot;&gt;1&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;code class=&quot;&quot;&gt;&lt;span class=&quot;line&quot;&gt;@Html.Translate(&quot;/sometemplate/somevalue&quot;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/notextile&gt;&lt;/div&gt;&lt;/p&gt;

&lt;p&gt;You could also use the &lt;code&gt;TranslateFallback&lt;/code&gt; helper, which will return a supplied fallback string if no match is found:&lt;/p&gt;

&lt;p&gt;&lt;div class=&quot;bogus-wrapper&quot;&gt;&lt;notextile&gt;&lt;figure class=&quot;code&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;table&gt;&lt;tr&gt;&lt;td class=&quot;gutter&quot;&gt;&lt;pre class=&quot;line-numbers&quot;&gt;&lt;span class=&quot;line-number&quot;&gt;1&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;code class=&quot;&quot;&gt;&lt;span class=&quot;line&quot;&gt;@Html.TranslateFallback(&quot;sometemplate/somemissingvalue&quot;, &quot;Missing a translation&quot;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/notextile&gt;&lt;/div&gt;&lt;/p&gt;

&lt;p&gt;EPiServer has also created some HTML helpers that can generate HTML for forms, such as the &lt;code&gt;TranslatedButton&lt;/code&gt;, &lt;code&gt;TranslatedLabel&lt;/code&gt;, and &lt;code&gt;TranslatedTextBox&lt;/code&gt; helpers.&lt;/p&gt;

&lt;h2&gt;Language Files&lt;/h2&gt;

&lt;p&gt;More than likely, you&#39;ll create custom language files for your application, either to store translated text used in Edit Mode for editors in different cultures, or in the view for visitors in different parts of the world.&lt;/p&gt;

&lt;h3&gt;The Old &#39;lang&#39; Folder&lt;/h3&gt;

&lt;p&gt;With the release of EPiServer 7, the system localization normally stored in the &#39;lang&#39; folder have disappeared. &lt;a href=&quot;http://sdkbeta.episerver.com/SDK-html-Container/?path=/SdkDocuments/EPiServerFramework/7/Knowledge%20Base/Developer%20Guide/Localization/Replacing%20LanguageManager%20with%20LocalizationService.htm&amp;amp;vppRoot=/SdkDocuments//EPiServerFramework/7/Knowledge%20Base/Developer%20Guide/&quot;&gt;The documentation explains what happened to them:&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Though strictly not needed, the lang folder under the web directory will continue to work as before and any language XML files placed here will be read by a default localization provider that is added automatically. If you do not wish for this to happen, you can just remove the folder or set the value of the addDefaultProvider attribute of the resources element to false.&lt;/p&gt;

&lt;p&gt;If you want to override the system localizations that are shipped with EPiServer products, you will notice that the language files are no longer installed in the lang folder. They are now instead embedded in the assemblies but just as before you can override individual string by placing your own language XML in the lang folder. Of course you can include your localizations through any other LocalizationProvider and they will take precedence over the system localizations as long as the provider is registered before the system ones.&lt;/p&gt;&lt;/blockquote&gt;

&lt;h3&gt;Our Custom Language Files&lt;/h3&gt;

&lt;p&gt;In the above configuration file, we specified our location of the language file. At this location, you just need to add (one or many) XML files to hold the values. Any XML files you add here needs to have the XML declaration, followed by the parent &lt;code&gt;&amp;lt;languages&amp;gt;&lt;/code&gt; node which contains (one or many) &lt;code&gt;&amp;lt;language&amp;gt;&lt;/code&gt; nodes for each language code (that matches the language branch):&lt;/p&gt;

&lt;p&gt;&lt;div class=&quot;bogus-wrapper&quot;&gt;&lt;notextile&gt;&lt;figure class=&quot;code&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;table&gt;&lt;tr&gt;&lt;td class=&quot;gutter&quot;&gt;&lt;pre class=&quot;line-numbers&quot;&gt;&lt;span class=&quot;line-number&quot;&gt;1&lt;/span&gt;
&lt;span class=&quot;line-number&quot;&gt;2&lt;/span&gt;
&lt;span class=&quot;line-number&quot;&gt;3&lt;/span&gt;
&lt;span class=&quot;line-number&quot;&gt;4&lt;/span&gt;
&lt;span class=&quot;line-number&quot;&gt;5&lt;/span&gt;
&lt;span class=&quot;line-number&quot;&gt;6&lt;/span&gt;
&lt;span class=&quot;line-number&quot;&gt;7&lt;/span&gt;
&lt;span class=&quot;line-number&quot;&gt;8&lt;/span&gt;
&lt;span class=&quot;line-number&quot;&gt;9&lt;/span&gt;
&lt;span class=&quot;line-number&quot;&gt;10&lt;/span&gt;
&lt;span class=&quot;line-number&quot;&gt;11&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;code class=&quot;&quot;&gt;&lt;span class=&quot;line&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;
&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;&amp;lt;languages&gt;
&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;  &amp;lt;language name=&quot;English (United States)&quot; id=&quot;en-US&quot;&gt;&amp;lt;/p&gt;
&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;&amp;lt;pre&gt;&amp;lt;code&gt;&amp;lt;sometemplate&amp;gt;
&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;    &amp;lt;somevalue&amp;gt;Translated Value&amp;lt;/somevalue&amp;gt;
&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;&amp;lt;/sometemplate&amp;gt;
&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;&amp;lt;/code&gt;&amp;lt;/pre&gt;
&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;&amp;lt;p&gt;  &amp;lt;/language&gt;
&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;&amp;lt;/languages&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/notextile&gt;&lt;/div&gt;&lt;/p&gt;

&lt;p&gt;Aside from the &lt;code&gt;&amp;lt;languages&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;language&amp;gt;&lt;/code&gt; nodes, there are no naming standard you need to follow when naming the custom keys or the XML files. So as you can imagine, you could either put all translated values for all languages in one XML file, or you could split it up into many XML files so it&#39;s better organized.&lt;/p&gt;

&lt;p&gt;The one exception to this is when you are trying to localize the text in Edit Mode. Unfortunately, it is not thoroughly documented what the names of the keys should be, though there has been a couple blog posts that has helped shed some light on these values. For more information on this, I&#39;ve found these resources:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://world.episerver.com/Blogs/Per-Nergard/Dates/2013/3/EPiServer-localization-xml-files-structure/&quot;&gt;EPiServer localization xml files structure&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://tedgustaf.com/blog/2012/11/localization-of-block-type-names-in-episerver-7/&quot;&gt;Localization of block type names in EPiServer 7&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;If you still cannot find the necessary names for the keys, the best solution is just look at the source code using a decompiler/reflector tool. I had to do this when I was trying to figure out how to localize error messages generated from an XForm property.&lt;/p&gt;
</description>
            <guid>http://cjsharp1.github.io/blog/2013/04/11/working-with-localization-and-language-branches-in-episerver-7-mvc</guid>
            <pubDate>Fri, 12 Apr 2013 04:40:00 GMT</pubDate>
            <category>Blog post</category>
        </item>
        <item>
            <title>A Closer Look at the AvailablePageTypes Attribute in EPiServer 7</title>
            <link>http://cjsharp1.github.io/blog/2013/04/11/a-closer-look-at-the-availablepagetypes-attribute-in-episerver-7</link>
            <description>&lt;p&gt;I was recently looking into how to fully use the &lt;code&gt;[AvailablePageTypes]&lt;/code&gt; attribute in my page models, and after a bit of research and reading the &lt;a href=&quot;http://sdkbeta.episerver.com/SDK-html-Container/?path=/SdkDocuments/CMS/7/Knowledge%20Base/Developer%20Guide/Content/Pages%20and%20Blocks/Attributes.htm&amp;amp;vppRoot=/SdkDocuments//CMS/7/Knowledge%20Base/Developer%20Guide/&quot;&gt;sometimes confusing documentation&lt;/a&gt;, and the &lt;a href=&quot;http://world.episerver.com/Documentation/Class-library/?documentId=cms/7/a9aede9a-696b-26b9-aeb9-338e7516f308&quot;&gt;less confusing class documentation&lt;/a&gt;, I found it has some interesting and helpful features. Let&#39;s take a closer look at this attribute.&lt;/p&gt;

&lt;!-- more --&gt;


&lt;h2&gt;Using the Attribute&lt;/h2&gt;

&lt;p&gt;As you could guess, this attribute is used to specify which page types can or cannot be created under an instance of a specific page type. This is an optional attribute, but it can drastically help organize the &#39;Create New Page&#39; screen, while also preventing editors from creating pages in the wrong area. This attribute is not supported on block models.&lt;/p&gt;

&lt;h3&gt;Availability&lt;/h3&gt;

&lt;p&gt;The first parameter in the attribute is &lt;strong&gt;Availability&lt;/strong&gt;. This parameter takes one value from the &lt;code&gt;Availability&lt;/code&gt; enum found in the &lt;code&gt;EPiServer.DataAbstraction.PageTypeAvailability&lt;/code&gt; namespace. There are four possible options:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;All&lt;/strong&gt; - This specifies that all page types will be available to be created under a page instance. This is the default value.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;None&lt;/strong&gt; - This specifies that no page types will be available to be created under a page instance. If this value is set, all other settings on the attribute are ignored.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Specific&lt;/strong&gt; - This specifies that only the selected page types will be created under a page instance. This value makes more sense when configuring available page types in Admin Mode. (My guess is that when any of the other settings on the attribute is set, this value gets auto-selected.)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Undefined&lt;/strong&gt; - You shouldn&#39;t use this, as it&#39;s not even an option in Admin Mode.&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;Include and Exclude&lt;/h3&gt;

&lt;p&gt;The two most common parameters for this attribute are &lt;strong&gt;Include&lt;/strong&gt; and &lt;strong&gt;Exclude&lt;/strong&gt;, both of which require an array of Types. One common example would be on a Start Page model:&lt;/p&gt;

&lt;p&gt;&lt;div class=&quot;bogus-wrapper&quot;&gt;&lt;notextile&gt;&lt;figure class=&quot;code&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;table&gt;&lt;tr&gt;&lt;td class=&quot;gutter&quot;&gt;&lt;pre class=&quot;line-numbers&quot;&gt;&lt;span class=&quot;line-number&quot;&gt;1&lt;/span&gt;
&lt;span class=&quot;line-number&quot;&gt;2&lt;/span&gt;
&lt;span class=&quot;line-number&quot;&gt;3&lt;/span&gt;
&lt;span class=&quot;line-number&quot;&gt;4&lt;/span&gt;
&lt;span class=&quot;line-number&quot;&gt;5&lt;/span&gt;
&lt;span class=&quot;line-number&quot;&gt;6&lt;/span&gt;
&lt;span class=&quot;line-number&quot;&gt;7&lt;/span&gt;
&lt;span class=&quot;line-number&quot;&gt;8&lt;/span&gt;
&lt;span class=&quot;line-number&quot;&gt;9&lt;/span&gt;
&lt;span class=&quot;line-number&quot;&gt;10&lt;/span&gt;
&lt;span class=&quot;line-number&quot;&gt;11&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;code class=&quot;&quot;&gt;&lt;span class=&quot;line&quot;&gt;[ContentType(GUID = &quot;49754310-E0ED-4C95-AA69-C155323E0AA9&quot;)]
&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;[AvailablePageTypes(&amp;lt;/p&gt;
&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;&amp;lt;pre&gt;&amp;lt;code&gt;Include = new Type[]{ typeof(StandardPage), typeof(ListPage) },
&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;Exclude = new Type[]{ typeof(StartPage), typeof(SettingsPage) }
&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;&amp;lt;/code&gt;&amp;lt;/pre&gt;
&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;&amp;lt;p&gt;)]
&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;public class StartPage : PageData
&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;{
&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/notextile&gt;&lt;/div&gt;&lt;/p&gt;

&lt;p&gt;In this page model, we are saying that we will allow any pages of type &lt;code&gt;StandardPage&lt;/code&gt; and &lt;code&gt;ListPage&lt;/code&gt; to be created, and we will not allow any pages of type &lt;code&gt;StartPage&lt;/code&gt; or &lt;code&gt;SettingsPage&lt;/code&gt; to be created.&lt;/p&gt;

&lt;p&gt;Pretty simple and straightforward in my opinion.&lt;/p&gt;

&lt;h3&gt;IncludeOn and ExcludeOn&lt;/h3&gt;

&lt;p&gt;These parameters were a bit tricky to understand at first, primarily because the explanation in the documentation is a little confusing.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://sdkbeta.episerver.com/SDK-html-Container/?path=/SdkDocuments/CMS/7/Knowledge%20Base/Developer%20Guide/Content/Pages%20and%20Blocks/Attributes.htm&amp;amp;vppRoot=/SdkDocuments//CMS/7/Knowledge%20Base/Developer%20Guide/&quot;&gt;The documentation states:&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;IncludedOn differs from Include in the way that it is not excluding. That is. for types in IncludedOn that has all page types available no page types will be excluded. Include on the other hand will exclude all typed pages except the ones given in Include.&lt;/p&gt;

&lt;p&gt;Excluded works so that if no types are set on Included then the result will be that all registered page types except the Excluded ones are available. If there are types registered in Included then all types in Included except the ones in Excluded are available. Below is an image that shows how Excluded and ExcludedOn are mapped to settings in admin mode.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;This is how I see it:&lt;/p&gt;

&lt;p&gt;You would use &lt;code&gt;IncludeOn&lt;/code&gt; to specify that the current page type can be created under the specified page type(s). So for our example, we could use the &lt;code&gt;IncludeOn&lt;/code&gt; parameter in the &lt;code&gt;StandardPage&lt;/code&gt; to specify that it can be created under any page instance the &lt;code&gt;StartPage&lt;/code&gt; page type:&lt;/p&gt;

&lt;p&gt;&lt;div class=&quot;bogus-wrapper&quot;&gt;&lt;notextile&gt;&lt;figure class=&quot;code&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;table&gt;&lt;tr&gt;&lt;td class=&quot;gutter&quot;&gt;&lt;pre class=&quot;line-numbers&quot;&gt;&lt;span class=&quot;line-number&quot;&gt;1&lt;/span&gt;
&lt;span class=&quot;line-number&quot;&gt;2&lt;/span&gt;
&lt;span class=&quot;line-number&quot;&gt;3&lt;/span&gt;
&lt;span class=&quot;line-number&quot;&gt;4&lt;/span&gt;
&lt;span class=&quot;line-number&quot;&gt;5&lt;/span&gt;
&lt;span class=&quot;line-number&quot;&gt;6&lt;/span&gt;
&lt;span class=&quot;line-number&quot;&gt;7&lt;/span&gt;
&lt;span class=&quot;line-number&quot;&gt;8&lt;/span&gt;
&lt;span class=&quot;line-number&quot;&gt;9&lt;/span&gt;
&lt;span class=&quot;line-number&quot;&gt;10&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;code class=&quot;&quot;&gt;&lt;span class=&quot;line&quot;&gt;[ContentType(GUID = &quot;49754310-E0ED-4C95-AA69-C155323E0AA9&quot;)]
&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;[AvailablePageTypes(&amp;lt;/p&gt;
&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;&amp;lt;pre&gt;&amp;lt;code&gt;IncludeOn = new Type[]{ typeof(StartPage) }
&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;&amp;lt;/code&gt;&amp;lt;/pre&gt;
&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;&amp;lt;p&gt;)]
&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;public class StandardPage : PageData
&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;{
&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/notextile&gt;&lt;/div&gt;&lt;/p&gt;

&lt;p&gt;Similarly, you would use &lt;code&gt;ExcludeOn&lt;/code&gt; to specify that the current page type can not be created under the specified page type(s). So for our example, we could the the &lt;code&gt;ExcludeOn&lt;/code&gt; parameter in the &lt;code&gt;SettingsPage&lt;/code&gt; to specify that is can not be created under any page instance of the &lt;code&gt;StartPage&lt;/code&gt; page type:&lt;/p&gt;

&lt;p&gt;&lt;div class=&quot;bogus-wrapper&quot;&gt;&lt;notextile&gt;&lt;figure class=&quot;code&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;table&gt;&lt;tr&gt;&lt;td class=&quot;gutter&quot;&gt;&lt;pre class=&quot;line-numbers&quot;&gt;&lt;span class=&quot;line-number&quot;&gt;1&lt;/span&gt;
&lt;span class=&quot;line-number&quot;&gt;2&lt;/span&gt;
&lt;span class=&quot;line-number&quot;&gt;3&lt;/span&gt;
&lt;span class=&quot;line-number&quot;&gt;4&lt;/span&gt;
&lt;span class=&quot;line-number&quot;&gt;5&lt;/span&gt;
&lt;span class=&quot;line-number&quot;&gt;6&lt;/span&gt;
&lt;span class=&quot;line-number&quot;&gt;7&lt;/span&gt;
&lt;span class=&quot;line-number&quot;&gt;8&lt;/span&gt;
&lt;span class=&quot;line-number&quot;&gt;9&lt;/span&gt;
&lt;span class=&quot;line-number&quot;&gt;10&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;code class=&quot;&quot;&gt;&lt;span class=&quot;line&quot;&gt;[ContentType(GUID = &quot;49754310-E0ED-4C95-AA69-C155323E0AA9&quot;)]
&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;[AvailablePageTypes(&amp;lt;/p&gt;
&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;&amp;lt;pre&gt;&amp;lt;code&gt;ExcludeOn = new Type[]{ typeof(SettingsPage) }
&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;&amp;lt;/code&gt;&amp;lt;/pre&gt;
&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;&amp;lt;p&gt;)]
&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;public class SettingsPage : PageData
&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;{
&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/notextile&gt;&lt;/div&gt;&lt;/p&gt;

&lt;p&gt;So think of these parameters as a vice-versa of &lt;code&gt;Include&lt;/code&gt; and &lt;code&gt;Exclude&lt;/code&gt;. By using these parameters, you can keep the array of Types short and concise, while also reducing the need to go back and revise the &lt;code&gt;Include&lt;/code&gt; or &lt;co