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...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
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...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.