Security Matters

No matter what is the size of your website, your project is handling sensitive information or it’s just a feedback form, Cyber Security matters for all. You are a novice or an expert, a developer, QA, or a solution architect, in your team. A team should have basic knowledge of cyber security. In the project …

How your site appears in google search results

Search engines now look deep into site contents and try to understand more about your site e.g. Google uses structure data to understand more about the content on your page. By providing structured data we not only can get the benefit of special features like rich snippets but also our site will be eligible to …

EPiServer CMS 11 Useful SQL Queries – 2

Here is a set of few queries that we have been using in different investigations Get usages of EPiServer contents including pages and blocks Check Table size No contents have been added for following content types Looking into Activity Logs Unmapped Property List Get usages of EPiServer contents including pages and blocksSELECT  tct.Name,   tct.ModelType,   COUNT(tc.pkID) …

EPiServer CMS 11 Useful SQL Queries – 1

Here is a set of few queries that we have been using in different investigations Check How Big is your Database Get Data for Each Property and from Each Content Type Complete Tree Structure of your web site Check EPiServer DB Version Check How Big is DatabaseSELECT     t.NAME AS TableName,    s.Name AS SchemaName,  …

Get Specific Elements Blocks from EPiServer Forms

A small extension to get the specific form elements block with all properties rather relying on  FriendlyNameInfo with the limited set of properties. EPi Form Extensions Gist Example: Custom form element block: public class HiddenExternalValueElementBlock : HiddenElementBlockBase{    [Display(Name = “Enable if its a special campaign”)]    public virtual bool MySpecialCampaign { get; set; }     [Display(Name = “Propperty 1”)]    public virtual bool Property1 { get; set; }     [Display(Name = “Property 2”)]    public virtual bool Property2 { get; set; } } Extension Methods: using EPiServer.Core;using EPiServer.Forms.Core;using EPiServer.Forms.Core.Models;using EPiServer.Forms.Helpers.Internal;using EPiServer.Forms.Implementation.Elements;using System.Collections.Generic;using System.Linq; namespace PixieDigital.EpiServer.Extensions{    public static class FormExtensions    {        public static IEnumerable<T> GetSpecificFormElements<T>(this FormIdentity formIdentity, bool filteredItemsOnly = true) where T : ElementBlockBase        {            return GetSpecificFormElements<T>(formIdentity.GetFormBlock(), filteredItemsOnly);        }         public static IEnumerable<T> GetSpecificFormElements<T>(this FormContainerBlock formContainerBlock, bool filteredItemsOnly = true) where T : ElementBlockBase        {            if (formContainerBlock != null && formContainerBlock.ElementsArea != null && formContainerBlock.ElementsArea.Items != null && formContainerBlock.ElementsArea.Items.Count() != 0)            {                var formElements = filteredItemsOnly ? formContainerBlock.ElementsArea.FilteredItems : formContainerBlock.ElementsArea.Items;                 foreach (var item in formElements)                {                    T element = item.ContentLink.GetContent((formContainerBlock as ILocale).Language.Name) as T;                    if (element != null)                    {                        yield return element;                    }                }            }        }    }} Usage: Guid formGuid = “xxx-xx-xxxx”;var formIdentity = new FormIdentity(formGuid, “en”);var hiddenElement = formIdentity.GetSpecificFormElements<HiddenExternalValueElementBlock>();//Use it for further processingvar formId = hiddenElement.FirstOrDefault().Content.ContentLink.GetElementName(); var definedElementName = hiddenElement.FirstOrDefault().Content.Name; var mySpecialCampaign = hiddenElement.FirstOrDefault().MySpecialCampaign;                        

Azure based architecture for serving EPiServer CMS As Content Hub

This architecture uses the Azure API Management to provide access to content from EPiServer for different channels. Contents are exposed via headless API and other Custom written APIs. Editors and admins will have secure access to EPIServer CMS. API Management is used to publish APIs to external, partner and channels, securely and at scale. Application Insights is used to detect …

Serialize IContent to use in Angular like front technologies

(A self note) A generic service to convert IContent into an Expando Object, ExpandoObject  can be converted into JSON to use in Angular/React components.Find the code gist https://gist.github.com/khurramkhang/e8d4b9ef093fe30610be986efa352744 Limitations: not supporting multilingual not preparing friendly urls

Few best practises while working with orders

Validate the status of line item (at required stage in sale flow) to make sure the product is active, within the valid date range, and that the catalog entry is available in the current market. Validate the status of line item (at required stage in sale flow) to make sure business does not lose money. It …

Schedule Jobs revised

Schedule jobs has been revised in version 10.8. we have a new property Restartable on the ScheduledPlugIn attribute, that can be defined as following [ScheduledPlugIn(Restartable = true)] Jobs having property “Restartable=true” will make sure it can be re-run to completion in case of crashes before next schedule time. There are few considerations for developers before …

How CDN can effect personalisation

Without going into detailed benefits of CDN, generally CDNs are used to deliver the contents from fastest and closest available server.  In Episerver Digital Experience Cloud services, CDN has its own URL pointing to the original URL. The visitor will navigate to something like “www.customer.com”. The request will go to the CDN, which in turn …