{"id":99,"date":"2020-01-18T16:23:39","date_gmt":"2020-01-18T16:23:39","guid":{"rendered":"http:\/\/naveedulhaq.com\/?p=99"},"modified":"2023-02-21T22:43:52","modified_gmt":"2023-02-21T22:43:52","slug":"allow-single-instance-of-the-page-type-in-episerver-cms","status":"publish","type":"post","link":"https:\/\/www.naveedulhaq.com\/index.php\/episerver\/allow-single-instance-of-the-page-type-in-episerver-cms\/","title":{"rendered":"Allow Single Instance of the page type in Episerver CMS"},"content":{"rendered":"\n<p>When we are working with the Episerver website there are few page types that we want Content editors to create only one instance of the page. Such as the &#8220;Search result page&#8221;. We only want one search result page on the whole website. Few similar examples are; <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Home Page (Start Page)<\/li>\n\n\n\n<li>Checkout Page<\/li>\n\n\n\n<li>Basket Page<\/li>\n\n\n\n<li>Blog Listing page<\/li>\n\n\n\n<li>Site Setting Page<\/li>\n<\/ul>\n\n\n\n<p>In order to fulfill this requirement, first of all, I have created a custom attribute called &#8220;SingleInstancesAttribute&#8221;<\/p>\n\n\n\n<pre><code>using System;\nnamespace Foundation.Cms.Attributes\n{\n    &#91;AttributeUsage(AttributeTargets.Class)]\n    public class SingleInstancesAttribute : Attribute\n    {\n        public enum InstanceScope\n        {\n            Site,\n            SameContentTree,\n        }\n        public InstanceScope Scope { get; set; }\n    }\n}<\/code><\/pre>\n\n\n\n<p>As you can see I&#8217;m using AttributeUsage attribute from System class. This is because I want to control the manner in which it is been used. For example, the indicated attribute class must derive from Attribute, either directly or indirectly. You can check detailed documentation and other options on the Microsoft website.<\/p>\n\n\n\n<p>I have also defined the scope element of this attribute. <\/p>\n\n\n\n<p><strong>Site Scope<\/strong>: The instance of page type can not be created more than once on whole website<\/p>\n\n\n\n<p><strong>SameContentTree<\/strong> <strong>Scope<\/strong>: The instance of page type can not be created more than once on the same content tree. Such as their ParentLink can not be the same. <\/p>\n\n\n\n<p>Now I can add this attribute on those page types that I want only one instance. In the below example, I have applied this attribute on &#8220;SearchResultPage&#8221; page type of the Episerver Foundation example site. <\/p>\n\n\n\n<pre><code>using EPiServer.Core;\nusing EPiServer.DataAbstraction;\nusing EPiServer.DataAnnotations;\nusing System.ComponentModel.DataAnnotations;\nusing Foundation.Cms.Attributes;\nnamespace Foundation.Cms.Pages\n{\n    &#91;ContentType(DisplayName = \"Search Results Page\",\n        GUID = \"6e0c84de-bd17-43ee-9019-04f08c7fcf8d\",\n        Description = \"Page to allow customer to search the site\",\n        GroupName = CmsGroupNames.Content)]\n    &#91;ImageUrl(\"~\/assets\/icons\/cms\/pages\/CMS-icon-page-03.png\")]\n    \n    &#91;SingleInstances(Scope = SingleInstancesAttribute.InstanceScope.Site)]\n    \n    public class SearchResultPage : FoundationPageData\n    {\n        &#91;CultureSpecific]\n        &#91;Display(Name = \"Top content area\", Order = 210)]\n        public virtual ContentArea TopContentArea { get; set; }\n        &#91;CultureSpecific]\n        &#91;Display(\nName = \"Show recommendations\", \nDescription = \"This will determine whether or not to show recommendations\", Order = 220)]\n        public virtual bool ShowRecommendations { get; set; }\n        public override void SetDefaultValues(ContentType contentType) =&gt; ShowRecommendations = true;\n    }\n    \n}<\/code><\/pre>\n\n\n\n<p>The next step is to create a <strong>Validator<\/strong>. The validator will tell Episerver that something needs validation before publishing a page. You can consider it a Pre-Publish event. <\/p>\n\n\n\n<p>In the below validator example, I&#8217;m using Episerver find to get all instances of The page type and checking it against Scope of Attribute. You can use Content Loader to do the same (I find Episerver Find is more efficient in such queries)<\/p>\n\n\n\n<pre><code>using System.Collections.Generic;\nusing System.Linq;\nusing System.Reflection;\nusing EPiServer.Core;\nusing EPiServer.Validation;\nusing Foundation.Cms.Attributes;\nusing Foundation.Cms.Pages;\nusing Foundation.Find.Cms;\nnamespace Foundation.Demo.Validation\n{\n    public class SingleInstancesValidator : IValidate&lt;PageData&gt;\n    {\n        private readonly ICmsSearchService _searchService;\n        public SingleInstancesValidator(ICmsSearchService seaechService)\n        {\n            _searchService = seaechService;\n        }\n        public IEnumerable&lt;ValidationError&gt; Validate(PageData instance)\n        {\n            var singleInstanceAttribute = instance.GetType().GetCustomAttribute&lt;SingleInstancesAttribute&gt;(true);\n            if (singleInstanceAttribute == null)\n            {\n                return Enumerable.Empty&lt;ValidationError&gt;();\n            }\n            \/\/ call search service to get all existing instances of page type\n            var existingInstances = _searchService.SearchByPageType&lt;SearchResultPage&gt;().ToList();\n            if (existingInstances.Any())\n            {\n                if (existingInstances.Count &gt; 0)\n                {\n                    \/\/ if we already have a instance of this page in find then check scope of instance\n                    if (singleInstanceAttribute.Scope == SingleInstancesAttribute.InstanceScope.Site)\n                    {\n                        \/\/ Error\n                        return new&#91;]\n                        {\n                            new ValidationError\n                            {\n                                ErrorMessage =\n                                    $\"Only one instances of this page type can exist.\",\n                                PropertyName = \"PageType\",\n                                Severity = ValidationErrorSeverity.Error,\n                                ValidationType = ValidationErrorType.StorageValidation\n                            }\n                        };\n                    }\n                    else if (singleInstanceAttribute.Scope == SingleInstancesAttribute.InstanceScope.SameContentTree)\n                    {\n                        if (existingInstances.Any(x =&gt; x.ParentLink == instance.ParentLink))\n                        {\n                            \/\/Error\n                            return new&#91;]\n                            {\n                                new ValidationError\n                                {\n                                    ErrorMessage =\n                                        $\"Only one instances of this page type can exist at this level\",\n                                    PropertyName = \"PageName\",\n                                    Severity = ValidationErrorSeverity.Error,\n                                    ValidationType = ValidationErrorType.StorageValidation\n                                }\n                            };\n                        }\n                    }\n                }\n            }\n            \n            return Enumerable.Empty&lt;ValidationError&gt;();\n        }\n    }\n}\n<\/code><\/pre>\n\n\n\n<p>Now if your find index has already crawled all pages of the website and if you start to create another instance of SearchResult page it gives you an error &#8220;Only one instance of this page type can exist.&#8221; and don&#8217;t let you publish the page. <\/p>\n\n\n\n<p>Below is the code of new method I have created in ICmsSearchService to give me all instances of a page type. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public IEnumerable&lt;T&gt; SearchByPageType&lt;T&gt;() where T : PageData\n        {\n            var productSearch = _findClient.Search&lt;T&gt;();\n            productSearch = productSearch.FilterForVisitor();\n            return productSearch.GetContentResult();\n        }<\/code><\/pre>\n\n\n\n<p>I have implemented this example on the Episerver Foundation example site. You can find code by visiting following Git repo <\/p>\n\n\n\n<p>https:\/\/github.com\/nulhaq\/EpiserverSingleInstanceValidator<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When we are working with the Episerver website there are few page types that we want Content editors to create only one instance of the&#8230;<\/p>\n","protected":false},"author":1,"featured_media":65,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[10,13,63,90],"class_list":["post-99","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-episerver","tag-cms","tag-episerver","tag-optimizely","tag-optimizely-cms"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Allow Single Instance of the page type in Episerver CMS - Naveed Ul-Haq&#039;s blog<\/title>\n<meta name=\"description\" content=\"There are few page types that we want Content editors to create only one instance of the page. - Naveed Ul-Haq&#039;s blog\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.naveedulhaq.com\/index.php\/episerver\/allow-single-instance-of-the-page-type-in-episerver-cms\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Allow Single Instance of the page type in Episerver CMS - Naveed Ul-Haq&#039;s blog\" \/>\n<meta property=\"og:description\" content=\"There are few page types that we want Content editors to create only one instance of the page. - Naveed Ul-Haq&#039;s blog\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.naveedulhaq.com\/index.php\/episerver\/allow-single-instance-of-the-page-type-in-episerver-cms\/\" \/>\n<meta property=\"og:site_name\" content=\"Naveed Ul-Haq&#039;s blog\" \/>\n<meta property=\"article:published_time\" content=\"2020-01-18T16:23:39+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-02-21T22:43:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2020\/01\/episerver.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"230\" \/>\n\t<meta property=\"og:image:height\" content=\"230\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Naveed Ul-Haq\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Naveed Ul-Haq\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/episerver\\\/allow-single-instance-of-the-page-type-in-episerver-cms\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/episerver\\\/allow-single-instance-of-the-page-type-in-episerver-cms\\\/\"},\"author\":{\"name\":\"Naveed Ul-Haq\",\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/#\\\/schema\\\/person\\\/dd6db5980b965fcae41e096d357c65c9\"},\"headline\":\"Allow Single Instance of the page type in Episerver CMS\",\"datePublished\":\"2020-01-18T16:23:39+00:00\",\"dateModified\":\"2023-02-21T22:43:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/episerver\\\/allow-single-instance-of-the-page-type-in-episerver-cms\\\/\"},\"wordCount\":395,\"commentCount\":3,\"publisher\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/#\\\/schema\\\/person\\\/dd6db5980b965fcae41e096d357c65c9\"},\"image\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/episerver\\\/allow-single-instance-of-the-page-type-in-episerver-cms\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.naveedulhaq.com\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/episerver.jpeg\",\"keywords\":[\"cms\",\"episerver\",\"Optimizely\",\"Optimizely Content cloud\"],\"articleSection\":[\"Optimizely\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/episerver\\\/allow-single-instance-of-the-page-type-in-episerver-cms\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/episerver\\\/allow-single-instance-of-the-page-type-in-episerver-cms\\\/\",\"url\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/episerver\\\/allow-single-instance-of-the-page-type-in-episerver-cms\\\/\",\"name\":\"Allow Single Instance of the page type in Episerver CMS - Naveed Ul-Haq&#039;s blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/episerver\\\/allow-single-instance-of-the-page-type-in-episerver-cms\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/episerver\\\/allow-single-instance-of-the-page-type-in-episerver-cms\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.naveedulhaq.com\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/episerver.jpeg\",\"datePublished\":\"2020-01-18T16:23:39+00:00\",\"dateModified\":\"2023-02-21T22:43:52+00:00\",\"description\":\"There are few page types that we want Content editors to create only one instance of the page. - Naveed Ul-Haq&#039;s blog\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/episerver\\\/allow-single-instance-of-the-page-type-in-episerver-cms\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/episerver\\\/allow-single-instance-of-the-page-type-in-episerver-cms\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/episerver\\\/allow-single-instance-of-the-page-type-in-episerver-cms\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.naveedulhaq.com\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/episerver.jpeg\",\"contentUrl\":\"https:\\\/\\\/www.naveedulhaq.com\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/episerver.jpeg\",\"width\":230,\"height\":230,\"caption\":\"episerver\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/episerver\\\/allow-single-instance-of-the-page-type-in-episerver-cms\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.naveedulhaq.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Allow Single Instance of the page type in Episerver CMS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/#website\",\"url\":\"https:\\\/\\\/www.naveedulhaq.com\\\/\",\"name\":\"Naveed Ul-Haq's blog\",\"description\":\"AI, Optimizely, Azure &amp; more\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/#\\\/schema\\\/person\\\/dd6db5980b965fcae41e096d357c65c9\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.naveedulhaq.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/#\\\/schema\\\/person\\\/dd6db5980b965fcae41e096d357c65c9\",\"name\":\"Naveed Ul-Haq\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g\",\"caption\":\"Naveed Ul-Haq\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g\"},\"description\":\"I lead engineering delivery teams for digital commerce and digital experience platforms, combining hands-on architecture experience with strong delivery governance. Over 20+ years, I\u2019ve built and led cross\u2011functional teams (engineering, BA, QA) delivering modern cloud solutions on Azure, microservices, APIs and eCommerce\\\/CMS platforms. My recent focus includes AI-enabled commerce automation: product ingestion and enrichment workflows, content optimisation for SEO and shopping feeds, and agentic tooling to improve marketing and accessibility workflows. I\u2019m passionate about building high-performing teams, establishing quality\\\/release standards, and delivering measurable outcomes across performance, reliability, and speed of change.\",\"sameAs\":[\"https:\\\/\\\/www.naveedulhaq.com\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/naveedulhaq\\\/\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Allow Single Instance of the page type in Episerver CMS - Naveed Ul-Haq&#039;s blog","description":"There are few page types that we want Content editors to create only one instance of the page. - Naveed Ul-Haq&#039;s blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.naveedulhaq.com\/index.php\/episerver\/allow-single-instance-of-the-page-type-in-episerver-cms\/","og_locale":"en_GB","og_type":"article","og_title":"Allow Single Instance of the page type in Episerver CMS - Naveed Ul-Haq&#039;s blog","og_description":"There are few page types that we want Content editors to create only one instance of the page. - Naveed Ul-Haq&#039;s blog","og_url":"https:\/\/www.naveedulhaq.com\/index.php\/episerver\/allow-single-instance-of-the-page-type-in-episerver-cms\/","og_site_name":"Naveed Ul-Haq&#039;s blog","article_published_time":"2020-01-18T16:23:39+00:00","article_modified_time":"2023-02-21T22:43:52+00:00","og_image":[{"width":230,"height":230,"url":"https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2020\/01\/episerver.jpeg","type":"image\/jpeg"}],"author":"Naveed Ul-Haq","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Naveed Ul-Haq","Estimated reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.naveedulhaq.com\/index.php\/episerver\/allow-single-instance-of-the-page-type-in-episerver-cms\/#article","isPartOf":{"@id":"https:\/\/www.naveedulhaq.com\/index.php\/episerver\/allow-single-instance-of-the-page-type-in-episerver-cms\/"},"author":{"name":"Naveed Ul-Haq","@id":"https:\/\/www.naveedulhaq.com\/#\/schema\/person\/dd6db5980b965fcae41e096d357c65c9"},"headline":"Allow Single Instance of the page type in Episerver CMS","datePublished":"2020-01-18T16:23:39+00:00","dateModified":"2023-02-21T22:43:52+00:00","mainEntityOfPage":{"@id":"https:\/\/www.naveedulhaq.com\/index.php\/episerver\/allow-single-instance-of-the-page-type-in-episerver-cms\/"},"wordCount":395,"commentCount":3,"publisher":{"@id":"https:\/\/www.naveedulhaq.com\/#\/schema\/person\/dd6db5980b965fcae41e096d357c65c9"},"image":{"@id":"https:\/\/www.naveedulhaq.com\/index.php\/episerver\/allow-single-instance-of-the-page-type-in-episerver-cms\/#primaryimage"},"thumbnailUrl":"https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2020\/01\/episerver.jpeg","keywords":["cms","episerver","Optimizely","Optimizely Content cloud"],"articleSection":["Optimizely"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.naveedulhaq.com\/index.php\/episerver\/allow-single-instance-of-the-page-type-in-episerver-cms\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.naveedulhaq.com\/index.php\/episerver\/allow-single-instance-of-the-page-type-in-episerver-cms\/","url":"https:\/\/www.naveedulhaq.com\/index.php\/episerver\/allow-single-instance-of-the-page-type-in-episerver-cms\/","name":"Allow Single Instance of the page type in Episerver CMS - Naveed Ul-Haq&#039;s blog","isPartOf":{"@id":"https:\/\/www.naveedulhaq.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.naveedulhaq.com\/index.php\/episerver\/allow-single-instance-of-the-page-type-in-episerver-cms\/#primaryimage"},"image":{"@id":"https:\/\/www.naveedulhaq.com\/index.php\/episerver\/allow-single-instance-of-the-page-type-in-episerver-cms\/#primaryimage"},"thumbnailUrl":"https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2020\/01\/episerver.jpeg","datePublished":"2020-01-18T16:23:39+00:00","dateModified":"2023-02-21T22:43:52+00:00","description":"There are few page types that we want Content editors to create only one instance of the page. - Naveed Ul-Haq&#039;s blog","breadcrumb":{"@id":"https:\/\/www.naveedulhaq.com\/index.php\/episerver\/allow-single-instance-of-the-page-type-in-episerver-cms\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.naveedulhaq.com\/index.php\/episerver\/allow-single-instance-of-the-page-type-in-episerver-cms\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.naveedulhaq.com\/index.php\/episerver\/allow-single-instance-of-the-page-type-in-episerver-cms\/#primaryimage","url":"https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2020\/01\/episerver.jpeg","contentUrl":"https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2020\/01\/episerver.jpeg","width":230,"height":230,"caption":"episerver"},{"@type":"BreadcrumbList","@id":"https:\/\/www.naveedulhaq.com\/index.php\/episerver\/allow-single-instance-of-the-page-type-in-episerver-cms\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.naveedulhaq.com\/"},{"@type":"ListItem","position":2,"name":"Allow Single Instance of the page type in Episerver CMS"}]},{"@type":"WebSite","@id":"https:\/\/www.naveedulhaq.com\/#website","url":"https:\/\/www.naveedulhaq.com\/","name":"Naveed Ul-Haq's blog","description":"AI, Optimizely, Azure &amp; more","publisher":{"@id":"https:\/\/www.naveedulhaq.com\/#\/schema\/person\/dd6db5980b965fcae41e096d357c65c9"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.naveedulhaq.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":["Person","Organization"],"@id":"https:\/\/www.naveedulhaq.com\/#\/schema\/person\/dd6db5980b965fcae41e096d357c65c9","name":"Naveed Ul-Haq","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/secure.gravatar.com\/avatar\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g","caption":"Naveed Ul-Haq"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g"},"description":"I lead engineering delivery teams for digital commerce and digital experience platforms, combining hands-on architecture experience with strong delivery governance. Over 20+ years, I\u2019ve built and led cross\u2011functional teams (engineering, BA, QA) delivering modern cloud solutions on Azure, microservices, APIs and eCommerce\/CMS platforms. My recent focus includes AI-enabled commerce automation: product ingestion and enrichment workflows, content optimisation for SEO and shopping feeds, and agentic tooling to improve marketing and accessibility workflows. I\u2019m passionate about building high-performing teams, establishing quality\/release standards, and delivering measurable outcomes across performance, reliability, and speed of change.","sameAs":["https:\/\/www.naveedulhaq.com","https:\/\/www.linkedin.com\/in\/naveedulhaq\/"]}]}},"_links":{"self":[{"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/posts\/99","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/comments?post=99"}],"version-history":[{"count":0,"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/posts\/99\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/media\/65"}],"wp:attachment":[{"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/media?parent=99"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/categories?post=99"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/tags?post=99"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}