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
Hello, I am preparing my first campaign in phpList, coming from Mailchimp. And I am trying to implement this kind of mail merge:
Checking in to let you know your certifications are expiring.
*|IF:ACLSEXP|* * Your ACLS expires *|ACLSEXP|*
*|END:IF|**|IF:BLSEXP|* * Your CPR/BLS expires *|BLSEXP|*
*|END:IF|**|IF:PALSEXP|* * Your PALS expires *|PALSEXP|*
*|END:IF|**|IF:NRPEXP|* * Your NPR expires *|NPREXP|*
*|END:IF|**|IF:MTEXP|* * Your Monitor Tech certification expires *|MTEXP|*
*|END:IF|**|IF:BBPEXP|* * Your Bloodborne Pathogens expires *|BBPEXP|* *|END:IF|*
I understand the second one is easier, I could update my data source to address that.
For the first one, lines are shown or not shown in the template based on conditions (i.e. whether a variable is or is not empty).
Has anybody found a workaround for this workload? Or has anybody considered implementing conditionals in phpList's templating language, or adopting another language like php-liquid as the templating language?
Workarounds
I am considering to add extra attributes to my email list to address my specific problem above. For example I would use [LINE1] / [LINE2] / [LINE3] / [LINE4] and fill in those lines based on the first, second, third, fourth, ... expired certification.
Then in my template I would directly include [LINE1] / [LINE2] / [LINE3] / [LINE4]. The last lanes would be blank depending on how many certifications there are and the recipient would just see blank lines.
I am opening this issue in the interest to find other people that may have also considered this use case. And also I would like to ask the maintainers here if there is appetite to merge a PR if such a feature is provided (and which design approach(es) may be acceptable).
Thank you!
The text was updated successfully, but these errors were encountered:
fulldecent
changed the title
Conditional in email campaign text
Conditional variable/tags in email campaign text
Aug 15, 2024
It is no longer supported but could be used as-is, but you would need to fix any problems yourself, or as a starting-point if you wanted to implement different syntax.
Hello, I am preparing my first campaign in phpList, coming from Mailchimp. And I am trying to implement this kind of mail merge:
and
I understand the second one is easier, I could update my data source to address that.
For the first one, lines are shown or not shown in the template based on conditions (i.e. whether a variable is or is not empty).
Has anybody found a workaround for this workload? Or has anybody considered implementing conditionals in phpList's templating language, or adopting another language like php-liquid as the templating language?
Workarounds
I am considering to add extra attributes to my email list to address my specific problem above. For example I would use [LINE1] / [LINE2] / [LINE3] / [LINE4] and fill in those lines based on the first, second, third, fourth, ... expired certification.
Then in my template I would directly include [LINE1] / [LINE2] / [LINE3] / [LINE4]. The last lanes would be blank depending on how many certifications there are and the recipient would just see blank lines.
"Free"
I do understand that phplist3 is free software and anybody could implement this feature request but is under no obligation to support me.
I am opening this issue in the interest to find other people that may have also considered this use case. And also I would like to ask the maintainers here if there is appetite to merge a PR if such a feature is provided (and which design approach(es) may be acceptable).
Thank you!
The text was updated successfully, but these errors were encountered: