This is the CodeArt blog. This is where we share everything from tips & tricks to thoughtleadership articles or interesting code samples.
If you are looking for older blog posts published by Allan Thraen (Like those from labs.episerver.com or Allantech.com) you might be able to find them in our Archive.
Anti-Pattern: Don't modify Optimizely CMS (Episerver) content objects in the Controller
Using your content object (CurrentPage / CurrentBlock) as a makeshift viewmodel where you change settings or extend it with user data in the controller before passing it to the view, is unfortunately (and to my surprise) a pretty wide-spread practice among developers implementing Optimizely (Episerver) web sites. But it really needs to stop.
Optimizely (Episerver): Split folder structure for blocks and media
Since version 7 or 8 of Episerver (now Optimizely CMS), the shared Blocks and Media have been sharing the same folder structure. Some people see a benefit with the shared structure, and some absolutely hate it. Personally, I have gotten used to it - but I was recently asked if it's possible to split it up. Here's the hack I came up with.