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 have a Macro that generates a slider from several content pages by:
<div id="slides"> @foreach (var item in Model.SliderFolder.First().SliderPages) { <div class="slides_container"> <div class="slide"> @Html.Raw(@item.bodyText.ToString()) </div> </div> } </div>
in one of the sliderpages another macro is inserted along with some static text.
It seems like the second macro is not executed. How can i achieve that?
Any suggestion is very welcome :-)
br
Michael
try
@Html.Raw(umbraco.library:RenderMacroContent(item.bodyText, item.Id))
or you might have to use
@Html.Raw(umbraco.library:RenderMacroContent(item.bodyText, Model.Id))
richtext properties in Razor macros don't by default cause embeded macro to be run.
Thanks for the dats reply. this worked:
<div id="slides"> @foreach (var item in Model.SliderFolder.First().SliderPages) { <div class="slides_container"> <div class="slide"> @Html.Raw(umbraco.library.RenderMacroContent(item.bodyText.ToString(), item.Id)); </div> </div> } </div>
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
Macro in Macro, 2nd not executing
I have a Macro that generates a slider from several content pages by:
try
or you might have to use
richtext properties in Razor macros don't by default cause embeded macro to be run.
Thanks for the dats reply. this worked:
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.