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.
Hi,
I use the FILEFIELD MODULE that create a TOKEN with the url of the file atached to a node. (new node is send by email with RULE MODULE)
When there is no file attached to a new node, the token is visible. For example, [FIELD_FILE_EXAMPLE_CCK].
Is it possible to hide the token when it is empty ?
Thanks.
Comments
Comment #1
pillarsdotnet CreditAttribution: pillarsdotnet commentedReassigning to token module.
Comment #2
Dave ReidThe 6.x-1.x code has supported calling code using the $options['clear'] = TRUE parameter to remove un-replaced tokens.
Comment #3
vstmusic CreditAttribution: vstmusic commented"The 6.x-1.x code has supported calling code using the $options['clear'] = TRUE parameter to remove un-replaced tokens."
Sorry, I don't understand. Is it possible to hide the empty token or not ?
Thanks for your help.
Comment #4
Dave ReidYes it is, but it's up to the module that *calls* token_replace() to provide the option in the function call.
Comment #5
pillarsdotnet CreditAttribution: pillarsdotnet commentedReassigning...
Comment #6
vstmusic CreditAttribution: vstmusic commentedI believe it's not the FILEFIELD MODULE that create the url's file token, but the FILEFIELD PATH MODULE.
Thanks for your help. I try to contact the developers of the FILEFIELD PATH MODULE.
Comment #7
pillarsdotnet CreditAttribution: pillarsdotnet commented(looking) You must be right, as the filefield module doesn't call token_replace() at all.