Copied to clipboard

Flag this post as spam?

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


  • ianhoughton 241 posts 490 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......
  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Dec 04, 2012 @ 11:10
    Tim Geyssens
    0

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

     

  • ianhoughton 241 posts 490 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 !!

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies