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 5347 posts 19753 karma points MVP 3x admin c-trib
    Aug 08, 2019 @ 11:54
    Alex Skrypnyk
    0

    Hello Justyna

    You have to use other helpers.

    Thanks, Alex

  • Frans de Jong 495 posts 1674 karma points c-trib
    Aug 08, 2019 @ 12:45
    Frans de Jong
    100

    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

Please Sign in or register to post replies

Write your reply to:

Draft