Greetings,
I’ve installed OJS 3.1.2. on a server and created 2 journals inside OJS .I’m currently working on designing the journals header. In the header, I want to show in one of the columns the cover image of the journal. I’ve added the following codes:
<div class="col-md-3" >
{if $homepageImage}
<div class="homepage-image">
<img class="pull-left img-responsive" src="{$publicFilesDir}/{$homepageImage.uploadName|escape:"url"}" alt="{$homepageImageAltText|escape}" >
</div>
{/if
The code is working well and brings the cover page only when I am on the homepage. However, when I go to any sub-page, the cover image disappears. Could anybody help me to fix this issue?
Dear Ahmad
I don’t know if this will work in OJS 3, but in OJS 2 we use this code to call the homepage image anywhere.
Just add this line of code before {if $homepageImage}
{assign var="displayHomepageImage" value=$currentJournal->getLocalizedSetting('homepageImage')}
So the code becomes:
<div class="col-md-3" >
{assign var="displayHomepageImage" value=$currentJournal->getLocalizedSetting('homepageImage')}
{if $displayHomepageImage}
<div class="homepage-image">
<img class="pull-left img-responsive" src="{$publicFilesDir}/{$displayHomepageImage.uploadName|escape:"url"}" alt="{$homepageImageAltText|escape}" >
</div>
{/if}
</div>
Let me know if that helps, so that others can get the same information.
Regards,
Rochmady
Editor-in-chief Akuatikisle