Dette er CodeArts blog. Vi deler thought-leadership og tekniske tips og tricks - men som regel på engelsk.
When you are using Optimizely Search & Navigation (Find) to help you generate autocomplete suggestions server side in a multi-language scenario it can be tricky (and poorly documented) to figure out how to get the suggestions in the correct language.
When using System.Text.Json to serialize complex objects you sometimes need to go a bit beyond how the default serialization works. Here are a few helpful converters - for example for doing polymorphic conversion.
Here is just a quick tip for how you can do custom blob http handling when using the Digizuite integration to Optimizely (Episerver) CMS 12.
As Google Analytics have gotten harder and harder to use due to GDPR, legal and privacy concerns I have turned more and more to Matomo. I recently completed v.1 of a new open source tracking integration.
Some people live and breath 'best practice' development. I am not one of them. Risk is, in-experienced developers (or sometimes experienced) might use them just cause they are 'best practice' and not think more about it. Even when it turns out they are not. Here is little example...
.NET Core is cross platform. But can you really run Optimizely CMS 12 and everything needed on a tiny ARM based Raspberry PI? Yes you can, and it's not that hard.
Calling all Optimizely (Episerver) Developers in Copenhagen and surrounding area. It's once again time for a real-life meetup!
Quite often a lot of the content on pages in Optimizely Content cloud (aka Episerver CMS) is structured in blocks placed in content areas. And often even blocks in blocks. Sometimes it's needed to quickly get a list of all the content items on a page - and sometimes you might also be interested in which visitor groups are used. Here is a couple of extension methods to help you with that.
Routing has significantly changed in .NET 5 - and that affects many parts of Optimizely (Episerver) CMS 12. For example we have to get used to endpoints a middleware. As I am working on upgrading a few different add-ons I found it could be useful to see which routes are registered out of the box.
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.
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.
One of my favorite add-ons these days is the GridView. It's pretty customizable, but some of the customizations aren't the most well documented. Here's a couple of tricks I've found handy when using it.