OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Different layout for frontend and backend

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

Different layout for frontend and backend

Postby newbies » Wed Nov 06, 2013 1:24 am

My journal site viewable to the public is 980px in width, but this width is not wide enough for many components (e.g. citation editor) in the backend. So I wish to use full width (100%) for all backend pages which are seen by authors, editors, ect. after login. I just wonder how easy is it to implement this. Is modifying templates enough to achieve this?
newbies
 
Posts: 52
Joined: Sat Feb 23, 2013 9:15 pm

Re: Different layout for frontend and backend

Postby JasonNugent » Wed Nov 06, 2013 7:07 am

Hi newbies,

Since all pages in OJS share the same common header and footer templates, you'd need to do some fairly serious hacking in there to override the CSS based on the current page. To do it cleanly, you'd probably want to go into the various page handlers (the PHP code) and set some new template variables that would only exist within the editor interface. So, probably the sectionEditor/, manager/, reviewer/, workflow/ pages (for example). You could test for those variables in the Smarty templates and modify your design accordingly.

Alternatively, write a plugin that Hooks into some of the request or template manager calls so you can examine the page or the current op and maybe load a custom style sheet that makes the changes you want. That way you could leave the rest of OJS' handlers unmodified.

Just a few ideas.

Regards,
Jason
JasonNugent
Site Admin
 
Posts: 791
Joined: Tue Jan 10, 2006 6:20 am

Re: Different layout for frontend and backend

Postby newbies » Wed Nov 06, 2013 9:05 am

Hi Jason,

Thank you for the reply. That sounds like a formidable task to me. I thought you can just modify the line such as include file="common/header.tpl" in certain templates to load a different "header.tpl" (for example hearder2.tpl).

In that case, I would suggest the in future upgrade, OJS developers separate front and backend templates. This is common for many other journal systems.
newbies
 
Posts: 52
Joined: Sat Feb 23, 2013 9:15 pm

Re: Different layout for frontend and backend

Postby newbies » Wed Nov 06, 2013 11:28 am

haha, I accomplished what I wanted by just modifying templates. I included a different header.tpl file in certain templates, and then created the new header.tpl file. That is it.
newbies
 
Posts: 52
Joined: Sat Feb 23, 2013 9:15 pm

Re: Different layout for frontend and backend

Postby beuseful » Thu Nov 07, 2013 1:20 am

That sounds interesting, but what happens if you upgrade OJS to a newer version, do you have to modify the templates again?
beuseful
 
Posts: 8
Joined: Mon Jan 14, 2013 8:36 am

Re: Different layout for frontend and backend

Postby JasonNugent » Thu Nov 07, 2013 6:59 am

Yes, you would.

Regards,
Jason
JasonNugent
Site Admin
 
Posts: 791
Joined: Tue Jan 10, 2006 6:20 am

Re: Different layout for frontend and backend

Postby newbies » Fri Nov 08, 2013 10:49 am

I think future upgrade of OJS should consider different layouts for frontend and backend because many journals do not use 100% page width for frontend but full page width is good for online submission system.
newbies
 
Posts: 52
Joined: Sat Feb 23, 2013 9:15 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: No registered users and 8 guests