Thursday, October 22, 2009

Can't get filefield URL in custom views template

I after working on drupal's filefield module with views, encountered a typical problem. Void of drupal features, i was beating my head around to fetch URLs of files so that i could customize my view. Then i came across this golden comment on drupal.org

http://drupal.org/node/459548#comment-1576264

I first added a relationship to content: [PDF] in the views edit page


Than i added another field File: [Path] giving it a relationship to the above mentioned

Hence i was able to fetch URLs of files in the $row array in the custom view template