Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
It can be used as to generate url tocken because tocken overlooking adds a space at the beginning of the name
Here is the link path for the rewrite settings: sites/default/files/[field_name]
the resulting output: http://mysite.com/sites/default/files/ [field_name]
Comments
Comment #1
vacho CreditAttribution: vacho commentedI tested and this problem occurs when rewrite output of a field as a link to view and is an attachment fields
Comment #2
vacho CreditAttribution: vacho commentedI have stopped using the name of the file to replace the text of the url
What I have done is define the field of attachment as url to the file and use as is that in my other field tocken
All this simply by setting the view.
Comment #3
Dave ReidYour bug is with Views, which its own version of 'tokens' which are different from the core Token API which is what Token module deals with. Please confirm which version of Views you are currently using and update the ticket.
Comment #4
lantha CreditAttribution: lantha commentedVacho can you please describe the method you implemented? I am using "Url to file" but cannot output the file as a link to the pdf file that I want to link to. It just shows the rewritten text and not a link.
Comment #5
lantha CreditAttribution: lantha commentedproblem resolved. Thanks. The same "Url to file" method worked.
Comment #6
lucaspretti CreditAttribution: lucaspretti commentedSame here, setting the "Formatter" to "URL to file" when configuring the file field in views did the trick, maybe that option should be default.
thanks
Comment #7
MustangGB CreditAttribution: MustangGB commented