title: Create multiple row product slider
body: <p>I'm using magento and I have a new product slider on my homepage that shows the new products but it is only one row big and I want to decide if it's 2 rows or more on my homepage but i don't know what i need to change in the .phtml file so it is 2 rows instead of one. 
  If you go to parts2u.nl you can see what i mean underneath Nieuwe Artikelen that is the new product slider I'm talking about. </p>
  
  <p>This is the code:</p>
  
  <pre><code>&lt;?php
  /**
   *
   */
  ?&gt;
  &lt;?php
      $_productCollection = $this-&gt;getProductCollection();
  ?&gt;
  &lt;?php if ($_productCollection &amp;&amp; ($_collectionSize = $_productCollection-&gt;getSize())): ?&gt;
  &lt;?php
  
      $theme = $this-&gt;helper('fortis');
      $helpLabels = $this-&gt;helper('fortis/labels');
      $helpTemplate = $this-&gt;helper('fortis/template');
      $helpImg = $this-&gt;helper('infortis/image');
      $sliderClasses = '';
      $gridClasses = '';
  
      //Default image size
      $imgWidth = 168;
      $imgHeight = 168;
  
      //Image aspect ratio
      if ($theme-&gt;getCfg('category/aspect_ratio'))
      {
          $imgHeight = 0; //Height will be computed automatically (based on width) to keep the aspect ratio
      }
  
      //Basic slider block parameters
      //--------------------------------------------------------------
      $isResponsive = $this-&gt;getIsResponsive(); //param: is_responsive
      $breakpoints = $this-&gt;getBreakpoints(); //param: breakpoints
      $showItems = $this-&gt;getShowItems(); //param: show_products
      if (!$showItems)
      {
          $showItems = 5; //IMPORTANT: set default number of visible products
      }
  
      //Slider timeout (if set: automatic slideshow)
      $timeout = $this-&gt;getTimeout(); //param: timeout
      if ($timeout === NULL) //Param not set
      {
          $timeout = intval($theme-&gt;getCfg('product_slider/timeout'));
      }
      else
      {
          $timeout = intval($timeout);
      }
  
      //Slider initial delay
      $initDelay = intval($this-&gt;getInitDelay()); //param: init_delay
  
      //Number of items that should move on animation
      $move = $this-&gt;getMove(); //param: move
      if ($move === NULL) //Param not set
      {
          $move = intval($theme-&gt;getCfg('product_slider/move_items'));
      }
      else
      {
          $move = intval($move);
      }
  
      //Additional slider classes
      //--------------------------------------------------------------
      if($isResponsive)
      {
          $sliderClasses .= ' itemslider-responsive';
      }
  
      if ($_collectionSize == 1)
      {
          $sliderClasses .= ' single-item';
      }
  
      //Additional grid classes
      //--------------------------------------------------------------
      //Size of grid elements
      $size = $this-&gt;getSize(); //param: size
      if ($size)
      {
          $gridClasses = ' ' . $size;
      }
      else
      {
          if ($showItems &gt;= 8)
          {
              $gridClasses = ' size-xs';
          }
          elseif ($showItems &gt;= 6)
          {
              $gridClasses = ' size-s';
          }
      }
  
      //Align elements to the center
      if ($this-&gt;getCentered()) //param: centered
      {
          $gridClasses .= ' centered';
      }
  
      //Set equal height for all items
      if ($this-&gt;getEqualHeight()) //param: equal_height
      {
          $gridClasses .= ' equal-height';
      }
  
  ?&gt;
  
  &lt;h3 class="section-title padding-right"&gt;&lt;?php echo $this-&gt;getBlockName(); ?&gt;&lt;/h3&gt;
  &lt;div class="itemslider-wrapper new-itemslider-wrapper"&gt;
  
      &lt;div class="nav-wrapper gen-slider-arrows1 gen-slider-arrows1-pos-top-right"&gt;&lt;/div&gt;
  
      &lt;div class="itemslider itemslider-horizontal&lt;?php if($sliderClasses) echo $sliderClasses; ?&gt;"&gt;
          &lt;ul class="slides products-grid&lt;?php if($gridClasses) echo $gridClasses; ?&gt;"&gt;
              &lt;?php foreach ($_productCollection-&gt;getItems() as $_product): ?&gt;
                  &lt;li class="item"&gt;
  
                      &lt;div class="product-image-wrapper" style="max-width:&lt;?php echo $imgWidth; ?&gt;px;"&gt;
  
                          &lt;a href="&lt;?php echo $_product-&gt;getProductUrl() ?&gt;" title="&lt;?php echo $this-&gt;stripTags($this-&gt;getImageLabel($_product, 'small_image'), null, true); ?&gt;" class="product-image"&gt;
  
                              &lt;img src="&lt;?php echo $helpImg-&gt;getImg($_product, $imgWidth, $imgHeight, 'small_image'); ?&gt;" alt="&lt;?php echo $this-&gt;stripTags($this-&gt;getImageLabel($_product, 'small_image'), null, true); ?&gt;" /&gt;
  
                              &lt;?php if ($theme-&gt;getCfg('category/alt_image')): ?&gt;
                                  &lt;?php echo $theme-&gt;getAltImgHtml($_product, $imgWidth, $imgHeight); ?&gt;
                              &lt;?php endif; ?&gt;
  
                              &lt;?php echo $helpLabels-&gt;getLabels($_product); //Product labels ?&gt;
                          &lt;/a&gt;
  
                          &lt;?php //Add-to links
                              if ($theme-&gt;getCfg('category_grid/display_addtolinks') != 0 
                                  &amp;&amp; $theme-&gt;getCfg('category_grid/addtolinks_simple'))
                              {
                                  if ($theme-&gt;getCfg('category_grid/display_addtolinks') == 1) //Display on hover
                                  {
                                      echo $helpTemplate-&gt;getCategoryAddtoLinksComplex_2(
                                      $_product, $this-&gt;getAddToCompareUrl($_product), 'addto-links-icons addto-onimage visible-onhover');
                                  }
                                  else //Always display
                                  {
                                      echo $helpTemplate-&gt;getCategoryAddtoLinksComplex_2(
                                      $_product, $this-&gt;getAddToCompareUrl($_product), 'addto-links-icons addto-onimage');
                                  }
                              }
                          ?&gt;
  
                      &lt;/div&gt; &lt;!-- end: product-image-wrapper --&gt;
  
                      &lt;h3 class="product-name"&gt;&lt;a href="&lt;?php echo $_product-&gt;getProductUrl() ?&gt;" title="&lt;?php echo $this-&gt;stripTags($_product-&gt;getName(), null, true) ?&gt;"&gt;&lt;?php echo $this-&gt;escapeHtml($_product-&gt;getName()) ?&gt;&lt;/a&gt;&lt;/h3&gt;
                      &lt;?php echo $this-&gt;htmlEscape($_product-&gt;getSku()); ?&gt;
  
                      &lt;?php echo $this-&gt;getReviewsSummaryHtml($_product, 'short') ?&gt;
  
                      &lt;?php echo $this-&gt;getPriceHtml($_product, true, '-new') ?&gt;
                      &lt;div class="actions"&gt;
                          &lt;?php if($_product-&gt;isSaleable()): ?&gt;
  
                              &lt;?php if ($this-&gt;getHideButton() == false): ?&gt;
                                  &lt;button type="button" title="&lt;?php echo $this-&gt;__('Add to Cart') ?&gt;" class="button btn-cart" onclick="setLocation('&lt;?php echo $this-&gt;getAddToCartUrl($_product) ?&gt;')"&gt;&lt;span&gt;&lt;span&gt;&lt;?php echo $this-&gt;__('Add to Cart') ?&gt;&lt;/span&gt;&lt;/span&gt;&lt;/button&gt;
                              &lt;?php endif; ?&gt;
  
                          &lt;?php else: ?&gt;
  
                              &lt;?php if ($this-&gt;getHideButton() == false): ?&gt;
                                  &lt;p class="availability out-of-stock"&gt;&lt;span&gt;&lt;?php echo $this-&gt;__('Out of stock') ?&gt;&lt;/span&gt;&lt;/p&gt;
                              &lt;?php endif; ?&gt;
  
                          &lt;?php endif; ?&gt;
  
                          &lt;?php //Add-to links
                          if ($theme-&gt;getCfg('category_grid/display_addtolinks') != 0 &amp;&amp; !$theme-&gt;getCfg('category_grid/addtolinks_simple'))
                          {
                              if ($theme-&gt;getCfg('category_grid/display_addtolinks') == 1) //Display on hover
                                  echo $helpTemplate-&gt;getCategoryAddtoLinks($_product, $this-&gt;getAddToCompareUrl($_product), 'addto-gaps-right addto-texticons display-onhover');
                              else //Always display
                                  echo $helpTemplate-&gt;getCategoryAddtoLinks($_product, $this-&gt;getAddToCompareUrl($_product), 'addto-gaps-right addto-texticons');
                          }
                          ?&gt;
                      &lt;/div&gt;
                  &lt;/li&gt;
              &lt;?php endforeach; ?&gt;
          &lt;/ul&gt; &lt;!-- end: slides --&gt;
      &lt;/div&gt; &lt;!-- end: itemslider --&gt;
  
  &lt;/div&gt; &lt;!-- end: new-itemslider-wrapper --&gt;
  &lt;script type="text/javascript"&gt;
  //&lt;![CDATA[
      jQuery(function($) {
  
          $('.new-itemslider-wrapper .itemslider').flexslider({
              namespace: "",
              animation: "slide",
              easing: "easeInQuart",
  
              &lt;?php if ($timeout): ?&gt;
                  slideshowSpeed: &lt;?php echo $timeout; ?&gt;,
                  animationLoop: true,
              &lt;?php else: ?&gt;
                  slideshow: false,
                  animationLoop: false,
              &lt;?php endif; ?&gt;
  
              &lt;?php if ($initDelay): ?&gt;
                  initDelay: &lt;?php echo $initDelay; ?&gt;,
              &lt;?php endif; ?&gt;
  
              &lt;?php if ($speed = intval($theme-&gt;getCfg('product_slider/speed'))): ?&gt;
                  animationSpeed: &lt;?php echo $speed; ?&gt;,
              &lt;?php endif; ?&gt;
  
              pauseOnHover: true,
              controlNav: false,
              controlsContainer: ".new-itemslider-wrapper .nav-wrapper",
  
              itemWidth: 188,
              &lt;?php if ($showItems): ?&gt;
                  minItems: &lt;?php echo $showItems; ?&gt;,
                  maxItems: &lt;?php echo $showItems; ?&gt;,
              &lt;?php endif; ?&gt;
  
              move: &lt;?php echo $move; ?&gt;
          })
          &lt;?php if ($breakpoints): ?&gt;
              .data("breakpoints", [ &lt;?php echo $breakpoints; ?&gt; ] )
          &lt;?php elseif ($showItems): ?&gt;
              .data("showItems", &lt;?php echo $showItems; ?&gt; )
          &lt;?php endif; ?&gt;
          ; //IMPORTANT: don't remove semicolon!
  
      });
  //]]&gt;
  &lt;/script&gt;
  &lt;?php endif; ?&gt;
  </code></pre>