I've got a question about NodeFactory. From an example on Umbraco TV, I have the following code
using umbraco.presentation.nodeFactory;
Node currentPage = Node.GetCurrent();
foreach(Node page in currentPage.Children)
{
Response.Write(page.Name);
}
However, it seems the Node class is obsolete. So, I tried with the umbraco.NodeFactory class and I get an error -
The type 'umbraco.interfaces.INode' is defined in an assembly that is not referenced. You must add a reference to assembly 'interfaces, Version=1.0.4029.25827, Culture=neutral, PublicKeyToken=null'.
My version info is: umbraco v 4.6.1 (Assembly version: 1.0.4029.25836)
I know that there is a version mismatch but not sure what to do to correct it (or should I just go back to the obsolete method).
NodeFactory question
I've got a question about NodeFactory. From an example on Umbraco TV, I have the following code
However, it seems the Node class is obsolete. So, I tried with the umbraco.NodeFactory class and I get an error -
The type 'umbraco.interfaces.INode' is defined in an assembly that is not referenced. You must add a reference to assembly 'interfaces, Version=1.0.4029.25827, Culture=neutral, PublicKeyToken=null'.
My version info is: umbraco v 4.6.1 (Assembly version: 1.0.4029.25836)
I know that there is a version mismatch but not sure what to do to correct it (or should I just go back to the obsolete method).
Thanks for any help.
Hi,
You have to add a reference to the Interfaces dll also and then use umbraco.nodeFactory.
Cheers,
Richard
The INode interface was added in Juno so that an abstraction layer existed on NodeFactory and could be passed around
Awesome! That did the trick. Thanks guys!
is working on a reply...