Quantcast
Channel: PKP Community Forum - Latest topics
Viewing all articles
Browse latest Browse all 27290

Adding current issues to the home page - strange error

$
0
0

@Franklinx wrote:

Hello,

I am currently implementing a responsive jquery carousel (owl) in OJS 3 that displays the 3-5 (depending on the width of the browser) most recent issues on the home page (indexJournal).

In order to do just that I had to include same list of issues on the home page that is also included on the archives page (issueArchive).

I managed to do that by modifying the indexJournal.tpl and the indexHandler.inc. In the case of the indexJournal.tpl I added:

	<div class="owl-carousel">
		{iterate from=issues item=issue}
				{include file="frontend/objects/issue_carousel.tpl"}
		{/iterate}
	</div>

I added to indexHandler.inc:

$issueDao = DAORegistry::getDAO('IssueDAO');
$publishedIssuesIterator = $issueDao->getPublishedIssues($journal->getId(), $rangeInfo);
$templateMgr->assign('issues', $publishedIssuesIterator);

The carousel works as it should but... the Current Issue that is also included on the home page (indexJournal) started to act up.
It displays Series (volume, issue number, year) and Title of the Current Issue but it mixes this with the Issue cover, description and publication date of the last Issue in the list of issues: a strange combination of the newest and the oldest issue.
Clearly I have made some error in the PHP, but which? Some suggestions how to improve this would be welcome.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 27290

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>