Use current theme to display article?

Hi folks,

We’re looking to make our HTML versions of our articles a bit more presentable. I’m wondering if there is a way to allow the article html from the galley to be formatted in the same way as the rest of the journal’s theme.

We have tried the HTML reader … and that prevents the need to download the HTML… but it doesn’t format the page as the rest of the journal structure is formatted. Is there a built-in way to do this?

Best regards, +A

Hi @AndrewGearhart,

One option would be to upload an HTML stylesheet that matches the rest of your journal. These would need to be uploaded as dependent files to the HTML upload.

image

Kind Regards,
Patricia M.
Public Knowledge Project Team

@pmangahis, thanks for the idea. While this is possible … changes in the “parent” theme would require changes in the dependent files of thousands of articles. Trying to avoid that…

Hi @AndrewGearhart,

If you mean header and footer, unfortunately Default theme end other official themes don’t support it. The easiest way would be probably creating a child theme and overriding HTML galley display template file. Implementation will require knowledge of Smarty templates, Javascript/PHP. Also it may require some additional styling with CSS.

Could we do something to leverage the same tool that is generating the page for the static page content?

Static pages are handled differently. HTML galleys are managed by HTML Article Galley Plugin and the code that displays them on the front-end is here: https://github.com/pkp/ojs/blob/master/plugins/generic/htmlArticleGalley/templates/display.tpl
It doesn’t load header and footer by default. HTML galley is displayed in an iframe. There is an initial discussion here: Resolve HTML publishing issues · Issue #1825 · pkp/pkp-lib · GitHub. The default behavior could be overridden programmatically by creating a child theme and creating a new HTML galley display file.

One of the options could be JATS XML centered workflow and displaying articles with JATS Parser Plugin, although it is compatible only with the Classic, Immersion, and Health Sciences theme. Example of integration with the former theme: http://ojsdemo.e-medjournal.com/index.php/jatsparser/article/view/8/8. It’s still work in progress, e.g. it doesn’t support formulas and won’t work correctly with the Default theme. Although, as you said, it would be unrealistic to adopt it retrospectively for thousands of already published articles.