Copied to clipboard

Flag this post as spam?

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


  • Robert Bullock 15 posts 75 karma points
    Jul 27, 2021 @ 18:25
    Robert Bullock
    0

    Umbraco 8: Umbraco.If Helper

    I used the Umbraco.If() helper extensively in my templates. Nice shorthand way of switching rendered content or handling empty values.

    Any suggestions for a quick replacement?

  • Steve Kromer 9 posts 109 karma points
    Feb 15, 2022 @ 17:43
    Steve Kromer
    0

    You could use a simple c# if statement instead such as

    @if (singleColumn) { @Html.Raw("<div class='container'>"); } else { @Html.Raw("<div class='sub'>"); }
    
Please Sign in or register to post replies

Write your reply to:

Draft