Hiya, if anyone could offer some advice on this I'd be most grateful.
New to Umbraco and XSLT.
Trying to come up with a simple macro that sends an email with the currently logged-in member's name as the body text (just that for now). SendMail works fine with a test string for the body, but it won't work with any kind of variable instead, the email is always empty.
I'm not sure that the variables contain data, no. I tried with just a basic test variable string but even that wouldn't appear as the email body.
I don't know how to implement the textarea check either, since the Umbraco page with the macro call only contains razor script that deals with parameters passed via query string to the page in a hidden iframe. (As far as I can tell.)
I'm really just trying to cobble together whatever working features I can despite only having the web interface to work with. Not ideal, I know. Thanks for taking a look, anyway!
That returns a list of member data, anything in the member's properties by the look of it. Can't work out how to reference a specific property though, nor the member's name or ID number. Things like select="umbraco.library:GetMember(1594)/@nodeName don't seem to work.
I repositioned the macro on the relevant page directly for easier testing to find out where it's falling over.
Using this code:
<xsl:choose><xsl:when test="umbraco.library:IsLoggedOn() = true()"> You are logged in as <p><xsl:variable name="user" select="umbraco.library:GetCurrentMember()"/><xsl:value-of select="$user"/> </p> </xsl:when> <xsl:otherwise> You are not logged in. </xsl:otherwise></xsl:choose>
It always returns true, but doesn't display anything for the current member, even with GetCurrentMember()/@nodeName and suchlike.
Problems with XSLT SendMail and GetCurrentMember
Hiya, if anyone could offer some advice on this I'd be most grateful.
New to Umbraco and XSLT.
Trying to come up with a simple macro that sends an email with the currently logged-in member's name as the body text (just that for now). SendMail works fine with a test string for the body, but it won't work with any kind of variable instead, the email is always empty.
Any pointing in the right direction would be great!
Hi Robzor
What version of Umbraco are you using? And are you certain that the $member variable holds any data?
Do you get anything if you try writing this
/Jan
Hi Jan,
I'm using Umbraco version 7.1.6.
I'm not sure that the variables contain data, no. I tried with just a basic test variable string but even that wouldn't appear as the email body.
I don't know how to implement the textarea check either, since the Umbraco page with the macro call only contains razor script that deals with parameters passed via query string to the page in a hidden iframe. (As far as I can tell.)
I'm really just trying to cobble together whatever working features I can despite only having the web interface to work with. Not ideal, I know. Thanks for taking a look, anyway!
Slightly closer...
That returns a list of member data, anything in the member's properties by the look of it. Can't work out how to reference a specific property though, nor the member's name or ID number. Things like select="umbraco.library:GetMember(1594)/@nodeName don't seem to work.
I repositioned the macro on the relevant page directly for easier testing to find out where it's falling over.
Using this code:
<xsl:choose><xsl:when test="umbraco.library:IsLoggedOn() = true()"> You are logged in as <p><xsl:variable name="user" select="umbraco.library:GetCurrentMember()"/><xsl:value-of select="$user"/> </p> </xsl:when> <xsl:otherwise> You are not logged in. </xsl:otherwise></xsl:choose>It always returns true, but doesn't display anything for the current member, even with GetCurrentMember()/@nodeName and suchlike.
Is there newer syntax I should be using?
is working on a reply...