Posted by nicknickoli on July 13, 2010 at 12:29am
5 followers
Jump to:
| Project: | Image Browser |
| Version: | 6.x-1.0-rc1 |
| Component: | User interface |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
I'm trying to use a custom view, with filters, to insert images through the image_browser. How can I find the file Id for a CCK file-field to use? My view is set at admin > settings > imagebrowser > Views
I see in the image_browser tpl something like this <a href="<?php print url('imagebrowser/'. arg(1) .'/insert/'. $fid); ?>
How can I find the file Id for my CCK field in Views?? Thanks for any help.
Comments
#1
I have a file field that I've brought up in views. It's a file I want users to download
The link to the download file is: /download/file/fid/627
In the views field I want to add a link to all of these files, say: /download/file/fid/[field_example_fid]
but I can't seem to get the fid coming up in the URL. My URL always looks like this /download/file/fid/[field_example_fid] and brings me to a 404 page
How do I get the FID of a file field in views?
#2
I am trying to do the same but can't find a working solution. Any help from the developer is very welcome.
#3
me too. Can't seem to work it out. Is it a bug in views?
#4
I believe I was trying to add an FID token, i.e. [field_example_fid] to the "output this field as a link" option... but i guess it wasn't working. Don't know exactly how I was applying it but know I never figured it out. Something about drupal not being able to output the fid token -- I am no help at this point.
#5
The only way I know around it is to output the view using a template and referencing the field directly there!
#6
using views-customphp you can get the fid from the $data array.
Also, see http://daipratt.co.uk/drupal-getting-the-image-path-of-a-cck-field/
#7
Thanks! I am trying this but I am lacking PHP knowledge here. Do you have a code sample? Also my images are in a multi-value imagefield. Does each of them represent a distinct views record?