With that I can start making a new template structure.
The thing is: Where are the files or commands for displaying things on the part. I.E the home page?
I’ve just started to work again in this. I’ve managed to get responsiveness working in my OJS deployment using Zurb Foundation’s grid system (I did a custom install only with the grid).
I had to delete a lot of the initial CSS ( sorry for that ).
I think I’ll post the modified code into Github for you to see in the next days. I have some questions:
Can you tell me what technology is behind the template system?
Why is sometimes 2 files with the same name? (e.g: common.css)
Why there is two templates folder? /ojs/lib/pkp/templates/ and /ojs/templates ? (When I wanted to modify the navbar I founded the other folder lol)
And last but not least: Is it going to be a big difference with v3.0 in this (templates) matter? I haven’t downloaded it yet. to be honest this is the first time I install this system. I’m telling this because maybe I could be doing this thinking more foward.
Thanks again guys
Edit
Im trying to understand the rendering process of firstly: the homepage; all the files involved.
Maybe there is a manual somewhere? Are you using Smarty? v2? v3?
Edit2:
Ok, now Im starting to get this.
There is a core package for templates used in all PKP projects. There are two template folders because the second one is used in the deployment of the specific package (OJS in this case, and because of it, for example, the navbar, gets its separate file from the core 'cause it differs from the other projects.
Im still a little lost about the whole structure and how it works,
Files in ojs > lib > pkp > templates are like the bones. Usually you can focus on files stored in lib > pkp > templates > common. There you can modify your header, your footer, etc.
Then you have the ojs > templates folder. Most of tese .tpl files are blocks of content displayed inside the main content on pages. From my experience, the best way to keep track of your changes and not work so much when upgrading is the one indicated by Alec here: Multiple templates directories - #3 by andymp
This way you’ll have a separate directory where you can store all your modified .tpl files. I was upgrading our installation from 2.4.2 to 2.4.6. so I’ve already done this and it’s pretty easy. You can see the final result and the link to GitHub in this post: OJS 2.4.6 + BS + FontAwesome + Google Fonts + 2 plugins
I can help you to replicate this I you want.
Homepage rendering process: roughly it works this way. Take a look at templates > index > site.tpl. In this file, you have two lines of codes
line 15: {include file=“common/header.tpl”}
line 55: {include file=“common/footer.tpl”}
So when you visit your homepage (if there’s more than 1 journal) site.tpl is loaded and it calls lib > pkp > templates > common > header.tpl and footer.tpl, whose content is included.
And maybe the most important thing. As far as I know OJS 3.0 template handling is completely different, much easier to customize and mantain in future upgrades. Haven’t tried yet because I was upgrading but now I’m going to start with OJS 3.0 tests. So maybe it’s a better option if you want to fully modify OJS, even if it’s a development release. It’s up to you.
Hi arielnoname
I had a look at your http://revistamutatismutandis.com/ installation (which looks really good!) and was wondering if you could help me with two things:
How did you make the sidebar go under the content in mobile mode (whatever I tried has failed and the sidebar is always above the content, so I have disabled it with css in smaller screens)
How did you create the responsive menu.
I would really appreciate any help if you could spare the time.
Both questions relays in the same answer. I used a Foundation CSS Framework. (v5).
I did it some months ago, so I can’t remember which files I edited quite well, but with the answer from @andymp I think you can find all the files you need.