Is it possible to access the dictionary from within a component? I can get a reference to the UmbracoContext but am not sure how I can use that to access the UmbracoHelper or to reference a dictionary item.
All of my searches seem to refer to older versions of Umbraco or require me to access the Dictionary from a view or a controller etc.
I'm new to the forum and this post was just approved but I have since found how to do this by injecting the IDictionaryService into the component's constructor and using the GetDictionaryItemByKey() method.
Access dictionary item from a Component
Hi,
Is it possible to access the dictionary from within a component? I can get a reference to the UmbracoContext but am not sure how I can use that to access the UmbracoHelper or to reference a dictionary item.
All of my searches seem to refer to older versions of Umbraco or require me to access the Dictionary from a view or a controller etc.
Any help appreciated.
Thanks, Jay
Hi,
I'm new to the forum and this post was just approved but I have since found how to do this by injecting the IDictionaryService into the component's constructor and using the GetDictionaryItemByKey() method.
Thanks, Jay
is working on a reply...