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
I am playing with the umbraco.presentation.nodeFactory and trying to port some XSLT into .NET - I am currently looping through some nodes like so
foreach (Node node in MyNodeList)
But am a bit stuck here? How would I do the equivalent of this in my .NET?
<xsl:value-of select="umbraco.library:GetXmlNodeById(string(data [@alias = 'myalias']))/@nodeName"/>
Any help appreciated :)
Hi Lee,
Generic properties are available as... properties on the node object whereas custom properties can be retrieved as
node.getProperty("propertyAlias").Value
Equivalent for your xslt statement is
using umbraco.presentation.nodeFactory; Node node = new Node(int.Parse(Node.GetCurrent().getProperty("myAlias").Value)); string nodeName = node.Name;
Hope this helps.
Regards,
/Dirk
Ahhhh so obvious when you see it :) ... Legend, thanks
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
How Would I Do This With The NodeFactory?
I am playing with the umbraco.presentation.nodeFactory and trying to port some XSLT into .NET - I am currently looping through some nodes like so
But am a bit stuck here? How would I do the equivalent of this in my .NET?
Any help appreciated :)
Hi Lee,
Generic properties are available as... properties on the node object whereas custom properties can be retrieved as
Equivalent for your xslt statement is
Hope this helps.
Regards,
/Dirk
Ahhhh so obvious when you see it :) ... Legend, thanks
is working on a reply...