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

pillarsdotnet’s picture

Project: HTML Mail » Token
Version: 6.x-1.6 » 6.x-1.x-dev
Category: bug » support

Reassigning to token module.

Dave Reid’s picture

Status: Active » Fixed

The 6.x-1.x code has supported calling code using the $options['clear'] = TRUE parameter to remove un-replaced tokens.

vstmusic’s picture

"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.

Dave Reid’s picture

Yes it is, but it's up to the module that *calls* token_replace() to provide the option in the function call.

pillarsdotnet’s picture

Project: Token » FileField
Version: 6.x-1.x-dev » 6.x-3.x-dev
Category: support » bug
Status: Fixed » Active

Reassigning...

vstmusic’s picture

I 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.

pillarsdotnet’s picture

Status: Active » Closed (works as designed)

(looking) You must be right, as the filefield module doesn't call token_replace() at all.