Get current page url in transformation in 8.1

Kayla Johnson asked on October 10, 2014 15:39

I'm in a transformation trying to get the current page URL. I'm looking through the API and there does not seem like a clear-cut way to do this. There are many methods that ask for a Current URL parameter but I can't find a way to get it. I'm guessing I have to use GetAbsoluteUrl but it doesn't make a lot of sense. It asks for a relative path and GetAppRelativePath() asks for a plain URL. <%# CMS.URLHelper.GetAbsoluteUrl(???) %>

How do I get the current page url?

Recent Answers


Brenden Kehren answered on October 10, 2014 19:29

Are you talking the page you're on or the page you are rendering? The page you are rendering is simply <%# GetDocumentUrl() %>. The page you are on is CurrentDocument.NodeAliasPath to get you the relative path of the page you are navigating to or are on.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.