Is there any way to show the current table of content in a custom page?
or insert (smarty?) codes showing TOC in a .html field?
I am using OJS 2.4.8.0
Best wishes,
Romy
Is there any way to show the current table of content in a custom page?
or insert (smarty?) codes showing TOC in a .html field?
I am using OJS 2.4.8.0
Best wishes,
Romy
Hi @reprabowo,
No, unfortunately, thereâs no way to do that without making changes to OJS.
Regards,
Alec Smecher
Public Knowledge Project Team
Greetings @asmecher,
How can I create new custom page with smarty for OJS 3? After creation of tpl file what is the next step?
@Vitaliy, have you considered the static pages plugin?
Hi @ctgraham,
I think it would be better for me to build more complex page, than with tinymce. For example I want to assign classes and other attributes to divs, span
s etc. for implementing bootstrap design. It can be done also with jquery, but maybe it can be done with smarty?
I have already modified huge amount of frontend tpl files (with use of child-theme). Or it is too difficult task to create new smarty templates directly?
Itâs not a difficult task if you are familiar with PHP and Smarty and are comfortable making local changes to your code.
Generally, URLs map to a page handler under /pages/ where the URL corresponds to the directory name. The index.php file in that directory loads an appropriate handler, and the handler manages the code to display the template.
Consider, for example, the journal index page:
/ojs/index.php/journal/index maps to /pages/index/index.php:
All operations are sent to the index handler:
The index()
operation sets up and displays a template such as frontend/pages/indexJournal.tpl:
Thanks @ctgraham,
I don`t really know php, but already have some practice with smarty. I see that php syntax is similar with javascript (including OOP), which have already learned.
So after some practice, think would be capable for working with ojs3 php code.
Hi,
At University of Bordeaux, we made some significant changes to OJS2.
We added custom pages with 2 ways. By using the Static Page plugin, when the custom page is built by the editor secretary. And by creating new templates files (tpl) when we needed to use some functions or variables provided by OJS to dispay dynamic informations.
To do that, we created for example for the âAboutâ menu, a new template named âfocusScopeub.tplâ which displays only the content of the paragraphe â2.1 Focus and Scope of Journalâ of setup 2 of the manager (/manager/setup/2). In the file âpages/about/AboutHandler.inc.phpâ, we added a function named âfocusScopeâ which calls the template âabout/focusScopeub.tplâ. And in the file âpages/about/index.phpâ, we added in the âswitch($op) {â part the following code: âcase âfocusScopeâ:â We can see this custom page at the following URL: http://<journal.eu>/about/focusScope.
This works fine, but we had to modify the source code of OJS, which does not allow us to do updates of OJS new versions.
Now, we are preparing migration to OJS3. And I was wondering if in OJS3 there is a way to do the same thing but in a custom way without modify original source files.
Thanks in adavance for your answer.
Best Regards.
Helene
Hi @hcl,
We use a mix of approaches with our own hosting services:
Regards,
Alec Smecher
Public Knowledge Project Team