Dynamic return links to galley viewer plugins

Hi @asmecher,

Do you think it would be possible to change the galley viewer plugins (like htmlGalley and pdfJsViewer) return links to something more dynamic. At the moment they are hardcoded to return to the article landing page, like here

The reason I am asking this is because I made a small preprint plugin for OJS3 (https://github.com/ajnyga/preprints) which basically enables publishing articles before the actual issue is released. However, the only problem is with the hardcoded return link. I use a custom handler to show the articles so the return link is basically pointing to the wrong place.

I know that you probably do not want to change these because of a single plugin, but on the other hand it would be nice to be able to return for example right back to the table of contents of an issue, if that is where you accessed the galley file origanally. Or even the front page.

Anyway, just a thought.

Hi @ajnyga,

Have you considered using something like a Smarty postfilter and looking for a.return and a.title? Those are the only two places the return URL is used, so it should be possible to rewrite those two anchors without much code.

Alec Smecher
Public Knowledge Project Team

Ok, thanks, I will see how that would work.