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

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: 87
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: 10015
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: 87
Joined: Sat Feb 23, 2013 9:15 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: Google [Bot] and 1 guest