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
How do I call @Umbraco.GetDictionaryValue in a view if my Model is custom?
i.e I don't have @inherits Umbraco.Web.Mvc.UmbracoTemplatePage at the top.
What do you have at the top of your view?
Is the view being called via a custom route/controller? or from an Umbraco Surface Controller, or directly from an Umbraco view?
Just @model List
I've tried adding using Umbraco.Core and Web but it doesn't like it.
If you remove @model and use @inherits UmbracoViewPage<List> (assuming List is the name of your type)
You should get access to @Umbraco, and @Model will be you model as you expect :-)
Give that a go
Fantastic, that works. Just what I needed.
Where could I have found that out, is there a page in the documentation that would have told me?
Honestly, I'm sure sure where in the documentation you would have found it. I'm pretty sure it's in there somewhere when it's talking about surface controllers but I'm not 100%.
I think I've picked it up from either the Umbraco Training Courses (I highly recommend them if you can), or other forum posts / discussions on Slack :-)
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted