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

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: 895
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: Bing [Bot], Yahoo [Bot] and 3 guests