Copied to clipboard

Flag this post as spam?

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


  • Ben Martin 7 posts 27 karma points
    Jan 25, 2011 @ 04:47
    Ben Martin
    0

    4.6.1 NiceUrl returning # for media

    Since upgrading to 4.6.1 from 4.0.4 links return from umbraco.library.NiceUrl for media are returning #.  

    I have republished the site which seem to only fix the pages.

  • Paul Blair 466 posts 731 karma points
    Jan 25, 2011 @ 05:41
    Paul Blair
    0

    I wouldn't usually use niceUrl for media. For images try something like:

    {@nodeName}

    or for files (eg PDF's):

  • Paul Blair 466 posts 731 karma points
    Jan 25, 2011 @ 05:46
    Paul Blair
    0

    I wouldn't usually use niceUrl for media. For images try something like:

    <img alt="{@nodeName}" src="{umbraco.library:GetMedia(./ahProductBoxImage, 'false')/image/umbracoFile}" />

    or for files (eg PDF's):

    <a href="{umbraco.library:GetMedia(./ahProductBoxImage, 'false')/file/umbracoFile}" ><xsl:value-of select="@nodeName" /></a>

  • Kim Andersen 1447 posts 2196 karma points MVP
    Jan 26, 2011 @ 19:56
    Kim Andersen
    0

    Hi Ben

    Could you please provide us with your code that you're currently using to render the links?

    /Kim A

  • Ben Martin 7 posts 27 karma points
    Jan 26, 2011 @ 22:51
    Ben Martin
    0

    @Kim

    Here the is code:

    XPathNodeIterator ni = umbraco.library.GetMedia(nodeID, false);
    string url = "";
    XPathNodeIterator xn = current.Select("/File/umbracoFile");
    while (xn.MoveNext())
    {
        url = xn.Current.Value;
    }

     

Please Sign in or register to post replies

Write your reply to:

Draft