umbraco/Umbraco-CMS — pull request #44 by pynej (2013-07-01 20:13:07+00:00)
Title: Added a Umbraco.GetDictionarySection() function to allow for more logical...

... querying of dictionary items via the hierarchy.

Possible addon for developers that make heavy use of the dictionary feature. We use this in custom code but I am sharing it as others might find it useful and it doesn't really make things more complicated.

Eg: If you create the following dictionary items:
[My Category]
[My Category] Field 1
[My Category] Field 2
[My Category] [Titles]
[My Category] [Titles] Heading 1

Then you can do the following:
var myDict = Umbraco.GetDictionarySection("[My Category] ");
@myDict.GetDictionaryValue("Field 1")
@myDict["Field 2"]
@myDict.GetDictionarySection("[Titles] ")["Heading 1"]