Is it possible to use variables in an email template?

3 posts by 2 authors in: Forums > CMS Builder
Last Post: November 6, 2018   (RSS)

By gkornbluth - November 6, 2018

Hi All,

I'm passing the value of a checkbox to a section record and also to an email template.

In the email template I'd like to use an if statement to echo a result (text) based on the checkbox value.

And then have that text included in the body of the email that's sent.

As an example:

<?php $var1 = #placeholder# ?>

<?php if ($var1==0):?>some text

<?php elseif ($var1==1):?> some other text

<?php endif ?>

When I insert that into the template, it prints the code, so I guess it's not that straightforward.

Any thoughts?

Thanks,

Jerry Jornbluth

The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

By gkornbluth - November 6, 2018

Thanks Daniel,

I kind of figured that, but was hoping for an easy...

Jerry

The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php