Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Christian Palm 277 posts 272 karma points
    Mar 07, 2011 @ 15:14
    Christian Palm

    Send xslt transformed email: Here is my xslt email template

    Hi - This is just a share of my xslt email template when using the workflow "Send xslt transformed email".

    Some simple table layout and it handles file uploads, fields with more than one input and replaces linebreakes with <br />

    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet version="1.0"
    exclude-result-prefixes="xsl msxsl user umbraco.library">

      <xsl:output method="html" media-type="text/html" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
      cdata-section-elements="script style"

      <xsl:param name="records" />

      <xsl:template match="/">
      <table style="border-collapse:collapse;border:1px solid black;">
      <xsl:for-each select="$records//fields/child::*">
      <tr style="border:1px solid black;">
      <td valign="top" style="border:1px solid black;padding:5px;font-family:Verdana,Helvetica,Arial,sans-serif;font-size:11px;">
    <xsl:value-of select="./caption"/>
      <td valign="top" style="border:1px solid black;padding:5px;font-family:Verdana,Helvetica,Arial,sans-serif;font-size:11px;">
      <xsl:when test="contains(.//value, '/umbraco/plugins/umbracoContour/files/')">
      <a href="http://{umbraco.library:RequestServerVariables('SERVER_NAME')}{.//value}">
      <xsl:value-of select=".//value"/>
      <xsl:for-each select="./values/value">
      <xsl:if test="position() &gt; 1">
      <br />
      <xsl:value-of select="umbraco.library:ReplaceLineBreaks(.)"/>

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 07, 2011 @ 17:23
    Jan Skovgaard

    Hi Christian

    Thanks for sharing this - sure will come in handy. Perhaps it should also be created in the wiki? Don't know, which one is easier to find on a search.


  • Fuji Kusaka 2203 posts 4220 karma points
    Aug 09, 2011 @ 18:47
    Fuji Kusaka

    Hi Christian,

    Can you explain to me how do i get only 2 specific fields instead of displaying all?


  • Fuji Kusaka 2203 posts 4220 karma points
    Aug 10, 2011 @ 11:52
    Fuji Kusaka

    Hi Christian,

    I finally got it working and if you dont mind i'll just add my code down here for others if ever you guys have the same demand as per my clients request.

    So basically the client wanted on Submit the User will be redirected to the Confirmation page but will also get an email confirmation with the Gender, Name and Surname as per the input.

    <xsl:param name="records"/>

    <xsl:template match="/">
    <xsl:value-of select="$records//fields/child::* [caption = 'Gender']//value"/>&#160;<xsl:value-of select="$records//fields/child::* [caption = 'First Name']//value"/>&#160;<xsl:value-of select="$records//fields/child::* [caption = 'Last Name']//value"/>, thank you for your application.........





  • Niels 63 posts 119 karma points
    Nov 18, 2011 @ 13:56

    Hi Christian,

    Is it possible to add an attachment(pdf) to a confirmation-mail without the use of an uploadfield?

  • Fredrik Esseen 609 posts 905 karma points
    Dec 02, 2011 @ 10:14
    Fredrik Esseen


    Thank you for the template!

    Very useful.

    I have some checkboxes and in the email the value will be "True" or "False". Ive tried to replace the text but dont really get it right.

    is there an easy way to do this?

  • Fuji Kusaka 2203 posts 4220 karma points
    Dec 02, 2011 @ 11:12
    Fuji Kusaka

    Hi Froad,

    Am not sure if you can change the outcome "True" or "False".

  • Paul Stewart 50 posts 71 karma points
    Jan 10, 2012 @ 12:54
    Paul Stewart

    Im having the same issue..

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jan 10, 2012 @ 21:25
    Jan Skovgaard

    Hi Paul

    What is your issue? Does the email not get send or what is it exactly that you can't get to work? And do you receive any kind of error message?


  • Paul Stewart 50 posts 71 karma points
    Jan 11, 2012 @ 10:07
    Paul Stewart

    I've basically resolved it, but there is something that is preventing depending what you type in the dictionary item.

    this was what my initial problem was but manage to solve it in a way, but when ever you add the word "to" in a dictionary item, the xslt email through contour does not send. So cant understand why thats not working.


Please Sign in or register to post replies

Write your reply to: