[OJS 3] Add dropdown with list of journals on journal page

Hello all,
I have a child theme based on the great bootstrap 3 theme and I’m asked to add a dropdown allowing to jump from a journal to another without going back to the main index page.

Is there a way, without touching the core, to get the journals list from a journal page?

Thanks for your insight!

You can pass any kind of data using a child plugin: https://pkp.gitbooks.io/pkp-theming-guide/content/en/advanced-custom-data.html

Here is how the site frontpage listing is fetched: https://github.com/pkp/ojs/blob/master/pages/index/IndexHandler.inc.php#L88-L89

And here it is iterated in the site template: https://github.com/pkp/ojs/blob/master/templates/frontend/pages/indexSite.tpl#L29

You just need to fetch the same data in the child theme, pass the data to the template and then iterate through the data. The difference of course is that you will iterate the data inside a select and of course need some javascript to jump to the selected url.

@ajnyga thanks for the well chosen pointers. I got it to work in no time!
I won’t need any additional javascript since Bootstrap’s dropdown uses regular links.

1 Like