OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



How to display the TOC of several issuses in homepage?

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.

How to display the TOC of several issuses in homepage?

Postby yaliang » Tue Aug 07, 2007 6:11 am

Dear Friends,

Currently, we are ready to release the second issue of our journal with OJS v2.1.1. While previewing the issue on a testing PC, it was found that only the TOC(Table of Contents) of the current issue was shown in the Homepage. The back issue was archived and could be accessed from the Archives link under the header bar.
Is it possible to accumulate and show the TOC of several issues in the Homepage? I have duplicated and renamed the template files (view_homepage.tpl, issue_homepage.tpl) included in the journal.tpl file. How can I do to make a {foreach} loop to plot the contents in issue_homepage.tpl? Please give me your suggestions. Thank you very much.

Kind Regards,

Yaliang
yaliang
 
Posts: 82
Joined: Tue Jul 11, 2006 1:11 am

Re: How to display the TOC of several issuses in homepage?

Postby asmecher » Tue Aug 07, 2007 9:03 am

Hi yaliang,

The code to configure and display the journal homepage template, templates/index/journal.tpl, is in pages/index/IndexHandler.inc.php in the "index" function. You'll have to modify that function to provide the template with all the issue objects. You can find an example of similar code in pages/issue/IssueHandler.inc.php in the "archive" function, which is used to display the list of back-issues on the Archive page. Then you'll need to modify templates/index/journal.tpl to display a list of TOCs rather than a single one. You can find the code to iterate through the list of issues in templates/issue/archive.tpl; combining this with the code to display a single TOC (already in templates/index/journal.tpl) should give you what you want.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8591
Joined: Wed Aug 10, 2005 12:56 pm

Re: How to display the TOC of several issuses in homepage?

Postby yaliang » Tue Aug 07, 2007 9:51 am

Dear Alec,

Thanks for your explanations. The Archives page seems to be the starting point to realize our idea. If I can display the TOC of multiple issues on that page, it will be able to plot them on the homepage.
I have successfully imported the descriptions of each issue (view.tpl) on the Archives page, but failed to show the titles of section and article (issue.tpl). Do you have any hint or suggestion for solving this problem?

Yaliang
yaliang
 
Posts: 82
Joined: Tue Jul 11, 2006 1:11 am

Re: How to display the TOC of several issuses in homepage?

Postby asmecher » Tue Aug 07, 2007 10:16 am

Hi yaliang,

I can only provide limited help with this kind of customization, but here's what I'd suggest: the current templates/issue/issue.tpl template, which is responsible for displaying a TOC, expects a variable called $publishedArticles from which it gets most of its data. Look at how the variable is assigned in pages/issue/IssueHandler.inc.php; you'll need to do something similar for each issue you want to display the TOC of. I'd suggest creating an array to contain this information for each issue, and then loop through each entry and assign it to the variable named $publishedArticles, importing templates/issue/issue.tpl for each iteration. You can create the array in PHP and then do all the looping etc. in templates.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8591
Joined: Wed Aug 10, 2005 12:56 pm

Re: How to display the TOC of several issuses in homepage?

Postby yaliang » Tue Aug 07, 2007 10:23 am

Dear Alec,

Thanks for your suggestions.

Yaliang
yaliang
 
Posts: 82
Joined: Tue Jul 11, 2006 1:11 am

Re: How to display the TOC of several issuses in homepage?

Postby ramon » Thu Aug 09, 2007 10:41 am

Alec,

Many journals, specially in Brazil, publish "special" issues that are simultaneous.
They'll have a regular issue and a thematic issue, for example.

Of course, there are ways to give access to either through announcements or other tools already provided by OJS, but not with the "required" attention.

However, enabling the system to publish simultaneous issues may be an interesting feature...
ramon
 
Posts: 929
Joined: Wed Oct 15, 2003 6:15 am
Location: Brasí­lia/DF - Brasil

Re: How to display the TOC of several issuses in homepage?

Postby asmecher » Thu Aug 09, 2007 11:00 am

Hi all,

Good point. For the moment, I'd suggest customizing the install or using the homepage content HTML field in Journal Setup step 5 to link to the appropriate issues; however, a bit of code to display multiple issue TOCs might make a good plugin.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8591
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 4 guests