How do I load a macropartial view from within a package?
Hi,
I have a sitenavigation macropartial which works fine on my main masterpage.
I have a package installed within app_plugins\package\ and within that folder I have a masterpage for my package that I've installed.
What I want to do is render the macropartial which is stored in \views\macropartials\siteNav.cshtml in my masterpage within app_plugins\package\themes\mytheme\views\master.cshtml
When I type
@Umbraco.RenderMacro("siteNav")
I get an error : The type or namespace name 'RenderMacro' does not exist in namespace 'Umbraco'
I tried adding
@model Umbraco.Web.Macros.PartialViewMacroPage
but then I am told I can only have one model per page.
How do I load a macropartial view from within a package?
Hi, I have a sitenavigation macropartial which works fine on my main masterpage. I have a package installed within app_plugins\package\ and within that folder I have a masterpage for my package that I've installed.
What I want to do is render the macropartial which is stored in \views\macropartials\siteNav.cshtml in my masterpage within app_plugins\package\themes\mytheme\views\master.cshtml
When I type
I get an error : The type or namespace name 'RenderMacro' does not exist in namespace 'Umbraco'
I tried adding
but then I am told I can only have one model per page.
Any help would be great, Thanks,
Maybe try :
@umbraco.library.RenderMacro("siteNav")
Hope this helps
Cheers.
J
Thanks but RenderMacro gives an error 'umbraco.library' does not contain a definition for 'RenderMacro'
Can anyone else offer a suggestion on how to call my global navigation partial from within a package?
Thanks,
is working on a reply...