I'm looking for examples of paging with lots of nodes? Binding nodes to a datasource (If you can even do that?) and anything else interesting :) - Please post any links below
You can bind using the ChildrenAsTable() method on a Node object. Be aware that only children that matches the type of the first child will be used as the first child will work as the schema in the table. To get specific types of children there's an overload where you can specify a doctype filter.
The nodefactory is a wrapper for the published xml and as such it got decent performance. However, it's nowhere near as fast as XSLT when coming to more advanced queries (because you have to filter everything yourself).
My Simple Search for Umbraco uses the NodeFactory. So you can take a look into the code or use it: You can get a List<SearchItem> or a XpathNodeIterator back from the searcher.
Thanks chaps - I'm 'really' trying to use XSLT everywhere, but each day I start to hate it more when I have to start doing more complex things. This is why I was hoping this would be my saviour :(
Good Examples Of Using umbraco.presentation.nodeFactory?
Wasn't sure where to put this, but was wondering if there are any good examples of using umbraco.presentation.nodeFactory? I can't find anything on Umb.Tv or wiki just this page - http://our.umbraco.org/wiki/reference/api-cheatsheet/working-with-the-nodefactory
I'm looking for examples of paging with lots of nodes? Binding nodes to a datasource (If you can even do that?) and anything else interesting :) - Please post any links below
You can bind using the ChildrenAsTable() method on a Node object. Be aware that only children that matches the type of the first child will be used as the first child will work as the schema in the table. To get specific types of children there's an overload where you can specify a doctype filter.
The nodefactory is a wrapper for the published xml and as such it got decent performance. However, it's nowhere near as fast as XSLT when coming to more advanced queries (because you have to filter everything yourself).
Hope this helps!
My Simple Search for Umbraco uses the NodeFactory. So you can take a look into the code or use it: You can get a List<SearchItem> or a XpathNodeIterator back from the searcher.
hth, Thomas
Thanks chaps - I'm 'really' trying to use XSLT everywhere, but each day I start to hate it more when I have to start doing more complex things. This is why I was hoping this would be my saviour :(
Awesome Thomas, going to download it now :)
is working on a reply...