Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Matt Tolliday 13 posts 81 karma points
    Jan 21, 2017 @ 02:09
    Matt Tolliday
    0

    ModelBuilders - recursive composition?

    Hi all,

    I'm new to the latest ModelBuilders package that has been baked into Umbraco Core but am reviewing it to replace the Umbraco Mapper package that I currently use in a 3+ year old site.

    I'm having issues finding how to render a composition property that needs to recursively populate up to the root if no value is set on the current page.

    For context, this is a carosel banner, where child pages may or may not select images to show directly, but in which case should default to showing whatever banner images are configured on the root "Home" node.

    I have a partial which is being rendered within the _Layout and is strongly typed to @inherits UmbracoViewPage<IBanner> where IBanner is the generated interface of the composition.

    However the property @Model.Banners is not acting recursively.

    Any ideas?

    Thanks in advance.

Please Sign in or register to post replies

Write your reply to:

Draft