Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Dan 1288 posts 3921 karma points c-trib
    Feb 04, 2010 @ 16:20
    Dan
    0

    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

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Feb 04, 2010 @ 16:28
    Sebastiaan Janssen
    1

    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();

  • Dan 1288 posts 3921 karma points c-trib
    Feb 04, 2010 @ 17:09
    Dan
    0

    Okay, thanks Sebastian.  I'll stick with the javascript then.

  • Darren Ferguson 1022 posts 3259 karma points MVP c-trib
    Feb 04, 2010 @ 18:02
    Darren Ferguson
    0

    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.

Please Sign in or register to post replies

Write your reply to:

Draft