Last chance to get discounted tickets to Codegarden... Price goes up on Tuesday at 20:00 CEST!

Copied to clipboard

Flag this post as spam?

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


  • Lesley 85 posts 325 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 3739 posts 13737 karma points MVP 7x 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 85 posts 325 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

Please Sign in or register to post replies

Write your reply to:

Draft