OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



MainPage - Alternate Header (OJS 2.2.2)

OJS development discussion, enhancement requests, third-party patches and plug-ins.

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

Forum rules
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.

MainPage - Alternate Header (OJS 2.2.2)

Postby hekutoru2kx » Tue Sep 07, 2010 2:12 pm

Hi everyone! It's me again :P

This time I want to know how can I use the 'alternate header' (title and logo) option for the main page. I know it works perfectly for the journals, but I couldn't find how to do it in the main page.

I want to know what should I modify for this option and where could I put the HTML content for it.

Note:
I want to change the image banner to adapt it according to the user resolution. So I want to use a script for it, that's why i need the alternate content.
hekutoru2kx
 
Posts: 71
Joined: Wed Jul 28, 2010 12:47 pm

Re: MainPage - Alternate Header (OJS 2.2.2)

Postby jmacgreg » Wed Sep 08, 2010 3:03 pm

Hi hekutoru2kx,

There currently isn't the option to upload an alternate site-level header via the user interface; you'll have to add it manually to a template file. However, if you are only publishing one journal, you can set the site to automatically redirect to that journal whenever a user goes to the site level -- see Site Admin -> Site Settings -> Journal Redirect.

Cheers,
James
jmacgreg
 
Posts: 4191
Joined: Tue Feb 14, 2006 10:50 am

Re: MainPage - Alternate Header (OJS 2.2.2)

Postby hekutoru2kx » Thu Sep 09, 2010 1:41 pm

I thought about redirecting it too, but we are handling 13 different journals :P so is not an option :).

Can you point me wich template should i creadte/modify to do this? (where do the main header call is?)

Thx again James, you are a lifesaver
hekutoru2kx
 
Posts: 71
Joined: Wed Jul 28, 2010 12:47 pm

Re: MainPage - Alternate Header (OJS 2.2.2)

Postby jmacgreg » Mon Sep 13, 2010 8:25 pm

Hi hekutoru2kx,

Not a problem -- happy to be of service! In OJS 2.2.2, I believe the template file is templates/common/header.tpl (it's lib/pkp/templates/common/header.tpl in OJS 2.3+.) You'll want to modify the text that displays everything between

Code: Select all
<div id="header">
<div id="headerTitle">
...
...
</div>
</div>


I don't have a copy of 2.2.2 handy here, so the code may be slightly different, but essentially you want to say that if there's a logo defined, display it; if there's a title defined, display it; otherwise, display "x" as a default. You can add whatever "x" is directly to the template file as HTML if you want, or you can add it to a locale file etc. Take a look, and let us know if you have any specific questions. The Smarty web site will probably be a good source of information on how to work with the templates as well.

Cheers,
James
jmacgreg
 
Posts: 4191
Joined: Tue Feb 14, 2006 10:50 am

Re: MainPage - Alternate Header (OJS 2.2.2)

Postby hekutoru2kx » Wed Sep 15, 2010 12:27 pm

Thx James, I'll look into the smarty pages, because if I change something there it'll be for all the journals :P not just the main page :S... jeje...
hekutoru2kx
 
Posts: 71
Joined: Wed Jul 28, 2010 12:47 pm


Return to OJS Development

Who is online

Users browsing this forum: Google [Bot] and 1 guest