Closed (fixed)
Project:
ImageField
Version:
5.x-1.1
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
25 Mar 2008 at 19:19 UTC
Updated:
29 Mar 2008 at 14:54 UTC
How do you retrieve a list of the imagefields attached to the node, with file location and node number?
Is there some code to do that?
Comments
Comment #1
yan commentedBasically you can use the following simple code snippet:
where
image_fieldis the name of your imagefield and where<variable>can be one of the following values:['fid'] --> File ID
['title'] --> Image title
['alt'] --> Image alternate text
['nid'] --> Node ID
['filename'] --> File name
['filepath'] --> Filepath (relative to root)
['filemime'] --> Image mime header
['filesize'] --> File size
['view'] --> HTML code to show image
To get the file's paths and node ID you could use the following, I think:
Comment #2
dopry commentedthere is a really cool theme('imagefield', $image) or theme('imagecache_image') function you can use in there somewhere.. up to you to figure out where it goes...