1

My problem is related to Drupal and the use of the JCarousel module for my views. I'm 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:

<?php
  /**
   * @file jcarousel-view.tpl.php
   * View template to display a list as a carousel.
   */
?>
<ul class="<?php print $jcarousel_classes; ?>">
  <?php $i=0; $rows_number=2; //you can change the number of rows ?>
  <?php foreach ($rows as $id => $row): ?>
    <?php if ($i % $rows_number == 0): ?>
      <li class="<?php print $classes[$id]; ?>">
    <?php endif; ?>
    <?php print $row; ?>
    <?php if ($i % $rows_number == ($rows_number - 1)): ?>
      </li>
    <?php endif; ?>
    <?php $i++; ?>
  <?php endforeach; ?>
  <?php if ($i % $rows_number != 0): ?>
    </li>
  <?php endif; ?>
</ul>

Here is the end result:

screenshot

As you can see, it groups each set of fields for each item into a common column and not separated, so I cannot create a full border for each individual item.

How can I resolve this?

  • Thanks kiamlaluno...any solution to the question? – John Public Sep 17 '15 at 2:20
  • Did the expire field show before? I noticed in your original screenshot, there is no date for it. – No Sssweat Sep 17 '15 at 5:54
  • Yes it dd and it did show im looking at the original screenshot – John Public Sep 17 '15 at 5:58
0

1) Hide all your fields (check mark exclude from display)

2) Add a Custom Field

3) In your custom field, put everything there using the tokens. (click on relacement patters, it will show you the tokes u can use).

For Example:

<div class="whatever">
    <div>[logo]</div>
    <div>[off]</div>
    <div>[download cupon]</div>
    <div>[expires]</div>
</div>

Then go to the jcarusel module folder and look for the css file and strip the css that you don't want (like the current borders) and use your "whatever" div to create your own borders.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.