Copied to clipboard

Flag this post as spam?

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


  • Claushingebjerg 939 posts 2574 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 6175 posts 24176 karma points MVP 8x 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 939 posts 2574 karma points
    May 29, 2015 @ 15:48
    Claushingebjerg
    0

    BINGO

Please Sign in or register to post replies

Write your reply to:

Draft