I am trying to modify the HealthScience Theme. I want to visualize the cover images of each article also in the volume summary page, not just in the article page itself.
I am modifying the article_summary.tpl
with that code (changed from the article_details.tpl
):
<div class="article-summary">
{* Article cover image *}
{if $article->getLocalizedData('coverImage')|escape}
<div class="article-summary-cover">
{assign var="coverImage" value=$article->getLocalizedData('coverImage')|escape}
<img
class="img-fluid"
src="{$article->getLocalizedCoverImageUrl($article->getData('contextId'))|escape}"
alt="{$coverImage.altText|escape|default:''}"
>
</div>
{/if}
**rest of the code**
It doesn’t visualize anything.
The problem is that the article_details uses $publication, while this element is not present in summary_articles. I don’t think that using $publication would be right here. Any suggestions?