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 would like to use
Umbraco.Content
and
Umbraco.GetDictionaryValue
inside my macros (using MVC Partials).
How can I use it?
I currently use CurrentModel.NodeById() but it seems to be deprecated,
I also used Library.NodeById but I want a strongly typed model. not a dynamic one.
Thanks
The Umbraco helper should be available if you're using MVC partials. What does your view inherit from?
Jeroen
Oh, sorry. I forgot to mention the inheritance.
From umbraco.MacroEngines.DynamicNodeContext.
You're using the old macro's. You only have the Umbraco helper available if you inherit from Umbraco.Web.Mvc.UmbracoTemplatePage.
Maybe it should be Umbraco.Web.Macros.PartialViewMacroPage. You'll need to use Partial View Macros. In v6 you can edit them inside Umbraco: http://issues.umbraco.org/issue/U4-1303
Thank you that solved my problem. :)
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Use umbraco helpers at macros (v.4.11)
I would like to use
Umbraco.Content
and
Umbraco.GetDictionaryValue
inside my macros (using MVC Partials).
How can I use it?
I currently use CurrentModel.NodeById() but it seems to be deprecated,
I also used Library.NodeById but I want a strongly typed model. not a dynamic one.
Thanks
The Umbraco helper should be available if you're using MVC partials. What does your view inherit from?
Jeroen
Oh, sorry. I forgot to mention the inheritance.
From umbraco.MacroEngines.DynamicNodeContext.
You're using the old macro's. You only have the Umbraco helper available if you inherit from Umbraco.Web.Mvc.UmbracoTemplatePage.
Jeroen
Maybe it should be Umbraco.Web.Macros.PartialViewMacroPage. You'll need to use Partial View Macros. In v6 you can edit them inside Umbraco: http://issues.umbraco.org/issue/U4-1303
Jeroen
Thank you that solved my problem. :)
is working on a reply...