Simple Styling of EPiServer Forms

Prior to EPiServer Forms 4.5, we were forced to inject in our own styling by editing the less files. This often resulted in breaking functionality where javascript were dependant upon these base CSS classes. EPiServer last year changed this by binding javascript to data attributes freeing us from styling shackles. This article is for those… Continue reading Simple Styling of EPiServer Forms

EPiServer 10 – Restrict any Block Types on XHtmlString property using the Validation Attribute

I couldn’t find a similar solution online as I believe there is an emerging pattern where we are now instructing clients to drag EPiServer Blocks into Rich Text editors. Requirement: As an Editor I want to limit certain blocks types from being dragged into the rich text editor Solution #1: Apply this attribute to any… Continue reading EPiServer 10 – Restrict any Block Types on XHtmlString property using the Validation Attribute

EPiServer 7.5 – Exception – More than one content model is assigned to the guid

When running an EPiServer site and you get the exception “More than one content model is assigned to the guid”. This is usually because you’ve changed a namespace. There will be a reference to the old namespace cached somewhere so do the following: 1) Clear your bin folder 2) Clear the ASP.NET Temporary files folder… Continue reading EPiServer 7.5 – Exception – More than one content model is assigned to the guid

Architect – Our Website Branching Strategy @ Marie Curie Cancer Care

What we use We use a combination of Git, EPiServer and have a fairly small team which makes the challenge of using the standard pattern of Gitflow a little more difficult. So we use a part of it to help us get an excellent balance between being responsive to post production issues and minimal branch… Continue reading Architect – Our Website Branching Strategy @ Marie Curie Cancer Care

Property Injection & Action Filters in EPiServer 7 CMS

I spent a bit of time putting in some custom implementation to support Property Injection on to my Action Filters before realizing that EPiServer 7 already provides this functionality for me. Doh. In order to take advantage all you need to do is set your DI controlled interface to the generic type property of the Injected class.… Continue reading Property Injection & Action Filters in EPiServer 7 CMS

Manipulating an EPiServer Page Programmatically

Creating a Page Here’s how you can create a page in code from a page type you’ve already defined. First create a new instance of the page type under another page in the form of a link: var newBlogPost = ContentRepository.GetDefault<BlogPostPage>(parentLink); Then set whatever properties you wish to the newBlogPost object. newBlogPost.Subject = “Creating an EPiServer… Continue reading Manipulating an EPiServer Page Programmatically