OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Redirect Homepage to Current ToC

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
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.

Redirect Homepage to Current ToC

Postby justalewis » Sun Oct 27, 2013 9:56 pm

Hi,

Long time lurker, (almost) first time poster. :D

I want to change the default landing page from the "Home" page (http://www.licsjournal.org/OJS/index.php/LiCS/index) to the current issue page ToC (http://www.licsjournal.org/OJS/index.ph ... nt/showToc). I realize that the homepage includes the issue cover and a link to the ToC; however, the folks I'm working with really want visitors to land on the current issue ToC when they first arrive at the site. Is there a simple way to do this (beyond directing the index.html at the root to the current ToC page)?

Thank you so much for reading and any replies. I've searched for this question a lot to no avail. If I've simply missed it, feel free to scold me and send me on my way. :wink:

justin
justalewis
 
Posts: 9
Joined: Sun Oct 27, 2013 9:45 pm

Re: Redirect Homepage to Current ToC

Postby JasonNugent » Mon Oct 28, 2013 9:34 am

Hi Justin,

You'd need to make a small change to pages/index/IndexHandler.inc.php. That file has an index() method that either displays the root of a journal installation, or the main page for your OJS installation as a whole. You'd need to modify the if ($journal) { .... } part to something like:

Code: Select all
 $request->redirect(null, 'issue', 'current', 'showToc');


Instead of the line which displays the index/journal.tpl template. I'm not sure what version of OJS you're using so I can't be specific with a line number.

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

Re: Redirect Homepage to Current ToC

Postby justalewis » Mon Oct 28, 2013 12:07 pm

Hi Jason,

This worked magnificently! For reference for others, I am using OJS 2.4.2.0. The bit of code that needed changed in pages/index/IndexHandler.inc.php was on line 76. Replaced
Code: Select all
$templateMgr->display(index/journal.tpl');
with
Code: Select all
$request->redirect(null, 'issue', 'current', 'showToc');
and everything was good.

Thanks so much for the prompt response! :mrgreen:

justin
justalewis
 
Posts: 9
Joined: Sun Oct 27, 2013 9:45 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests

cron