Copied to clipboard

Flag this post as spam?

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


  • Garrett Fisher 341 posts 496 karma points
    Sep 22, 2011 @ 19:56
    Garrett Fisher
    0

    Extracting Last Part of URL? Absolute Vs. Relative Links

    Is there a method in Umbraco for getting JUST the page name part of the URL when NiceUrl() gives you back an absolute URL?  That's happening for me on a bilingual site I created by copying one site to another using relatednode api.  Now the original one returns the full url (including domain name) whereas the copy returns as the relative url only.  How can I make these the same?

    Thanks,

    Garrett

  • Dan Høegh 14 posts 34 karma points
    Sep 23, 2011 @ 13:30
    Dan Høegh
    0

    Hi

    You could try getting @nodeName.

    But it sounds like you need to setup "Manage hostnames" on the new site. Right click on the sites rootnode.

    Good luck

  • Chriztian Steinmeier 2800 posts 8791 karma points MVP 8x admin c-trib
    Sep 23, 2011 @ 13:49
    Chriztian Steinmeier
    0

    Hi Garrett (+ Dan),

    I would suggest you use the @urlName attribute then - it's always (to my knowledge) in sync with the path you get back from NiceUrl().

    /Chriztian 

  • Dan Høegh 14 posts 34 karma points
    Sep 23, 2011 @ 13:56
    Dan Høegh
    0

    true, my bad :-)

Please Sign in or register to post replies

Write your reply to:

Draft