Quote:
Originally Posted by Laurens
If you're interested, you can also look at the link rewriting feature available through scripting. This lets you change links on-the-fly so that they point to printable versions of articles. Scripting is much simpler than XSLT and it's also documented(open "Help Contents" from within Sunrise). There are several example SDLs in the distribution that use link rewriting, including NY Times and Brighthand.
|
Ok, I'm really excited now.
I need to combine two script instructions, append and replace. How do I do that?
I.e. I need to change links of this type:
http://www.xxxxx.com/aaa/bbb/ccc/
Into this:
http://www.xxxxx.com/ddd/print.asp?hand=6&page=../aaa/bbb/ccc/default.html
what about this:
Code:
document.onanchorlink = function(link) {
link.uri = link.uri.replace("http://www.xxxxx.com/aaa/bbb/ccc/", "http://www.xxxxx.com/ddd/print.asp?hand=6&page=../aaa/bbb/ccc/");
link.uri += "default.html";
};
I doesn't work, but maybe my fault is somewhere else.