The Macro editor screen has an entry for them, but it doesn't seem to work. It doesn't list the files in the partials folder, and if you manually enter a file it is saved as a script file.
Is there a work around to use a Partial View Macro?
It should work, but I'm guessing, based on this line in your questions "It doesn't list the files in the partials folder", you may be getting confused with Partials and MacroPartials.
Partials inherit from Umbraco.Web.Mvc.UmbracoTemplatePage and are located in ~/Views/Partials. Macro partials on the other hand inherit from Umbraco.Web.Macros.PartialViewMacroPage and are located in ~/Views/MacroPartials. If you want to create a macro partial, then you'll need to make sure you are using the later method.
Thanks all for confirming that MacroPartials do work. Matt, you are correct I had confused Partials and MacroPartials. I was thinking of Macro Partials as being normal partials that are chosen as a Macro.
The MacroPartials folder should have been an obvious clue! However I will add that the Macro edit screen label is 'Use MVC Partial View', and the dropdown label is 'Browse partial view files on server..'
Partial View Macros in 4.11
Are Partial View Macros supported in 4.11.?
The Macro editor screen has an entry for them, but it doesn't seem to work. It doesn't list the files in the partials folder, and if you manually enter a file it is saved as a script file.
Is there a work around to use a Partial View Macro?
Hi Dallas
Are you running MVC mode or webforms mode?
/Jan
Jan, the site is running in MVC mode.
Hi Dallas
Ok, then I think it should display just fine. What is the exact 4.11 version you're using? I'm thinking wheter it's 4.11.3 for instance.
Have you double checked that permisions have been set correctly? Do you see any errors messages in the browser console when trying to see them?
Looking forward to hearing from you.
/Jan
Hi, i might have the wrong thing here, but i am using 4.11.4 and it works for me?
In the macros folder i have my partial views. If i click on one i can see
Name
Alias
Use MVC Partial View -- From the drop down i can choose the files located at ~/Views/MacroPartials.
(I am creating my partials and views in visual studio by opening the my wwwroot soloution as a website :).
Hope this helps :). Charlie.
Hi Dallas,
It should work, but I'm guessing, based on this line in your questions "It doesn't list the files in the partials folder", you may be getting confused with Partials and MacroPartials.
Partials inherit from Umbraco.Web.Mvc.UmbracoTemplatePage and are located in ~/Views/Partials. Macro partials on the other hand inherit from Umbraco.Web.Macros.PartialViewMacroPage and are located in ~/Views/MacroPartials. If you want to create a macro partial, then you'll need to make sure you are using the later method.
Hope that helps
Matt
Thanks all for confirming that MacroPartials do work. Matt, you are correct I had confused Partials and MacroPartials. I was thinking of Macro Partials as being normal partials that are chosen as a Macro.
The MacroPartials folder should have been an obvious clue! However I will add that the Macro edit screen label is 'Use MVC Partial View', and the dropdown label is 'Browse partial view files on server..'
Thanks
Dallas
Matt, I accidentally clicked the 'solved' icon on my response and not your answer. Is there a way to change that?
Hey Dallas,
lol, not without asking HQ to fix it :)
Don't worry about it, enjoy the karma and glad you got it working.
Matt
is working on a reply...