send mail template

Post Reply
ArielRauch
Advanced member
Posts: 230
Joined: Thu Aug 07, 2014 10:04 am

send mail template

Post 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
User avatar
gabrielp
Advanced member
Posts: 577
Joined: Fri Aug 08, 2014 4:31 pm
Location: Boston
Contact:

Re: send mail template

Post by gabrielp »

I have a similar problem with my email templates:

Image
Chat: open-automation @ gitter
Code: open-automation & dominickp @ GitHub
Tools: Switch, Pitstop, EPMS, Veracore, PageDNA, SmartStream, Metrix
ArielRauch
Advanced member
Posts: 230
Joined: Thu Aug 07, 2014 10:04 am

Re: send mail template

Post by ArielRauch »

Does it disturb in anyway except for the warning?
dkelly
TOP CONTRIBUTOR
Posts: 628
Joined: Mon Nov 29, 2010 8:45 pm
Location: Alpharetta GA USA
Contact:

Re: send mail template

Post by dkelly »

Switch is attempting to interpret square brackets in HTML, [class=wrapper], as variables, eg. [Job.NameProper]
User avatar
gabrielp
Advanced member
Posts: 577
Joined: Fri Aug 08, 2014 4:31 pm
Location: Boston
Contact:

Re: send mail template

Post 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.
Chat: open-automation @ gitter
Code: open-automation & dominickp @ GitHub
Tools: Switch, Pitstop, EPMS, Veracore, PageDNA, SmartStream, Metrix
ArielRauch
Advanced member
Posts: 230
Joined: Thu Aug 07, 2014 10:04 am

Re: send mail template

Post 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
Post Reply