Copied to clipboard

Flag this post as spam?

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


  • Claushingebjerg 886 posts 2415 karma points
    May 29, 2015 @ 15:24
    Claushingebjerg
    0

    Umbraco library in partial

    I must be hitting the friday blackout. Im at a loss at something, whivh dhould be simple...

    Im in a partial, and need to pull some text from a parameter on a media node, and convert the line breaks...

    @Html.Raw(@umbraco.library.ReplaceLineBreaks(@imageItem.GetPropertyValue("billedtekst")))

     Everything works fine, up to when i use "@umbraco.library.ReplaceLineBreaks", then i get an error

    Compiler Error Message: 
    CS1502: The best overloaded method match for 'umbraco.library.ReplaceLineBreaks(string)' has some invalid arguments

  • Alex Skrypnyk 5908 posts 22603 karma points MVP 4x admin c-trib
    May 29, 2015 @ 15:44
    Alex Skrypnyk
    100

    Hi Claushingebjerg,

    Try to use this method like that :

    @Html.Raw(@umbraco.library.ReplaceLineBreaks(@imageItem.GetPropertyValue<string>("billedtekst")))
    

    Thanks

  • Claushingebjerg 886 posts 2415 karma points
    May 29, 2015 @ 15:48
    Claushingebjerg
    0

    BINGO

  • 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