OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



toc title as link to html

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.

toc title as link to html

Postby jmir » Wed May 02, 2007 6:03 am

In a slight modification of the original question in this thread, we would like to have the article title in the TOCs link to the HTML version of the article. Amazingly, the tiny HTML link on the right hand side is often overlooked by the user who then asks us how to get the articles...
What would we have to modify to have the article title link to the HTML?
jmir
 
Posts: 74
Joined: Mon Feb 26, 2007 12:16 am

Postby asmecher » Wed May 02, 2007 11:00 am

Hi Gunther,

There's a thread about this at http://pkp.sfu.ca/support/forum/viewtopic.php?t=1414.

Regards,
Alec Smecher
Open Journal Systems Team
---
Don't miss the First International PKP Scholarly Publishing Conference
July 11 - 13, 2007, Vancouver, BC, Canada
http://ocs.sfu.ca/pkp2007/
asmecher
 
Posts: 8617
Joined: Wed Aug 10, 2005 12:56 pm

Postby jmir » Wed May 02, 2007 11:49 am

thanks - this message was actually intended to be a part of that thread, I must have clicked "new topic" accidentally instead of "post reply".
In any case, that thread (viewtopic.php?t=1414) answered the question of how to link to the PDF - how would the modifications look like if one wants to link to the HTML version? Sorry for asking presumably stupid questions..
Last edited by jmir on Thu May 03, 2007 7:45 pm, edited 1 time in total.
jmir
 
Posts: 74
Joined: Mon Feb 26, 2007 12:16 am

Postby asmecher » Wed May 02, 2007 3:09 pm

Hi Gunther,

This will take a little fine-tuning in the Smarty templates -- but you'll need to do something like this:
Code: Select all
{* Find the galley labeled "HTML" *}
{assign var="foundMainGalley" value=0}
{foreach from=$article->getGalleys() item=galley}
        {if $galley->getLabel() == "HTML"}
                {assign var="foundMainGalley" vlaue=1}
                {assign var="mainGalley" value=$galley}
        {/if}
{/foreach}
{if $foundMainGalley}
        {* Put the link to display the article's HTML here, e.g.: *}
        <a href="{url page="article" op="view" path=$article->getBestArticleId($currentJournal)|to_array:$mainGalley->getGalleyId()}" class="file">{$article->getArticleTitle()|escape}</a>
{else}
        {* The galley labeled "HTML" could not be found. Display the link to the abstract
           or various galleys (e.g. PDF) instead. *}
        Link display code goes here
{/if}
Regards,
Alec Smecher
Open Journal Systems Team
---
Don't miss the First International PKP Scholarly Publishing Conference
July 11 - 13, 2007, Vancouver, BC, Canada
http://ocs.sfu.ca/pkp2007/
asmecher
 
Posts: 8617
Joined: Wed Aug 10, 2005 12:56 pm

Postby jmir » Thu May 03, 2007 7:43 pm

Ah, now I get it.
Worked very well - thanks!!

(successful result can be seen at http://www.jmir.org/issue/current)
jmir
 
Posts: 74
Joined: Mon Feb 26, 2007 12:16 am


Return to OJS Technical Support

Who is online

Users browsing this forum: No registered users and 1 guest