Hi, I’m new to the forum and I have a problem; I haven’t been able to show the latest issue (current) with its respective articles. I know the default template has this feature, but the site I’m working on uses the oldGregg theme, which doesn’t show the current issue in detail, and cannot be changed.
I grafted the code that makes it happen in the original indexJournal.tpl into the oldGregg indexJournal.tpl, with mixed results.
here’s the code:
{* Latest issue *}
{if $issue}
<div class="current_issue">
<h2>
{translate key="journal.currentIssue"}
</h2>
<div class="current_issue_title">
{$issue->getIssueIdentification()|strip_unsafe_html}
</div>
{include file="frontend/objects/issue_toc.tpl"}
<a href="{url router=$smarty.const.ROUTE_PAGE page="issue" op="archive"}" class="read_more">
{translate key="journal.viewAllIssues"}
</a>
</div>
{/if}
it does show the issue name and publication date, but fails to show its associated articles; I get a fatal PHP error:
PHP Fatal error: Cannot use object of type PublishedArticle as array in /home/revistaestudiosh/public_html/ojs/cache/t_compile/6267f877acd9b945f8a07db7bb24329a969a952a^%%DD^DDF^DDF03D78%%issue_toc.tpl.php on line 87
I tracked down the file and got down to line 87:
and I don’t know what to make of it.
I know the issue arises whenever the line {include file=“frontend/objects/issue_toc.tpl”} is called. If I remove said line, the error goes away. But this same line works fine because it feeds the /issue/current/ page.
I don’t know how to solve this problem because of my limited PHP/Smarty knowledge.
If you need more files I will provide them.
Any help will be much appreciated. Thank you in advance.