uQuery allows for that syntax, as in this example:
@uQuery.GetDictionaryItem("key", "fallback")
Though, as far as I know, it doesn't actually create the dictionary item if it doesn't exist. Just returns the default value if it doesn't exist.
From what I've read, uQuery is supposed to be replaced by UmbracoHelper, though I don't see that overload for GetDictionaryItem on it yet (as of Umbraco 6.1.6).
Automatic dictionary items
I just had a thought.
Wouldnt it be great if you could just do this in your cshtml:
Umbraco.GetDictionaryItem("MyItem", "defaultValue")
uQuery allows for that syntax, as in this example:
Though, as far as I know, it doesn't actually create the dictionary item if it doesn't exist. Just returns the default value if it doesn't exist.
From what I've read, uQuery is supposed to be replaced by UmbracoHelper, though I don't see that overload for GetDictionaryItem on it yet (as of Umbraco 6.1.6).
is working on a reply...