Hi,
I am using ojs_3_1_1_4 with more than 100 journals.
I would like to lock only this 3 blockPlugins always on the same position.
I have some plugins with a particular order in my sidebar, do you know if can I lock this plugins in all my journals? Could be reserved or locked order ??
Can I insert my plugins hardcode ? on this file BlockPluginsListbuilderHandler ?
example:
{call_hook name="…"}
Besides manually making a correct order from a dashboard for every journal, all else that I can think of requires code modifications. The easiest way would be to change styling with applying flex box where you can order flex items, like
Those are simple CSS rules, they can be added, e.g., from a dashboard. If it’s possible, I would recommend avoiding any changes in core files for the sake of future support.
Regarding the mentioned handler, as far as I see it’s used for settings form, not for displaying blocks on the front-end.
Also, in OJS 3.1.1 you can manipulate by block plugin’s sequence from BlockPlugin class. Take a look here and here. But be aware that I cannot find these lines of code on the current master branch.
I would recommend that you just output the blocks exactly where you want directly in the template files in your theme. You can get all block plugins, check their class, and output their HTML like this:
$blockPlugins = PluginRegistry::getPlugins('blocks');
foreach ($blockPlugins as $blockPlugin) {
if (is_a($blockPlugin, ...)) {
echo $blockPlugin->getContents($templateMgr);
}
}
Hi @NateWr,
I am using ojs 3_1_1 and my theme is bootstrap3.
I created structure on my theme: ojs/plugins/themes/bootstrap3/templates/controllers/tab/settings/appearance/form/sidebar.tpl
Any change on this template it’s not loading.
I clean cached but it’s not working.
I can change code on this template and it’s working properly. ojs/lib/pkp/templates/controllers/tab/settings/appearance/form/sidebar.tpl
Do you know if I need to do something special when the templates are on lib/pkp ?? I dont’t think so, but I am not 100%
Do you know if I need to do something special when the templates are on lib/pkp ?? I dont’t think so, but I am not 100%
It should work fine, but it is possible that the template is called with a core: prefix that bypasses other templates. I’d recommend finding where in the code the sidebar.tpl template is being loaded.