Copied to clipboard

Flag this post as spam?

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


  • Lesley 107 posts 350 karma points
    Nov 08, 2016 @ 19:41
    Lesley
    0

    uComponents.Controls.RenderTemplate in Umbraco 7

    Is there a replacement for the uComponents RenderTemplate that works in Umbraco 7?

  • Lee Kelleher 4026 posts 15837 karma points MVP 13x admin c-trib
    Nov 08, 2016 @ 21:08
    Lee Kelleher
    100

    Hi Lesley,

    You could try using the RenderTemplate helper method in UmbracoHelper?

    @Umbraco.RenderTemplate(1234)
    

    If you needed to have multiple node IDs, then you can put it in a for-loop?

    @foreach (var nodeId in new[] { 1111, 2222, 3333, 4444 })
    {
        @Umbraco.RenderTemplate(nodeId)
    }
    

    I hope this helps?

    Cheers,
    - Lee

  • Lesley 107 posts 350 karma points
    Nov 09, 2016 @ 01:03
    Lesley
    0

    Hi Lee,

    The for-loop worked.

    Had to make a small adjustment to the templates as we had been passing in a custom property, but it was an easy fix.

    Thanks

  • 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.

Please Sign in or register to post replies