Handle document events differently with uDocumentEventHandler

Being able to execute custom code when a specific document event occurs is an important part of Umbraco development and is made pretty easy thanks to the events of the “ContentService”. Say that we have a document type with the alias “documentTypeA” and we would like to execute some code when a document of this […]

Add AutoMapper profile with Umbraco

As you might already know, Umbraco uses AutoMapper to map objects from one class to another and so can you. However you’ll need to add your profiles to AutoMapper in a specific way. Indeed, as the documentation states, you should configure AutoMapper only once per app domain, so if you just call the “Initialize” method […]

Read the app settings with ASP.NET Core

In previous version of “ASP.NET”, we used to retrieve settings from the “web.config” by using the “ConfigurationManager” like this: View the code on Gist. However, with “ASP.NET Core”, things get a little bit different, and I didn’t say “more complicated” but “different”. Indeed, now, the idea is to convert your app settings to a plain […]

Automate Umbraco deployment with Powershell

Nowadays, it’s inconceivable to deploy web sites manually which is partly why some solutions such as “Umbraco Cloud” exist. However, these options are not always the best. Indeed, for instance, I’m currently working in a governmental company that does not want to have its data hosted elsewhere that on-premise. In that case, it’s important to […]

Umbraco is just another Konami game

Welcome in this utterly useless and short blog post but I couldn’t help myself when I discovered this funny thing in the source code of “Umbraco”. Indeed, during my investigation to fix an issue in the “Umbraco” UI, I noticed something weird in the HTML code of the login page… View the code on Gist. […]

Organize Umbraco projects

This post uses Umbraco 7.12 for the example but probably applies to a wider range of version. Few weeks ago, I started to use “Umbraco” and I noticed that it was pretty difficult to find a tutorial on how to organize an “Umbraco” project (I didn’t say it does not exist, it’s just difficult to […]

Configure Umbraco behind a proxy

Some functionalities, such as the installation of a starter kit during the initial configuration of “Umbraco” perform some calls to external services. If you’re working in a company that is using a corporate proxy and don’t configure “Umbraco” to use it, all these functionalities won’t work. In the case of the starter kit selection, you’ll […]

How to use PetaPoco with Umbraco

The code of this post has been tested on Umbraco 7.12. “PetaPoco” is a micro-ORM used by “Umbraco 7” (“Umbraco 8” uses “NPoco“) to query the database. This blog takes a look at how to perform common operations using the “Umbraco” implementation. Creating tables “PetaPoco” uses class definitions to create tables. Basically, it analyzes a […]

Asynchronicity in JavaScript

Introduction Asynchronicity is one of the most used and most important aspect of “JavaScript”, so let’s review it. In this post, we’ll start by learning what “v8” and the “events loop” are. Then we’ll talk a bit about callback functions before exploring what promises and observables are. The idea of this post is not to […]

AngularJS adds “unsafe” before links

Recently, I experienced an annoying issue after having upgraded my application from angularjs 1.6 to angularjs 1.7. Consider the following link: View the code on Gist. This is a technique I like to use to simulate a link. Basically, defining the “href” attribute to “javascript:void(0)” along with “ng-click” allowed me to add a link executing […]