In Drupal 7 I've customised a file download field in a template file: field--field-downloads.tpl.php

Within the same field collection (using the 'field_collection' module: https://www.drupal.org/project/field_collection) that customised field is in, I've created a boolean field (machine name: field_open_in_new_window).

How do I access that boolean field's value from the file download field's template file so that I can add a 'target="_blank"' attribute to the download field link if the 'field_open_in_new_window' field is ticked?

The field collection appears in a Paragraphs field (https://www.drupal.org/project/paragraphs) if that makes any difference.

Thanks Pooks

Your Answer

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

Browse other questions tagged or ask your own question.