-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
Description
As per @NikRimington from umbraco/Umbraco-CMS#11854 (comment):
I would love it if Dictionary items could generate a single "DictionaryAliasses" class automatically that followed the hirearchy in the dictionary section to make accessing the aliases safer.
For example:
public static class DictionaryAliases { public const String TopLevelDictionaryItemWithNoChildren = "Top Level Dictionary Item With No Children"; public static class TopLevelDictionaryItemWithChildren { public const string Alias = "Top Level Dictionary Item With Children"; public const string FirstChildNode = "First Child Node"; } }I hope that makes some sort of sense. Then dictionary items can be a) Compile time safe, and b) runtime exception caught. They can be accessed like this:
DictionaryAliases.TopLevelDictionaryItemWithChildren.Alias