Copied to clipboard

Flag this post as spam?

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


  • Ian Banks 24 posts 44 karma points
    Nov 05, 2010 @ 12:26
    Ian Banks
    0

    getting parent url using niceUrl

    Hello probably really simple question, could someone tell me how to get the parent url of the current node in context using NiceUrl?

  • Chriztian Steinmeier 2726 posts 8320 karma points MVP 4x admin c-trib
    Nov 05, 2010 @ 12:32
    Chriztian Steinmeier
    1

    Hi Ian,

    Just pass the parent's id into the function:

    <xsl:value-of select="{umbraco.library:NiceUrl($currentPage/../@id)}" />

    /Chriztian

  • Ian Banks 24 posts 44 karma points
    Nov 05, 2010 @ 14:24
    Ian Banks
    0

    Thanks

  • Hendy Racher 861 posts 3844 karma points MVP 2x admin c-trib
    Nov 24, 2010 @ 14:10
    Hendy Racher
    0

    Hi, thought I'd mention that it can also be done directly on a template with:

    <%= umbraco.library.NiceUrl(Node.GetCurrent().Parent.Id) %>

    edit: oops just noticed this is in the XSLT forum - I can't delete this...

  • Colin Browne 31 posts 52 karma points
    Nov 29, 2010 @ 13:09
    Colin Browne
    0

    You can use:

     

    <xsl:value-of select="{umbraco.library:NiceUrl($currentPage/@parentID)}" />
  • 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