Template code overview

Hi all,
I’m building a OJS theme from scratch. I’m getting a lots of information from the default theme’s but I can’t seem to find a complete overview of the all the template codes? Is there a complete overview of all the template codes?

Thanks in advance!
Gr Bas


Hi @basD,

There is a theming guide: PKP Theming Guide
Plugin guide may also be helpful: Plugin Guide for OJS and OMP

Thanks for your quick response, @Vitaliy! I know the theming guide, that’s was great starting point for me. But now it doesn’t help ansering questions like how to call a theme option variable on the site indexpage where I list all the journals.
$journal->getOption('baseColour') // this doens't work.

I don’t think Journal class has getOption() method. $activeTheme variable is assigned to all front-end templates, I believe you can use it to get the theme options from the site index page.

Thanks @Vitaliy. Is there a place where I can find that information: what methods has $journal and what methods does $activeTheme have.

Only in the code. $journal variable is an object, instance of the Journal class, usually, this info can be found in the template’s docs e.g. here, but not in this case. I suggest then search for the Journal class and parent classes as well (Context)

Also there is getData() and getLocalizedData() getters, which allow to retrieve properties of an object, i.e., Journal/Context, Submission, Issue, Galley, Publication. You can find properties description in the schemas and lib/pkp/schemas folder.

As for $activeTheme, it’s an instance of the main theme class, which also inherits all method of the ThemePlugin class + parent theme methods if it’s a child theme

Thanks @Vitaliy! I will dive in to that.
Gr Bas