Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hello,
I'm having a problem getting curent member info via XSLT. I can fetch all the member's data via:
<xsl:copy-of select="umbraco.library:GetCurrentMember()" />
...but I can't for the life of me (and I'm pretty comfortable with xsl) access the member details. It seems like this should get the login name attribute from the XML node returned by the library:
<xsl:value-of select="umbraco.library:GetCurrentMember()/node[@loginname]" />
...and this should get the 'first_name' property:
<xsl:value-of select="umbraco.library:GetCurrentMember()/node/first_name" />
I'm missing something dumb and I can't tell what it is. Any ideas?
Thanks,
- Andrew
What are you getting back in the copy-of? Can you paste in here?
Thanks,Nik
I'm getting this:
<node email="[email protected]" loginname="awaegel1" path="-1,1075" nodetypealias="EDR_Members" writername="Administrator" urlname="awaegel1" nodename="awaegel1" updatedate="2010-09-15T17:05:17" createdate="2010-09-15T17:05:14" sortorder="54" template="0" nodetype="1058" writerid="0" level="1" parentid="-1" version="662dee61-22a1-456f-b705-cd433ba2f5e5" id="1075">
<first_name>a</first_name>
<last_name>w</last_name>
<auth_guid>b9b282da32ff41b2b367a046bd67811e</auth_guid>
<isapproved>1</isapproved>
<islocked>0</islocked>
</node>
So, instead of what you have above, trythis and you should be all set:
<xsl:value-of select="umbraco.library:GetCurrentMember()/@email"/> <xsl:value-of select="umbraco.library:GetCurrentMember()/first_name"/>
<xsl:value-of select="umbraco.library:GetCurrentMember()/@email"/>
<xsl:value-of select="umbraco.library:GetCurrentMember()/first_name"/>
Thanks, that worked great. It's been a while since I've had my head in xpath.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Getting current member properties with XSLT
Hello,
I'm having a problem getting curent member info via XSLT. I can fetch all the member's data via:
<xsl:copy-of select="umbraco.library:GetCurrentMember()" />
...but I can't for the life of me (and I'm pretty comfortable with xsl) access the member details. It seems like this should get the login name attribute from the XML node returned by the library:
<xsl:value-of select="umbraco.library:GetCurrentMember()/node[@loginname]" />
...and this should get the 'first_name' property:
<xsl:value-of select="umbraco.library:GetCurrentMember()/node/first_name" />
I'm missing something dumb and I can't tell what it is. Any ideas?
Thanks,
- Andrew
What are you getting back in the copy-of? Can you paste in here?
Thanks,
Nik
I'm getting this:
<node email="[email protected]" loginname="awaegel1" path="-1,1075" nodetypealias="EDR_Members" writername="Administrator" urlname="awaegel1" nodename="awaegel1" updatedate="2010-09-15T17:05:17" createdate="2010-09-15T17:05:14" sortorder="54" template="0" nodetype="1058" writerid="0" level="1" parentid="-1" version="662dee61-22a1-456f-b705-cd433ba2f5e5" id="1075">
<first_name>a</first_name>
<last_name>w</last_name>
<auth_guid>b9b282da32ff41b2b367a046bd67811e</auth_guid>
<isapproved>1</isapproved>
<islocked>0</islocked>
</node>
So, instead of what you have above, trythis and you should be all set:
Thanks,
Nik
Thanks, that worked great. It's been a while since I've had my head in xpath.
is working on a reply...