diff --git a/pages/article/ArticleHandler.php b/pages/article/ArticleHandler.php
index a610127c0d7..6b11528b9bd 100644
--- a/pages/article/ArticleHandler.php
+++ b/pages/article/ArticleHandler.php
@@ -302,6 +302,9 @@ public function view($args, $request)
]);
}
+ $rorIconPath = Core::getBaseDir() . '/' . PKP_LIB_PATH . '/templates/images/ror.svg';
+ $rorIdIcon = file_exists($rorIconPath) ? file_get_contents($rorIconPath) : '';
+
// Assign deprecated values to the template manager for
// compatibility with older themes
$templateMgr->assign([
@@ -313,6 +316,7 @@ public function view($args, $request)
'keywords' => $publication->getData('keywords'),
'orcidIcon' => OrcidManager::getIcon(),
'orcidUnauthenticatedIcon' => OrcidManager::getUnauthenticatedIcon(),
+ 'rorIdIcon' => $rorIdIcon
]);
// Fetch and assign the galley to the template
@@ -362,10 +366,6 @@ public function view($args, $request)
$templateMgr->assign('purchaseArticleEnabled', true);
}
- $rorIconPath = Core::getBaseDir() . '/' . PKP_LIB_PATH . '/templates/images/ror.svg';
- $rorIdIcon = file_exists($rorIconPath) ? file_get_contents($rorIconPath) : '';
- $templateMgr->assign('rorIdIcon', $rorIdIcon);
-
if (!Hook::call('ArticleHandler::view', [&$request, &$issue, &$article, $publication])) {
$templateMgr->display('frontend/pages/article.tpl');
event(new UsageEvent(Application::ASSOC_TYPE_SUBMISSION, $context, $article, null, null, $this->issue));
diff --git a/templates/frontend/objects/article_details.tpl b/templates/frontend/objects/article_details.tpl
index 1553d5cbc70..23d3228a73e 100755
--- a/templates/frontend/objects/article_details.tpl
+++ b/templates/frontend/objects/article_details.tpl
@@ -113,13 +113,15 @@
{$author->getFullName()|escape}
-
- {foreach name="affiliations" from=$author->getAffiliations() item="affiliation"}
- {$affiliation->getLocalizedName()|escape}
- {if $affiliation->getRor()}{$rorIdIcon}{/if}
- {if !$smarty.foreach.affiliations.last}{translate key="common.commaListSeparator"}{/if}
- {/foreach}
-
+ {if count($author->getAffiliations()) > 0}
+
+ {foreach name="affiliations" from=$author->getAffiliations() item="affiliation"}
+ {$affiliation->getLocalizedName()|escape}
+ {if $affiliation->getRor()}{$rorIdIcon}{/if}
+ {if !$smarty.foreach.affiliations.last}{translate key="common.commaListSeparator"}{/if}
+ {/foreach}
+
+ {/if}
{assign var=authorUserGroup value=$userGroupsById[$author->getData('userGroupId')]}
{if $authorUserGroup->showTitle}