Let’s say we have a content type with a PDF file, and we want to link the body text of the node to the file.
In the view:
FORMAT: Show: Fields
FIELDS
Content: PDF file
Exclude from display: Checked
Formatter: URL to file
Content: Body
Rewrite the output of this field:
<a href=”[field_pdf_file]”>[body]</a>
Hope this helps.
Using the “URL to file” formatter is the key thing to remember.
PDF file will need to appear before the Body in the fields list (so that the [field_pdf_file] token is available to the Body).
Cross-posted from http://drupal.org/node/1308078
Advertisements
Leave a Reply