How to limit number of articles in journal home page

I want to limit the number of articles in journal home page (indexJournal.tpl)

Currently there are more than 20 articles showing in the journal home page, I want to show only 12 (form all sections)

version 3.0.2
theme: Bootstrap child theme

The Bootstrap theme (and all of our themes at the moment) only support an issue-based publishing schedule. So the homepage will show all the articles in the latest issue.

If you want to change this, you’ll need to code up a child theme which overrides the homepage template. You can read a technical guide on coding themes for more details.

The template you’ll need to override is here:

But the data does come into the template as an issue broken up into sections. So you may need to do some handling of the data to get the latest 12. This section will describe how to pass your own data to the templates:

https://pkp.gitbooks.io/pkp-theming-guide/content/en/advanced-custom-data.html

Thanks @NateWr for the reply

I am using the override and the following code

I have limited 3 items per section

Is this approach okay or should I pass the data through plugin and display it via override?

{foreach from=$section.articles item=article name=medialist} 
{if $smarty.foreach.medialist.index < 3} 
{include file="frontend/objects/article_summary.tpl"} 
{/if} 
{/foreach}

Hi @LaxMariappan,

Yeah, that looks like it will do the trick. If you expect there to be thousands of articles in the latest issue at some point in the future, you might want to break out of the loop early:

{foreach from=$section.articles item="article" key="i"}
	{if $i < 3}
		{include file="frontend/objects/article_summary.tpl"}
	{else}
		{php}break;{/php}
	{/if}
{/foreach}

(I haven’t tested that but hopefully you get the idea.)