Hi, I have an OJS 2.8 set up currently running on IJMASR. I currently have a custom block on the left that i use to display the cover of latest issue for my journal. I however find it tedious to continually change the cover issue manually every now and then and will rather have the block load the cover for the latest cover issue. How can i get this done and what be the proper code to replace the current one. Here is what the code in the custom block looks like.
<p><a href="/index.php" target="_self"><img class="commonCSS coverIssue" src="/public/site/images/admin/cover_issue_8_en_US.jpg" alt="IJMASR Cover Issue" /></a></p>
I did some digging and found the template for the cover issue and found this block of code that may be vital it doesnât seem to help. Kindly find the code below.
<div id="commonCSS coverIssue"><a href="/public/journals/1/{$currentUrl}"><img src="/public/journals/1/"{$coverPagePath|escape}{$issue-" alt=" Current Issue Cover page" />getFileName($locale)|escape}"{if $coverPageAltText != ''} alt="{$coverPageAltText|escape}"{else} alt="{translate key="issue.coverPage.altText"}"{/if}{if $width} width="{$width|escape}"{/if}{if $height} height="{$height|escape}"{/if}/></a></div>
I will appreciate your kind help to get the php code above to refer to the âCurrent Issue URLâ so as to pull up the required info. Thanks. In case i missed it, the custom block displays on the journal home page.
I found some additional code in the Index handler php file and this is what it looks like.
{if $issue && $currentJournal->getSetting('publishingMode') != $smarty.const.PUBLISHING_MODE_NONE} {* Display the table of contents or cover page of the current issue. *} <br /> <h3>{$issue->getIssueIdentification()|strip_unsafe_html|nl2br}</h3> {include file="issue/view.tpl"} {/if}
I have a feeling i could work with this instead but not sure how to alter it to fit and work inside the custom block