I have a question to all of you XSLT-gurus out there.
Somehow I'd like to know where the user comes from when they navigating in to one of my pages. What I'm trying to do is this:
When a user enters one of my pages called infopage, I need to show some information on that page. This information should be shown to all users - except user comming from one of my other pages called resultlist. Does this make sense at all to you?
The resultlist contains links to infopage. I know this could be done by sending a parametre in the url such as infopage?comesFrom=resultlist, and if the "comesFrom"-parametre was equal to "resultlist", I shouldn't show the information. But this is not an option.
I hope this makes sense, and that some of you guys have a clever suggestion on what to do.
But I have just found out that it's actually not that simple. Because on the infopage I have some different tabs, each with seperate url's like this: infopage/project, infopage/contact ect. When I click one of the tabs and then return to the infopage, the information still shouldn't be shown. But of cource the referer does not contain resultlist anymore, when the user comes from infopage/contact. I know that I could test for the referer containing contact, but this would then also be the case when the user is going directly from anywhere on the site, then into the infopage/contact and the to the infopage.
I think I'll give it an hour or so, and then see if I can come up a smart way of handling this. If some of you have a clever idea of handling it just say so :)
Depending on the sensitivity of the information (you know, do you need "military-level" security or are you just providing a "convenience layer" of exclusion) you might get away with a cookie that's set upon entry from the resultlist page, which lasts for the rest of the session?
I haven't actually used this in a production environment, only played with it... but how about enabling stats? (Setting "umbracoEnableStat" to true in Web.config).
The database table "umbracoStatEntry" has a few columns, EntryTime, RefNodeId and NodeId.
Could that be useful?
Otherwise, I'd be tempted to go with a custom tracking cookie, something simple that has a CSV of nodeIds visited.
Check to see if user comes from certain page
I have a question to all of you XSLT-gurus out there.
Somehow I'd like to know where the user comes from when they navigating in to one of my pages. What I'm trying to do is this:
When a user enters one of my pages called infopage, I need to show some information on that page. This information should be shown to all users - except user comming from one of my other pages called resultlist. Does this make sense at all to you?
The resultlist contains links to infopage. I know this could be done by sending a parametre in the url such as infopage?comesFrom=resultlist, and if the "comesFrom"-parametre was equal to "resultlist", I shouldn't show the information. But this is not an option.
I hope this makes sense, and that some of you guys have a clever suggestion on what to do.
Thanks in advance.
/Kim A
Hi Kim,
Have you tried using the HTTP_REFERER ServerVariable - seems to me that should be able to do the trick?
/Chriztian
Something like this:
/Chriztian
Yeah that would work Chriztian - thanks.
But I have just found out that it's actually not that simple. Because on the infopage I have some different tabs, each with seperate url's like this: infopage/project, infopage/contact ect. When I click one of the tabs and then return to the infopage, the information still shouldn't be shown. But of cource the referer does not contain resultlist anymore, when the user comes from infopage/contact. I know that I could test for the referer containing contact, but this would then also be the case when the user is going directly from anywhere on the site, then into the infopage/contact and the to the infopage.
I think I'll give it an hour or so, and then see if I can come up a smart way of handling this. If some of you have a clever idea of handling it just say so :)
/Kim A
Ah OK - the plot thickens :-)
Depending on the sensitivity of the information (you know, do you need "military-level" security or are you just providing a "convenience layer" of exclusion) you might get away with a cookie that's set upon entry from the resultlist page, which lasts for the rest of the session?
/Chriztian
I haven't actually used this in a production environment, only played with it... but how about enabling stats? (Setting "umbracoEnableStat" to true in Web.config).
The database table "umbracoStatEntry" has a few columns, EntryTime, RefNodeId and NodeId.
Could that be useful?
Otherwise, I'd be tempted to go with a custom tracking cookie, something simple that has a CSV of nodeIds visited.
Cheers, Lee.
is working on a reply...