Umbraco tip of the week: "Folder" is not a good name for a documentType

Note: this post is over a year old, it's very likely completely outdated and should probably not be used as reference any more. You have been warned. :-)

This is a really short tip: Don't create a new documentType with the alias "Folder". This alias has already been used by folders in the media section.

In normal day-to-day use this is not a problem, but it becomes one when you try to programatically access the documentType by alias (DocumentType.GetByAlias("Folder")). I ran into this problem the other day and couldn't figure out why I was getting unexpected results until I had a look at what the ID actually represented, a media folder.

Sebastiaan Janssen

Dutch guy living in (and loving) Copenhagen, working at Umbraco HQ. Lifehacker, skeptic, music lover, cyclist, developer.