How do I recognize previous page in kentico macro ?

Corey Grone asked on August 17, 2017 17:17

I want to check a condition in my kentico macro which requires recognizing the previous page from which I navigated to the current page. Is there away to do that ?

Recent Answers


Peter Mogilnitski answered on August 17, 2017 19:59 (last edited on August 17, 2017 20:06)

You are talking about page referrer i.e. {% CurrentBrowser.UrlReferrer %}

so for example: {% if (CurrentBrowser.UrlReferrer.Contains("ABC")) { do something here... }%}

1 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on August 20, 2017 15:53

The UrlReferrer is only populated when the visitor comes from another site. In my experience, will not keep track the pages when the visitor is aleady on the site.

1 votesVote for this answer Mark as a Correct answer

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