Sorting of contenttype in backend

Patch suggested by trigau in #948
Merge pull request #1127 from rarila/patch-1

Sorting of contenttype in backend