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...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
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...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.