Get current document url

Mark Rupp asked on November 18, 2014 20:41

i have used this in the past to get the current document url. CMSContext.CurrentDocument.NodeAliasPath but in 8.1 it doesn't work. how do i get the current documents path?

Correct Answer

Jan Hermann answered on November 19, 2014 14:57

Hello,

In the code -> CMS.DocumentEngine.DocumentContext.CurrentDocument.NodeAliasPath

In a macro -> {% CurrentDocument.NodeAliasPath |(identity)GlobalAdministrator%}

Best regards,
Jan Hermann

0 votesVote for this answer Unmark Correct answer

Recent Answers


Virgil Carroll answered on November 19, 2014 06:46

If your speaking of using a Macro in a we part take a look at the CurrentDocument or DocumentContext nodes in the Macro Explorer.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on November 21, 2014 00:55 (last edited on November 21, 2014 00:55)

Mark, check out the API changes here, pretty good reference to use.

0 votesVote for this answer Mark as a Correct answer

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