I’ve read the documentation but I’m not sure I understand the complete picture of what I need to do.
Currently, my site is using the bootstrap template.
I want to create a child template to override the header.
First question, is this the template I’m suppose to override?
/plugins/themes/bootstrap3/templates/frontend/components/header.tpl
From what I read, I simply create a corresponding template. Does that mean I would create a file such as?
/plugins/themes/mychildtemplates/templates/frontend/components/header.tpl
According to this doc: https://pkp.gitbooks.io/pkp-theming-guide/content/en/child-themes.html
I’m supposed to create this php file. Where does this go?
Also, what do I put in the call to
$this->setParent(’???’)
I’m not override the “defaultthemeplugin”. I’m overriding the bootstrap plugin, so where do I find this parent name?
First question, is this the template I’m suppose to override? /plugins/themes/bootstrap3/templates/frontend/components/header.tpl
Yes.
From what I read, I simply create a corresponding template. Does that mean I would create a file such as? /plugins/themes/mychildtemplates/templates/frontend/components/header.tpl
Check out the Theme Setup & Configuration section for details on all the other files you need to get your theme going as a plugin.
Also, what do I put in the call to
$this->setParent(‘???’)
I’m not override the “defaultthemeplugin”. I’m overriding the bootstrap plugin, so where do I find this parent name?
This should match the class name in the version.xml file, except in all lower-case letters: bootstrapthreethemeplugin.
Yes, you should be able to enable the theme for selection by going to the Settings > Website > Plugins page, finding the theme plugin and making sure it’s enabled there.
Then you can select it as the active theme for a journal by going to Settings > Website > Appearance, finding the Theme option and setting it to your theme.
I’ve enabled it in the Plugins and got a pop-up saying it’s enabled.
(Currently, Default Theme and my custom theme are enabled. The Bootstrap 3 Base Theme is not checked actually.)
But under Settings > Website > Appearance, only the Bootstrap 3 Base Theme and Default Theme are available from the Theme dropdown.
I’m not sure why my custom theme (called Jair Theme) is not available under the drop down (but the Bootstrap 3 Base Theme is even though it’s not checked in the Plugins page)
I’d recommend checking the version.xml file and other things to make sure the configuration is set up properly. If you can share a repository with your theme’s code, I’m happy to take a look.
That suggests you’ve got a fatal error in your theme code. You’ll need to investigate your server’s error log, find the error message, and figure out where your code is breaking. You should always be working on a development version of your site, as it’s quite common to have errors and you don’t want to be debugging them as you go on the live site.
Hi @inferlinkdev, James from PKP|PS here. You won’t be able to access the error log without sudo access, so what I’ve done instead to help is switch the “display_errors” parameter to “On” in your config.inc.php file. You’ll want to switch this to “Off” prior to launch. This will output any errors to the screen. What you see now is:
Fatal error: Call to undefined function setParent() in /mnt/u2/var/www/journals/jair/plugins/themes/jair/JairThemePlugin.inc.php on line 10
That should be enough to point you in the right direction, but just let us know if you have any follow-up questions. You can query the PS support team directly at pkp.contact@gmail.com for sensitive or technical issues (the forum is probably still the best place for theme-related queries though).