Closed (fixed)
Project:
ImageField
Version:
6.x-3.2
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
9 Nov 2009 at 19:24 UTC
Updated:
23 May 2011 at 22:02 UTC
Is there a way to count the number of images in an unlimited imagefield? I'd like to get that count, assign it to a variable available to views templates, and then use it to apply a custom class depending on what that count may be.
Any help getting the count would be appreciated, thanks!
Comments
Comment #1
RobW commentedSolved with a minimum amount of php knowledge. Oh, learning.
Comment #3
hampshire commentedWhat was your solution?
Comment #4
hampshire commentedHere is a link to a solution for this problem http://drupal.org/node/879652 using the computed fields module.
I used the following to store the value in the database and had to resave my current nodes.
Data Type: Int
Data Length: 10
[ ] Not NULL
[x] Sorable
Calling it into a custome template required
Hope that helps.
Comment #5
giorgoskwhere field_images is the field to count the images of
Comment #6
RobW commentedhttp://drupal.org/node/632998#comment-4486512.