Blogs posted in 2012

EPiServer 7 - IValidator interface

Jun 26, 2012  

In previous versions of EPiServer custom validation was normally achieved in one of two ways. You could either create a custom property or hook into a DataFactory event.

Both approaches had their disadvantages and advantages. However in EPiServer 7 a new way of validation has been introduced, namely the EPiServer.Validation.IValidate<T> interface (thanks to Johan Bjornfot for the tip!).

EPiServer 7 Preview - Using validation attributes

Jun 20, 2012  

After my previous post about comparing Comparing PageTypeBuilder and EPiServer 7 Preview typed pages I found out that EPiServer 7 Preview now also supports standard .net validation attributes too.

I am sure you have had requirements that users can only enter numbers that are between 1 and 10, strings that are only 10 characters long or postcodes. In previous versions these all required custom properties but now these are all covered by using the System.ComponentModel.DataAnnotations.RegularExpression, System.ComponentModel.DataAnnotations.Range and System.ComponentModel.DataAnnotations.StringLength attributes.

I wanted to put a few examples together to demonstrate the usage of the attributes and their effect in the UI.

Comparing PageTypeBuilder and EPiServer 7 Preview typed pages (part 3 of 3)

Jun 19, 2012  

In my previous post I talked about "mapping between PageType attributes in PageTypeBuilder and typed pages in EPiServer 7". In this post I want to complete the series and talk about the mapping of property definitions in typed pages.

Comparing PageTypeBuilder and EPiServer 7 Preview typed pages (part 2 of 3)

Jun 19, 2012  

In my previous post I talked about the the "Differences when referencing the page type from a page template". This post describes the mapping between PageType attributes in PageTypeBuilder and typed pages in EPiServer 7 Preview.

Comparing PageTypeBuilder and EPiServer 7 Preview typed pages (part 1 of 3)

Jun 19, 2012  

EPiServer has introduced a whole load of cool new features to the forthcoming EPiServer 7 Preview. One of them is native support for strongly typed page types. Strongly typed page types has been available in the popular PageTypeBuilder project in previous versions of EPiServer for a while but now its built right into the core framework.

This is exciting stuff and something I am sure we are all eager to use. In many scenarios I am I think there is a good chance that projects which are due to be upgraded to EPiServer 7 already use PageTypeBuilder. So I wanted to put a post together that compares PageTypeBuilder with EPiServer 7 typed pages, including how to map from one to the other.

Granular Language security in EPiServer using LanguageSecurityAddOn

Apr 30, 2012  

I have previously posted about Granular Page Type security in EPiServer using PageTypeSecurityAddOn. This added granular security to page types in EPiServer.

However the client in question also wanted more control over the access rights on langauges too. More specifically they wanted to remove publish rights to a specific langauge in EPiServer. I translated this requirement to mean it should be possible to specify who should have publish rights on a per langauge basis. So I created LanguageSecurityAddOn to address this requirement.

PageTypeSecurityAddOn v1.1 for EPiServer released

Apr 27, 2012  

I recently posted about Granular Page Type security in EPiServer using PageTypeSecurityAddOn which I created as part of SecurityPack for EPiServer on CodePlex. After discussions with some collegues I have added some additional features.

Granular Page Type security in EPiServer using PageTypeSecurityAddOn

Apr 25, 2012  

I was at a client site and they asked why users could edit a page that they did not have access to create. I asked what they meant and they said they they removed Create access in admin mode for a certain page type but users could still edit pages that were created with that page type. I explained the access was for create permissions only but the client disagreed and thought that if you cannot access a page type then why should you be able to edit it? To be honest, I agreed. 

So I decided to create a plug in that resolved the problem. I wanted a plug in that would give me more granular access to page types in EPiServer, to allow me to specify who could edit certain pages types, not just create them. So I created PageTypeSecurityAddOn.

Translating EPiServer Category names

Mar 28, 2012  

A collegue asked how to translate EPiServer category names so this is a "note to self" for future reference. 

The format of the XML you need to add in the /lang folder to translate or localise EPiServer categories is as follows:

Truffler in two hours - Adding Truffler search to an EPiServer site in two hours

Mar 12, 2012  

I have wanted to add search to this site for a while. This site is built on EPiServer and also uses PageTypeBuilder so I had previously toyed with the idea of the built in EPiServer search. However I never quite got round to it and wanted to learn something new (working with EPiServer and its features are part of the day job after all).

I learned about Truffler.net through all round coding/EPiServer guru Joel Abrahamsson so decided it was a great place to start when adding search to this site.

Selected Language Visitor Group Criterion for EPiServer

Feb 08, 2012  

I was at a client site the when a question was asked about how to personalise content using the selected language. The scenario is as follows:

  • Site editor(s) publish content on a global branch for example English /en/
  • Both /en-GB/ and /en-US/ fall back to /en/ and share content for most of the site (some individual country content is published)
  • The site is accessed using fallback languages for example English GB /en-GB/ and English US /en-US/
  • The client wanted to personalise content for /en-GB/ and /en-US/ in the /en/ page