Skip to content

Instantly share code, notes, and snippets.

@GrazingScientist
Created January 19, 2018 10:24
Show Gist options
  • Save GrazingScientist/e25e17a6fe2e1495367fc00e3d42f1e6 to your computer and use it in GitHub Desktop.
Save GrazingScientist/e25e17a6fe2e1495367fc00e3d42f1e6 to your computer and use it in GitHub Desktop.
OJS 3 - Include page number on article page
### The middle block is the interesting part, the top and the bottom block should already be present. I recommend to create a child theme and manipulate this. ###
[...]
{* Issue article appears in *}
<div class="item issue">
<div class="sub_item">
<div class="label">
{translate key="issue.issue"}
</div>
<div class="value">
<a class="title" href="{url page="issue" op="view" path=$issue->getBestIssueId()}">
{$issue->getIssueIdentification()}
</a>
</div>
</div>
{* Page numbers for this article *}
{if $article->getPages()}
<div class="sub_item">
<div class="label">
{translate key="article.pages"}
</div>
<div class="value">
{$article->getPages()|escape}
</div>
</div>
{/if}
{if $section}
<div class="sub_item">
<div class="label">
{translate key="section.section"}
</div>
<div class="value">
{$section->getLocalizedTitle()|escape}
</div>
</div>
{/if}
</div>
[...]
### Simply copy this anywhere in the file. But if you want to be consistent, copy it to the section with all the article-related translations. Simply replace "pages" by you prefered translation. ###
<message key="article.pages">Pages</message>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment