title: Drupal and JCarousel Views - Multiple Rows
body: <p><em>First off, Im well aware of this topic, but sadly I cannot seem to reply with questions to the original answer provider.  Seems Stack Overflow only wants answers on these threads so I am stuck:
  <a href="https://stackoverflow.com/questions/213680/multiple-rows-with-jcarousel">Multiple rows with jcarousel</a></em></p>
  
  <p>Anyhow, my problem is related to Drupal and  the use of the JCarousel module for my views. Im currently getting to the end-stage of my theme development. However, Im having a few problems with this, namely in getting a jcarousel like view style but with 2 rows instead of one.  With the following jcarousel-view.tpl.php in my theme folder, I was able to somewhat get further:</p>
  
  <pre><code>&lt;?php
  /**
  * @file jcarousel-view.tpl.php
  * View template to display a list as a carousel.
  */
  ?&gt;
  &lt;ul class="&lt;?php print $jcarousel_classes; ?&gt;"&gt;
  
    &lt;?php $i=0; $rows_number=2; //you can change the number of rows ?&gt;
    &lt;?php foreach ($rows as $id =&gt; $row): ?&gt;
      &lt;?php if($i%$rows_number==0) : ?&gt;
        &lt;li class="&lt;?php print $classes[$id]; ?&gt;"&gt;
      &lt;?php endif; ?&gt;
      &lt;?php print $row; ?&gt;
      &lt;?php if($i%$rows_number==($rows_number-1)) : ?&gt;
        &lt;/li&gt;
      &lt;?php endif; ?&gt;
      &lt;?php $i++; ?&gt;
      &lt;?php endforeach; ?&gt;
      &lt;?php if($i%$rows_number!=0) : ?&gt;
        &lt;/li&gt;
      &lt;?php endif; ?&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>Here is the end result: <a href="http://static.inky.ws/image/2302/image.jpg" rel="nofollow noreferrer">http://static.inky.ws/image/2302/image.jpg</a>
  As you can see, it group each set of fields for each item into a common column.  So I cannot create a full border for each individual item.  (See: <a href="http://static.inky.ws/image/2303/image.jpg" rel="nofollow noreferrer">http://static.inky.ws/image/2303/image.jpg</a> for an example of what Im trying to achieve code-wise)</p>
  
  <p>I can get a grid view but it means changing my view's style to use "Grid", which costs me from using jcarousel.  Does anyone have any suggestions on how I can improve my code above? Im thinking that the unordered list markup might not be helping me any.</p>