# Set customize items per page in slider.

**URL:** https://forum.shopware.com/t/set-customize-items-per-page-in-slider/32664
**Category:** Shopware 3.5
**Tags:** general
**Created:** [1. Dezember 2015 um 10:52 UTC](https://forum.shopware.com/t/set-customize-items-per-page-in-slider/32664 "2015-12-01T10:52:46Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![eRjej](https://avatars.discourse-cdn.com/v4/letter/e/0ea827/32.png) [@eRjej](https://forum.shopware.com/u/eRjej)
#### Post date: [1. Dezember 2015 um 10:52 UTC](https://forum.shopware.com/t/set-customize-items-per-page-in-slider/32664/1 "2015-12-01T10:52:46Z")

</div>

Hi, i have problem with my slider when i used in my plugin. I wont to set how many items show at starts in slider. eg get 15 articles, and i would like to show 4 articles per page. My plugin code (in emotion component template): [code]

{foreach from=$groupArticles item=sArticle} {include file=„frontend/listing/box\_article.tpl“ sArticle=$sArticle productBoxLayout=„slider“ sCategoryCurrent=$sArticle.categoryID} {/foreach}

[/code] But data-itemsPerPage=„4“ nothing do, always run js function setSizes() in \themes\Frontend\Responsive\frontend\_public\src\js\jquery.product-slider.js How to sets manualy items per page with different shopping words?

---

<div class="post-metadata">

### Author: ![mowlwurf](https://avatars.discourse-cdn.com/v4/letter/m/77aa72/32.png) [@mowlwurf](https://forum.shopware.com/u/mowlwurf)
#### Post date: [21. April 2017 um 08:44 UTC](https://forum.shopware.com/t/set-customize-items-per-page-in-slider/32664/2 "2017-04-21T08:44:54Z")

</div>

I ran into the same problem, data-itemsPerPage has no impact on the slider, the itemsPerPage only get calculated internaly by&nbsp;jquery.product-slider.js::L503

```
setSizes: function (orientation) {
            var me = this,
                o = orientation || me.opts.orientation,
                containerSize = (o === 'vertical') ? me.$el.innerHeight() : me.$el.innerWidth(),
                itemSize = (o === 'vertical') ? me.opts.itemMinHeight : me.opts.itemMinWidth;

            me.itemsPerPage = Math.floor(containerSize / itemSize);

```

The way I fixed it, maybe isn’t best practice, but you can modify the data-itemMinWidth parameter to show more/less items. In my case I changed it to 140px to get the 8 items I wanted to have. But with smaller devices it shows less images of course.

```
If there is another way to set a fix itemsPerPage value, I would be glad to hear about it. 

ps. I worked with Shopware Version 5.2.21
```
