Closed (fixed)
Project:
Content Templates (Contemplate)
Version:
5.x-1.9
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
28 May 2008 at 10:20 UTC
Updated:
12 Jun 2008 at 15:24 UTC
I wish to limit number of images in teaser to 4 along with using imagecache module.
Here is my teaser code:
<div class="field field-type-image field-field-pictures-scoop">
<div class="field-items">
<?php foreach ((array)$node->field_pictures__scoop as $item) { ?>
<div class="field-item"><?php print $item['view'] ?></div>
<?php } ?>
<?php
print theme('imagecache', $profilepic, $image['filepath'])
?>
</div>
</div>
Thank you for help!!!
Comments
Comment #1
jrglasgow commentedThis is the way I would do it. Create a counter, and only dispay the first 4 images.
This is pseudo code, it has not been tested.
Comment #2
Richard_ commentedThank you jrglasgow!
Your help is very appreciated and your code work perfectly :)
Regards,
Richard
Comment #3
jrglasgow commentedComment #4
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.