You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inside a mailing template, this "made up" test delivers a strange result: [[+gender:cat=` like wine.`:replace=`Women==2`]]
For a female recipient one would expect this result: Women like wine.
But that's not what happens! This is the result: 2 like wine.
The output filter does not have access to the the placeholder!?
When using a custom output filter – or a snippet with [[+gender]] as a property – and looking at the var with var_dump or print_r you get this result: string[11] = 2
It took some time for me to figure out what this means: [[+gender]]has 11 chars! (Thanks, @Mark-H).
At the time, when the placeholder should get proccessed by the snippet or output filter, its value is not rendered yet! Which makes it's impossible to do any stuff with its value.
But I need to process the gender in order to generate a propper salutation. And I cannot do that right now. Or can I?
The text was updated successfully, but these errors were encountered:
mindeffects
changed the title
Placeholders with snippets/Output filter don't get processed in time
Placeholder values cannot be processed by snippets/output filters (in mailing templates)
Sep 25, 2017
OMG, I think I know what happend: When TESTING a mailing, everything works fine, but NOT when VIEWING, because VIEW does not come with any user data! And I used VIEW because debugging is way simpler and faster than sniffing through the mail body. So, me dumb. Sorry.
Maybe GoodNews could use the current users data for VIEW? This way the admin could easily change his own GoN-settings and look how that affects the output.
This is a FR, right? ;-)
Inside a mailing template, this "made up" test delivers a strange result:
[[+gender:cat=` like wine.`:replace=`Women==2`]]
For a female recipient one would expect this result:
Women like wine.
But that's not what happens! This is the result:
2 like wine.
The output filter does not have access to the the placeholder!?
When using a custom output filter – or a snippet with [[+gender]] as a property – and looking at the var with
var_dump
orprint_r
you get this result:string[11] = 2
It took some time for me to figure out what this means:
[[+gender]]
has 11 chars! (Thanks, @Mark-H).At the time, when the placeholder should get proccessed by the snippet or output filter, its value is not rendered yet! Which makes it's impossible to do any stuff with its value.
But I need to process the gender in order to generate a propper salutation. And I cannot do that right now. Or can I?
The text was updated successfully, but these errors were encountered: