Anchor links in archives

Hello there,

is it possible to add anchor links in the archive? We have some journals with quite a few volumes and people have to scroll a long way down. So it would be nice if there could be a shorter way.

Kind regards
Daniela

1 Like

If you mean for direct hyperlinking from an external source, id selectors can now be used as anchors. On the archives page, you should find ID attributes on each div containing an issue, named “issue-1234”.

Use this ID in your URL the same as the anchor names used to be used:
http:// mysite.tld / ojs / index.php / journalName / issue / archive #issue123

In general, I’d love to see IDs applied like liberally this across the product. If the same were done for <h3>s on this page, we could make a jumplist (which may have been your goal). The sections and articles in the Issue TOC could also benefit from this.

Thank you! But my goal was indeed a jumplist for every year or even for five year intervals. But I assume it’s pretty difficult to do if not impossible at this moment. But maybe there is a way for future OJS versions?

I don’t think the change would be particularly difficult, nor trivial either. The biggest question would be when to display the jumplist. Perhaps if the number years * average issues per year exceeded some value?

You would need to iterate through the published issues in IssueHandler::archive()

Assign the years to be created as a jumplist to an array, and pass the array as a Smarty variable.

Unfortunately, I don’t think you can reuse / reset the existing iterator to pass through the iteration twice, so I think it requires two iterator calls.

Thank you :slight_smile: I’ll show this my colleagues, maybe they include this.

Kind regards
Daniela