One of the things that I’m always aiming for when creating a module for EPiServer is that you should be able to install it simply by dropping a single assembly to the bin folder. There should be no or very little configuration needed (Convention over Configuration!)  and you shouldn’t have to place files in folders here and there.

The first and probably most important step towards this goal was introduced to the wider EPiServer audience by Dan, Johan and Allan quite a while back ago, where they showed how to reference embedded .aspx files using a virtual path provider.

At Intergen were I currently work we are using this technique frequently and as of late we also introduced a standard way to embed EPiServer language files within these module assemblies, the MetaPropertyModifier that I wrote about the other week is built with embedded language files. The key requirements that we set up for this was that it should still be possible to add more languages later and also possible to override strings in the included languages.

Read the rest of this entry »

Advertisements

There are a few hidden bits in EPiServer CMS 6 that hasn’t been talked much about, one of them being the enhancements to the scheduled jobs. These new features include the ability to interrupt the execution of a long running job and for these jobs to send status updates to the UI.

Read the rest of this entry »

When you are creating a page type in EPiServer you have a lot of configuration settings you can do. You can set the default value, hide it from the Edit interface, make it mandatory and so on. For the built in properties it’s another story, you can set the default values for some of them, but that is pretty much it.

Probably the most common request for this functionality is how to hide the categories property/tab as it doesn’t make sense to display it if you are not using categories on your site. The same logic would apply to the URL segment property if the site for some reason doesn’t have Friendly URLs turned on. Mari Jørgensen wrote a blog post when EPiServer 5 was release on how to hide the categories property and Fredrik Haglund also wrote a piece on how to move properties to another tab.

Read the rest of this entry »

So Frederik Vig started a community project around EPiServer Extensions which I believe is a great initiative. Already having a great number of extension methods that we are currently using.

Rather than just dump them in the source code repository I thought I would try to get my blogging going again by posting each method with a short blog post so that people can comment easy and come with suggestions for improvement

Read the rest of this entry »

On the project I’m working on at the moment there are plans to do a lot of page retrieving based on categories. My initial thought was to retrieve all pages for that section and to the filtering in memory. Possibly with some pre-filtered and cached collections to speed it up, but since the categories in this case can be combined quite freely, the hit rate on this cache would probably be quite low. Reading Steve’s article about FindPagesWithCriteria and Performance I decided to do some quick unscientific tests on the differences between using FindPagesWithCriteria and a recursive GetChildren implemented as shown below using LINQ filtering to select categories. Read the rest of this entry »

In one of my previous posts I listed a number of suggested improvements to the EPiServer property system. My number 1 wish (Just after wish 0) was that there would be a settings property on page definitions. While being nothing like a native solution with a dedicated interface would be, I thought I would show you a simple way to use the help text field to store settings for your EPiServer page properties. I’ve seen this approach being mentioned before around the web but I never got around to use it myself as I always found it somewhat tedious to manage these settings in the admin mode. Since starting to use the PageTypeBuilder by Joel Abrahamsson this has somewhat changed and now there is a possibility to define help texts through attributes in your code, making them much easier to manage.

Therefore I thought that I would share with you how I have implemented EPiServer property settings through the help text field.

Read the rest of this entry »

I just wanted to follow up on my previous post on creating an ‘nice feel’  custom EPiServer property that I posted a few weeks ago. Got some great comments and thought I would follow up with an updated version of my example property.

First, you can find the new source code here: PropertyPageTypeList, PropertyPageTypeListControl

I’m going to let the code speak for itself, but I can highlight a few key changes:

  • It’s now inheriting directly from PropertyData instead of PropertyLongString
  • I renamed it from collection to list and exposing the PageTypeCollection as an IList<PageType>
  • It’s now allowing changes to the PageType list property that will be persisted when saved.
  • I have made a number of smaller changes to prepare for the creation of a PropertyObjectBase and PropertyObjectListBase. I will post these very soon, possible on EPiCode if there is any interest?

Again thanks for the previous feedback. Let me know if there is any more things you would like to see improved!