0

I've got a column of links to files in a table. They're displayed via file-fields with 'Output this field as a link" enabled in Rewrite Results. It's works great with fx images but width pdf's the table only shows the filename, not the path to it.

Any ideas on how to always show the complete path to a file no matter the file type?

1 Answer 1

0
  1. In views Change the Formatter of the field from Generic file to URL to file.
  2. Go to REWRITE RESULTS and check 'Output this field as link' and use replacement pattern of the file field.
  3. check Use absolute path to get absolute path link of the file

That's it you will get complete path of the file instead of file name at output.

enter image description here

8
  • Thanks, but the URL to File formatter isn't available in my field, only 'rendered file, image, image link formatter'. I've used 'rendered file'. Commented May 30, 2014 at 10:33
  • Drupal: 7.24 & views: 7.x-3.7 Commented May 30, 2014 at 13:55
  • @KristofferRom I think you don't have Entity API module enabled right.I think that might be the problem Commented May 30, 2014 at 14:24
  • it is enabled I'm afraid. I've just discovered that the field isn't actually a drupal.org/project/filefield but an imagefield accepting PDFs too. Could that be the issue? If so, any way to convert the fields without loosing all the content in them? Commented May 30, 2014 at 14:28
  • @KristofferRom I wonder, if its an image field it's not possible to upload pdf files even if add 'pdf'in Allowed file extensions. Can you please check it once. Commented May 30, 2014 at 14:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.