0

In a view I would like to output just the path to the piece of content where the file is referenced like the below:

http://www.example.org/file/1

I DO NOT want to link directly to the file itself.

I thought it would be a simple task but most of the fields are adding html (like <a href="http://www.example.org/file/1">View</a>).

I am filtering by a file type of "Video". I have tried adding the below with no success:

File: Download Link
File: Edit link
File: Link
File: Path

And have also tried using a relationship:

Content: Link
Content: Path

I have been able to get it working by rewriting the File: File ID field and hard-coding the url with the [fid] as a token, but that's a horrible solution.

0

Please try to locate another relationship named "File Usage: File" After that you should be able to add a field type "File: Path". In the field options you can decide how the output is formatted: as server-path (public://yourpath) or as download path.

  • I don't want to link directly to the file, I want to link to the piece of content where the file is referenced. – Keven Nov 6 '15 at 21:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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