Page 1 of 1

send mail template

Posted: Tue May 26, 2015 5:37 pm
by ArielRauch
Hi,
I have just downloaded a html template from a campaign site (they should know how to make it super compatible to all the devices and OSs).
Unfortunately, when using it as a fixed file template it complains (warning in the message log) about unknown variables:

Code: Select all

@media only screen and (max-width: 620px) {
  [class=wrapper] {
    min-width: 318px !important;
    width: 100% !important;
  }
  [class=wrapper] .one-col,
  [class=wrapper] .two-col,
  [class=wrapper] .three-col {
    width: 318px !important;
  }
  [class=wrapper] .column,
  [class=wrapper] .gutter {
    display: block;
    float: left;
    width: 318px !important;
  }
This only part of the code in order illustrate.
Now everything seems to work fine but I wonder whether there is a way to avoid this "misunderstanding"

Thanks

Ariel

Re: send mail template

Posted: Tue May 26, 2015 6:25 pm
by gabrielp
I have a similar problem with my email templates:

Image

Re: send mail template

Posted: Tue May 26, 2015 7:01 pm
by ArielRauch
Does it disturb in anyway except for the warning?

Re: send mail template

Posted: Tue May 26, 2015 9:20 pm
by dkelly
Switch is attempting to interpret square brackets in HTML, [class=wrapper], as variables, eg. [Job.NameProper]

Re: send mail template

Posted: Tue May 26, 2015 10:08 pm
by gabrielp
ArielRauch wrote:Does it disturb in anyway except for the warning?
For me the only problem is that it makes debugging messy since I need to wade through / filter out all of these messages.

Re: send mail template

Posted: Thu May 28, 2015 8:56 am
by ArielRauch
Hi guys,
I have not tried it yet but here is the idea:
In order to avoid the messy messages we could put Switch variables - let's say cssReplace1, cssReplace2, ... - instead of the real css statements. We could then initialize them with the real statement "cssReplace1 = "[class=wrapper]". When the template is then treated by Switch it should put all the correct values at the correct places without complaining.

Let me know what you think.

Ariel