Rank: Devotee
Joined: 7/19/2006 Posts: 83
|
Hello all, Is there a better way of retreiving the current node using C# than this: XmlNode n = ((IHasXmlNode) umbraco.library.GetXmlNodeCurrent().Current).GetNode(); It doesn't really seem very efficient to have to get the XML and then get the id attrbute. D.
Darren Ferguson - http://www.darren-ferguson.com
|
 Rank: Addict
Joined: 3/17/2008 Posts: 953 Location: Nyborg, Denmark
|
Yes, you can use the nodefactory that was introduced in 2.1:
umbraco.presentation.nodeFactory.Node.GetCurrent().Id
Jeeeez, did I really start this :-)
|
Rank: Devotee
Joined: 7/19/2006 Posts: 83
|
Cheers mate.
Darren Ferguson - http://www.darren-ferguson.com
|