Search

hi there,

am i missing something here or is it not possible to assign a utility to an email template? if i select a utility from the sidebar and save the template nothing happens except the utility gets deselected. If i manually set a path ../../utilites/typography.xsl for example, i get an error:

Error compiling xml with xslt: XSLTProcessor::importStylesheet(): compilation error: file /www/htdocs/w00d7fac/fbp/ line 10 element import

cheers
daniel

Selecting a utility from the sidebar should work. When clicked, it should be added to your XSLT using a relative path starting with workspace.

(If that doesn't work: Which version of Symphony, which version of ETM?)

Regarding the paths: That's a known issue, see here: https://github.com/creativedutchmen/email_template_manager/issues/25

thanks michael,

the trick with the relative path starting at the root worked. the utility gets imported and even shows as selected in the backend. but i still cannot just click on a utility to get the same. versions are: symphony 2.2.5, email-template-manager 3.0

cheers
daniel

Hmmm, that is strange. Do you see any JavaScript errors in the Console? Have you also tried to create a new template and see if it works then?

nope, no javascript errors and i already tried with a newly created email template. but i can live with that, now that i can at least edit the template to import another. :)

OK. Maybe @creativedutchmen has an idea for the JS issue. He will be back soon.

I am back again from a (fantastic) week skiing. I'll take a look at the JS problems tonight, hopefully it's something small!

Actually it works for me (in Safari).

@azzagazz: Which Browser are you using?

I have not been able to reproduce your issue locally (on firefox, chrome and safari). Can you please tell me a bit more about your setup? Do you have any other extensions installed that might add conflicting javascript to the backend?

hi,

i'm using chrome (17.0.963.65) on a mac, running Mac OS X in v10.7.3. I can select a utility, save the template and get a status update of Template updated just now. But nothing is happening, the utility just gets deselected.

I have a bunch of other extensions installed, so maybe something is interfering with this. But i get no js errors in the console whatsoever.

I have no idea why this isn't working, but as mentioned before, its not a big deal to me, now that i know how to reference a utility directly.

cheers
daniel

Preview breaks when defining parameters or variables in XSLT layouts. See attached image. Logged to Github.

Update:

It's not really the ETM. My XSLT stylesheet didn't return any result (i.e. empty), so ETM interprets that as an error and act accordingly.

Attachments:
ETM_error.jpg

Using ETM for the first time - brilliant!

Just one small issue: I'm having trouble getting certain line breaks in my plain text email where I want them.

// Address:
<xsl:value-of select="/data/contact-public/entry/address-1"/>
<xsl:value-of select="/data/contact-public/entry/address-2"/>
<xsl:value-of select="/data/contact-public/entry/town-city"/>
<xsl:value-of select="/data/contact-public/entry/county"/>
<xsl:value-of select="/data/contact-public/entry/postcode"/>

Unless I put a character after each value-of, the different address fields are all on one line. Adding extra line breaks between them in the XSLT template doesn't help.

Any way around this?

Try:

<xsl:text>
</xsl:text>

P.S.: Be aware of TABs, they will also be in your output. Everything inside the element will be output.

Thanks Michael - that seems to work, as does this:

<xsl:value-of select="/data/contact-public/entry/address-1"/>&#160;

OK, try this:

<xsl:text>&#160;</xsl:text>

:-)

:) As it was working without the xsl:text tag, is it necessary?

Well, ideally text should be inside a <xsl:text> element. If you don't do it, you will always experience ugly formatting in the output. I only omit the <xsl:text> tag if the text is surrounded by a different tag, without whitespace.

So I do:

<h2>Hello my headline</h2>

But:

<h2>
    <xsl:value-of select="element"/>
    <xsl:text> and additional text</xsl:text>
</h2>

Gotcha. Thanks a lot for explaining.

Edit: My message is entirely plain text, and it doesn't seem to be a problem. I guess your approach is necessary for HTML emails.

You are welcome!

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details