Is it possible to create a 'back to previous page' link in xslt? I have some article pages which are found by links on a homepage and on an article list page and I'd like the user to be able to go back to wherever it was they came from.
Or would it just save a massive headache to do it with javascript instead?
XSLT really is just meant to be a templating language. This kind of logic could go in an XSLT extension, or indeed you could just use javacript:history.back();
Otherwise: when you link to an article pass the current page URL as a parameter - and just output that parameter for your backlink.
Caveat - this is open to abuse third parties linking to your site could make your bank links link to anything. The code should be smart enough to only output backlinks within your own domain.
Create back link in xslt
Hi,
Is it possible to create a 'back to previous page' link in xslt? I have some article pages which are found by links on a homepage and on an article list page and I'd like the user to be able to go back to wherever it was they came from.
Or would it just save a massive headache to do it with javascript instead?
Thanks
XSLT really is just meant to be a templating language. This kind of logic could go in an XSLT extension, or indeed you could just use javacript:history.back();
Okay, thanks Sebastian. I'll stick with the javascript then.
Otherwise: when you link to an article pass the current page URL as a parameter - and just output that parameter for your backlink.
Caveat - this is open to abuse third parties linking to your site could make your bank links link to anything. The code should be smart enough to only output backlinks within your own domain.
is working on a reply...