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
Developer Resources:

Documentation: The OJS Technical Reference and the OJS API Reference are both available from the OJS Documentation page.

Git: You can access our public Git Repository here. Comprehensive Git usage instructions are available on the wiki.

Bugzilla: You can access our Bugzilla report tracker here.

Search: You can use our Google Custom Search to search across our main website, the support forum, and Bugzilla.

Questions and discussion are welcome, but if you have a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a technical support question, try the OJS Technical Support subforum.

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: 4190
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: 4190
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: Baidu [Spider] and 3 guests