OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



could not find the template for article html view

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.

could not find the template for article html view

Postby newbies » Tue Feb 04, 2014 12:56 am

I want to add DOI number to article HTML galley view page (immediate after the main content div tag), but could not find the template. In the article folder, there is no "view.tpl" file. modifying article.tpl file has no effect.

Any idea?
newbies
 
Posts: 84
Joined: Sat Feb 23, 2013 9:15 pm

Re: could not find the template for article html view

Postby asmecher » Tue Feb 04, 2014 9:30 am

Hi newbies,

The proper template is templates/article/article.tpl; if modifying it has no effect, check to make sure that your file permissions are correct in cache/t_compile. If the compiled templates cannot be administered by OJS, then your modified template will never be recompiled.

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

Re: could not find the template for article html view

Postby newbies » Tue Feb 04, 2014 10:00 am

Thank you Alec. That works.

The problem was caused by the fact that the following code used to retrieve doi does not show anything on html full text view page, although what I did is just move the code from the bottom to the top in the article.tpl file.

Code: Select all
{foreach from=$pubIdPlugins item=pubIdPlugin}
   {if $issue->getPublished()}
      {assign var=pubId value=$pubIdPlugin->getPubId($pubObject)}
   {else}
      {assign var=pubId value=$pubIdPlugin->getPubId($pubObject, true)}{* Preview rather than assign a pubId *}
   {/if}
   {if $pubId}      
      <br />
      {$pubIdPlugin->getPubIdDisplayType()|escape}: {if $pubIdPlugin->getResolvingURL($currentJournal->getId(), $pubId)|escape}<a id="pub-id::{$pubIdPlugin->getPubIdType()|escape}" href="{$pubIdPlugin->getResolvingURL($currentJournal->getId(), $pubId)|escape}">{$pubIdPlugin->getResolvingURL($currentJournal->getId(), $pubId)|escape}</a>{else}{$pubId|escape}{/if}
   {/if}
{/foreach}
newbies
 
Posts: 84
Joined: Sat Feb 23, 2013 9:15 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot], Google [Bot] and 3 guests

cron