I've enabled the Custom Formatters module but I feel a little helpless when having a look at the given examples in the module.
The purpose is to expose the URL, ALT and TITLE attribute of an image in a View ("description" has been removed in Views 3, eventhough I was frequently making use of that field). This was supported in Views 2 ("Format: [imagecache name] URL", "Image field name - data"), now these options are stripped out in Views 3.
Custom Formatters was mentionned as the right solution for this matter - and I do believe this is the best practice indeed. But I can't seem to apply the examples given in the module itself on the described purposes.
Is it possible to give a brief sample code for the purpose above that should get me on the road again? I'd use it for building a Views Galleriffic gallery, which displays all the images from one single node (worked out succesfully in D6).
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | Capture d’écran 2011-05-18 à 17.15.35.png | 78.29 KB | Jerome F |
Comments
Comment #1
Jerome F commentedthis one is for the url only: http://drupal.org/node/1110132#comment-4340572
Comment #2
Jerome F commentedHere are the variables available for an image field (attached screenshot)
I used devel module and the process descibed in admin/help/custom_formatters to get them then I created a view and used this custom formatter to display my image field.
so you probably would use :
and
in your custom formatter
Comment #3
knalstaaf commentedThank you very much!
Comment #4
Jerome F commentedis this issue fixed ? I would be greatly appreciated if you can share your formatter once done and mark this issue as fixed.
Comment #5
TimelessDomain commentedComment #6
deciphered commentedMarking this as fixed. Please re-open if otherwise.
Comment #8
summit commentedHi,
I do not understand: http://drupal.org/node/1094312#comment-4485176
The array says #items. Shouldn't that be used than?
I tried with #items, but no go until now with link field, see: http://drupal.org/node/1379704#comment-5400646
EDIT: Got something working, see: http://drupal.org/node/1397700#comment-5443478
Greetings, Martijn