November Happy Hour will be moved to Thursday December 5th.

How to get an internal url to a page that has LinkType set to PageShortcutType.External?

Vote:
 

I'm trying to find a method, property, or helper that will give me the full url of a page that is set to an external shortcut. Say my page is located at "www.foo.com/bar/baz", and Baz has a LinkType of PageShortcutType.External and links to "http://www.google.com".

I'd expect there to be some way to get "www.foo.com/bar/baz" from baz's PageData, but every property, method or helper I've found so far returns "http://www.google.com" instead.

Thank you!

#86868
Jun 03, 2014 19:21
Vote:
 

Can't seem to find one either but a workaround would be to get the parrent link and then add the URLSegment.

So something like:

var url = urlResolver.GetUrl(baz.ParentLink);
url += baz.URLSegment;
#86869
Jun 03, 2014 19:51
Vote:
 

Yeah, that's probably the best solution for now. Thanks for the idea.

#86878
Jun 03, 2014 21:39
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.