How to display a class name of the current journal in the body tag?

Is there a way to get a sanitize version of the journal name as a class in the body tag of a theme (OJS version 3.0.1) ?

I would like to get something like the journal name in the url :

to put it the the header.tpl theme.


Hi @nathanluman,

The journal path (the part you see in the URL) might make a good candidate. You can get it, supporting also site-wide pages that don’t have one, using e.g.:

{if $currentJournal}{$currentJournal->getPath()|escape}{else}index{/if}

Alec Smecher
Public Knowledge Project Team