Copied to clipboard

Flag this post as spam?

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


  • ianhoughton 281 posts 605 karma points c-trib
    Nov 30, 2012 @ 16:01
    ianhoughton
    0

    Pass page data to a Contour xslt email template

    I've created a xslt email template and have got this working well. I need to pass a field called "pageTitle" from the page the form is on, through to the xslt email template.

    I've tried added a parameter to the Contour macro in the page template

    <umbraco:Macro FormGuid="[#formPicker]" pageTitle="[#pageTitle]" Alias="umbracoContour.RenderForm" runat="server"></umbraco:Macro>

    and then using this in the xslt template:

    <xsl:param name="pageTitle" />
    for your <xsl:value-of select="$pageTitle"/>. Now we h......
  • Comment author was deleted

    Dec 04, 2012 @ 11:10

    have you tried just using $currentPage/ ... does that do anything? 

     

  • ianhoughton 281 posts 605 karma points c-trib
    Dec 04, 2012 @ 11:32
    ianhoughton
    0

    Thanks Tim,

    In the end we had to get a couple of fields from the node of a content picker on the page so ended up with:

    <xsl:variable name="recursiveValue" select="$currentPage/ancestor-or-self::*[normalize-space(contactWidget)][1]/contactWidget" />
    <xsl:variable name="node" select="umbraco.library:GetXmlNodeById($recursiveValue)" /> 

    and then in the template we used

    <xsl:value-of select="$node/quoteOpeningHours"/>

    I hadn't done any XSLT for so long, Razor makes this soooo easy !!

Please Sign in or register to post replies

Write your reply to:

Draft