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've not used the Dictionary items in settings before, so I created one 'TimTest' and tried to access it in a template eg
I tried
@Dictionary.TimTest
and
@Dictionary["TimTest"]
both returned the error
Using the generic type 'System.Collections.Generic.Dictionary<TKey,TValue>' requires 2 type arguments
which is confusing : I can't supply TValue as that's what I am trying to retrieve.
Can anyone help?
Thanks
Solved it
@Umbraco.GetDictionaryValue("TimTest")
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Read dictionary item in Razor
I've not used the Dictionary items in settings before, so I created one 'TimTest' and tried to access it in a template eg
I tried
and
both returned the error
which is confusing : I can't supply TValue as that's what I am trying to retrieve.
Can anyone help?
Thanks
Solved it
@Umbraco.GetDictionaryValue("TimTest")
is working on a reply...