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
How can i gain access to Member properties that I've created for a Member Type?
In c# i use:
member.getProperty("address").Value
...but how do i do it in XSLT?
You can see the xml for your members by using the copy-of function, and the xpath your way to the data:
<xsl:copy-of select="umbraco.library:GetCurrentMember()" /> <xsl:copy-of select="umbraco.library:GetMember(1234)" />
From there the xml should be pretty much like a regular node. Something like:
Adam,
If you're going to list a number of properties, consider creating a variable first to hold the value of GetCurrentMember(), to avoid hitting the database too much... (Member data is retrieved for each GetMember(id) or GetCurrentMember() call!
<xsl:variable name="currentMember" select="umbraco.library:GetCurrentMember()"/>
and query for properties as Morten outlined before
<xls:value-of select="$currentMember/data [@alias = 'PropertyAlias']" />
Cheers,
/Dirk
Forget it... sorry!
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Access a custom member property in XSLT?
How can i gain access to Member properties that I've created for a Member Type?
In c# i use:
...but how do i do it in XSLT?
You can see the xml for your members by using the copy-of function, and the xpath your way to the data:
From there the xml should be pretty much like a regular node. Something like:
Adam,
If you're going to list a number of properties, consider creating a variable first to hold the value of GetCurrentMember(), to avoid hitting the database too much... (Member data is retrieved for each GetMember(id) or GetCurrentMember() call!
and query for properties as Morten outlined before
Cheers,
/Dirk
Forget it... sorry!
is working on a reply...