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 render PartialViews from inside MacroPartials?
Example:
@inherits Umbraco.Web.Macros.PartialViewMacroPage @{ var container = Umbraco.Content(Model.MacroParameters["personell"]); } @RenderPage("~/Views/Partials/PersonellListItems.cshtml", container)
Is it possible? How?
Just like "normal" MVC: @Html.Partial("~/Views/Partials/PersonellListItems.cshtml", container)
Hi Sebastiaan, do you know if this also works in 7.6? I'm having trouble loading a Partial from inside a MacroPartial.
I've tried to use:
@Html.Partial("poll") @{ Html.RenderPartial("poll") } @{ Html.RenderPartial("~/Views/Partials/poll.cshtml") } @Html.RenderPartial("~/Views/Partials/poll.cshtml")
But they all don't seem to work. Do i have to add an inherit similar to @inherits Umbraco.Web.Macros.PartialViewMacroPage to the top of the page or something?
@inherits Umbraco.Web.Macros.PartialViewMacroPage
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Render partial (Page) from inside a MacroPartial?
How do i render PartialViews from inside MacroPartials?
Example:
Is it possible? How?
Just like "normal" MVC: @Html.Partial("~/Views/Partials/PersonellListItems.cshtml", container)
Hi Sebastiaan, do you know if this also works in 7.6? I'm having trouble loading a Partial from inside a MacroPartial.
I've tried to use:
But they all don't seem to work. Do i have to add an inherit similar to
@inherits Umbraco.Web.Macros.PartialViewMacroPage
to the top of the page or something?is working on a reply...