I'm trying to find the next sibling of a document. It needs to be a document and not a node. I've seen that there is an extension method within uComponents that seems to do exactly that,
IEnumerable<Document>
GetFollowingSiblingDocuments()
[v2.3]
However there's a few things I don't really understand. I've downloaded 2.2. package beta 3, I had 2.0 previously. I've referenced the uComponents.Core dll in my solution.
For starters does [v2.3] mean it's not in the current release 2.2
What is an extension method, does it mean I can just write
using umbraco.cms.businesslogic.web; using umbraco.BusinessLogic; using uComponents.Core.uQueryExtensions; Document docPub = new Document(1234); xxx = docPub.GetFollowingSiblingDocuments();
Don't worry too much about the uComponents version numbers - truth is that we've been in beta with v2.2 for so long that everything thinks it's an official release (which it's not - that's v2.1) ... but it's stable enough that people are using v2.2 betas on production sites (e.g. me). I digress.
By calling "docPub.GetFollowingSiblingDocuments()", you will get a collection of Documents back, which you'll only need the first one.
uComponents uQuery Document Extension
I'm trying to find the next sibling of a document. It needs to be a document and not a node. I've seen that there is an extension method within uComponents that seems to do exactly that,
However there's a few things I don't really understand. I've downloaded 2.2. package beta 3, I had 2.0 previously. I've referenced the uComponents.Core dll in my solution.
For starters does [v2.3] mean it's not in the current release 2.2
What is an extension method, does it mean I can just write
and how do i express xxx?
Sorry for not really getting it.
Hi John,
Don't worry too much about the uComponents version numbers - truth is that we've been in beta with v2.2 for so long that everything thinks it's an official release (which it's not - that's v2.1) ... but it's stable enough that people are using v2.2 betas on production sites (e.g. me). I digress.
By calling "docPub.GetFollowingSiblingDocuments()", you will get a collection of Documents back, which you'll only need the first one.
or if you reference System.Linq, then you could try calling FirstOrDefault directly?
Cheers, Lee.
is working on a reply...