Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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