Copied to clipboard

Flag this post as spam?

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


  • Justyna 14 posts 146 karma points
    Aug 08, 2019 @ 11:51
    Justyna
    0

    umbraco helpers in partial view in Umbraco 8

    Hi guys,

    I'm just trying to upgrade a website from 7 to 8. It's going ok but one thing I can't figure out is how to use the umbraco helpers in partial views like Umbraco.Truncate and Umbraco.StripHtml are those no longer available in 8?

    Thanks, Justyna

  • Alex Skrypnyk 5908 posts 22603 karma points MVP 4x admin c-trib
    Aug 08, 2019 @ 11:54
    Alex Skrypnyk
    0

    Hello Justyna

    You have to use other helpers.

    Thanks, Alex

  • Frans de Jong 522 posts 1762 karma points c-trib
    Aug 08, 2019 @ 12:45
    Frans de Jong
    102

    A lot of helpers are moved from Umbraco to Html.

    So instead of:

    @Umbraco.If()
    @Umbraco.StripHtml
    @Umbraco.Truncate
    @Umbraco. etc...
    

    you can use:

    @Html.If()
    @Html.StripHtml
    @Html.Truncate
    @Html. etc...
    

    If you used another one just check the Html helper first.

  • Justyna 14 posts 146 karma points
    Aug 08, 2019 @ 13:14
    Justyna
    0

    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