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 a block list recursively.
For example i'm using a block list in my footer, which is want to render on all pages...
@Html.GetBlockListHtml(Model, "sidefod", fallback: Fallback.ToAncestors)
Doesn't work
Do it like this my friend:
@inherits Umbraco.Web.Mvc.UmbracoViewPage @{ Layout = null; var node = Model.AncestorOrSelf(); } <div>@Html.GetBlockListHtml(node, "footer") </div>
That should work, but doesnt in my case, so i did:
@inherits Umbraco.Web.Mvc.UmbracoViewPage @{ Layout = null; var rootnode = Model.Root(); } <div>@Html.GetBlockListHtml(node, "footer") </div>
Wow, thanks H5YR!
He's very good that @Claushingebjerg - you should buy him a beer if you get the chance!
I think i will... Today! :)
Glad you got it working, but can't you just do it like with any other property?
Html.GetBlockListHtml(node, "footer", recurse:true)
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 block list recursively
How do i render a block list recursively.
For example i'm using a block list in my footer, which is want to render on all pages...
Doesn't work
Do it like this my friend:
That should work, but doesnt in my case, so i did:
Wow, thanks H5YR!
He's very good that @Claushingebjerg - you should buy him a beer if you get the chance!
I think i will... Today! :)
Glad you got it working, but can't you just do it like with any other property?
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.