sort_dir = reverse and 'desc' or 'asc'
sortFunc = key in ['Type', 'title_or_id'] and 'nocase' or 'cmp'
items = sequence.sort( items, ((key, sortFunc, sort_dir),) )
sort_dir = reverse and 'desc' or 'asc'
sortFunc = key in ['Type', 'title_or_id'] and 'nocase' or 'cmp'
items = sequence.sort( items, ((key, sortFunc, sort_dir),) )