Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I'm trying to get a dictionary item inside a .cshtml. The cshtml is loaded in a macro and resides in the ~/Views/MacroPartials directory.
@umbraco.library.GetDictionaryItem("Practitioner")
For some reason it always gives back the english key.
When I use the same code inside a ~/MacroScripts razor file it loads the correct dutch key on the dutch site.
What am I missing? I'm using Umbraco 6.1.3
Hi Yannick,
Maybe this documentation can help you get it to work
http://our.umbraco.org/documentation/reference/templating/macros/razor/using-dictionary-items
/Dennis
not really, the first 2 options just give errors, the 3rd one I'm already using.
Comment author was deleted
Try @Umbraco.GetDictionaryValue("Key")
oeps was my stupid mistake. Updated in the wrong place...:S
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
GetDictionaryItem not working in MacroPartials
I'm trying to get a dictionary item inside a .cshtml. The cshtml is loaded in a macro and resides in the ~/Views/MacroPartials directory.
For some reason it always gives back the english key.
When I use the same code inside a ~/MacroScripts razor file it loads the correct dutch key on the dutch site.
What am I missing? I'm using Umbraco 6.1.3
Hi Yannick,
Maybe this documentation can help you get it to work
http://our.umbraco.org/documentation/reference/templating/macros/razor/using-dictionary-items
/Dennis
not really, the first 2 options just give errors, the 3rd one I'm already using.
Comment author was deleted
Try @Umbraco.GetDictionaryValue("Key")
oeps was my stupid mistake. Updated in the wrong place...:S
is working on a reply...