Copied to clipboard

Flag this post as spam?

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


  • QuasPie 25 posts 85 karma points
    May 24, 2013 @ 14:28
    QuasPie
    0

    Ubraco contour workflow - XSLT transformed email on approval

    Hi Forum!

    I'm setting up my a contour formular with an XSLT transformed email workflow, triggers on approve.

    However, when I try to fetch dictionary items from the umbraco library, the dictionary items don't render. Everything else renders.
    Strange thing is, that if I sent the XSLT Workflow on submit instead og approval, it works perfectly fine.

    Anyone had this problem?

    My code is:

    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxsl="urn:schemas-microsoft-com:xslt"
    xmlns:user="urn:my-scripts"
    xmlns:umbraco.library="urn:umbraco.library"
    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"
        doctype-system="DTD/xhtml1-strict.dtd"
        cdata-section-elements="script style"
        indent="yes"
        encoding="utf-8"/>
    
        <xsl:param name="records" /> 
    
        <xsl:template match="/">
        <xsl:variable name="pageID" select="$records/pageid"/>
        <xsl:variable name="currentPage" select="umbraco.library:GetXmlNodeById($pageID)"/>
    
        <style type="text/css">
            body {
                font-family: Tahoma, Verdana, sans-serif;
                color: #4d4d4d;
                line-height: 16px;
            }
            h2 {
                font-size: 30px;
                font-family: Tahoma, Verdana, sans-serif;
                color: #dedede;
                text-transform: uppercase;
            }
            h3 {
                font-size: 18px;
                color: #9d9d9d;
            }
            a {
                color: #f56423;
                text-decoration: none;
            }
            a:hover {
                color: #faaa82;
            }
        </style>
    
        <a href="http://new.casinoportalen.dk/"><img src="http://new.casinoportalen.dk/images/logo.png" alt="Casinoportalen" /></a>
        <h2 style="font-family: Tahoma, Verdana, sans-serif; font-size: 30px; color: #dedede; text-transform: uppercase;"><xsl:value-of select="umbraco.library:GetDictionaryItem('signupApproved')"/></h2>
    
        <table style="border: 5px solid #dedede; padding: 20px 10px; font-family: Tahoma, Verdana, sans-serif;">
            <tr>
                <td colspan="3">
                    <h3>
                        <xsl:value-of select="umbraco.library:GetDictionaryItem('Hej')"/>
                        <xsl:text disable-output-escaping="yes">&amp;</xsl:text>nbsp;
                        <xsl:value-of select="$records//fields/username//value"/>,<br />
                    </h3>
                    <p><xsl:value-of select="umbraco.library:GetDictionaryItem('signupApprovedText')" disable-output-escaping="yes"/></p>
                    <h3><xsl:value-of select="umbraco.library:GetDictionaryItem('memberInformation')"/></h3>
                    <p>
                        <xsl:value-of select="umbraco.library:GetDictionaryItem('Username')"/>:
                        <xsl:text disable-output-escaping="yes">&amp;</xsl:text>nbsp;
                        <xsl:value-of select="$records//fields/username//value"/><br />
                        <xsl:value-of select="umbraco.library:GetDictionaryItem('Password')"/>:
                        <xsl:text disable-output-escaping="yes">&amp;</xsl:text>nbsp;
                        <xsl:value-of select="$records//fields/password//value"/>
                    </p>
                </td>
            </tr>
            <!--This is a splitter!-->
            <tr>
                <td colspan="3" style="height: 2px;">
                    <hr />
                </td>
            </tr>
            <tr>
                <td colspan="3">
                    <br /><br /><h3><xsl:value-of select="umbraco.library:GetDictionaryItem('getPlaying')"/></h3>
                </td>
            </tr>
            <tr style="background: #dedede;">
                <xsl:for-each select="$currentPage/ancestor-or-self::* [@isDoc and @level=1]//*/GamblingSite[@isDoc]">
                <xsl:sort select="sortOrder" data-type="number"  order="ascending" />
                <xsl:if test="(position() &lt; 4)">
                    <td align="center" style="padding: 22px 10px 10px 10px;">
                        <a href="{websiteURL}" target="_blank" style="color: #f56423; font-weight: bold; text-decoration: none;">
                            <img src="http://new.casinoportalen.dk{umbraco.library:GetMedia(logoImage, 0)/umbracoFile}" alt="{@nodeName}" /><br />
                            <xsl:value-of select="casinoName" />
                        </a>
                    </td>
                </xsl:if>
                </xsl:for-each>
            </tr>
        </table>
        </xsl:template> 
    
    
    
    </xsl:stylesheet> 
    
    Regards, QuasPie
  • Comment author was deleted

    Jun 03, 2013 @ 13:07

    Hmmm must be because the approve happens from the backoffice and the submit happens when the users submits it on the frontend, could you try setting your backoffice user language to danish and see if it fetches the correct dictionary item in that case?

  • QuasPie 25 posts 85 karma points
    Jun 03, 2013 @ 13:52
    QuasPie
    0

    Hi Tim,

    Thanks for the answer.

    I'll have a look at it, when I get the time to return to the project.

    Thanks :)

Please Sign in or register to post replies

Write your reply to:

Draft