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
Hi
The Listing.GetNextNode and Listing.GetPreviusNode Does not work as expected.
If statements are as follows:NextNodeif ((int) indexOf == nodeSiblings.Count - 1 || (int) indexOf == -1 || ((int) indexOf == 0 || (int) indexOf + 1 > nodeSiblings.Count))
return (DynamicNode) null;
PreviusNodeif ((int) indexOf == nodeSiblings.Count + 1 || (int) indexOf == -1 || ((int) indexOf == 0 || (int) indexOf - 1 < nodeSiblings.Count))
This means that no nextnode is present if we are on the first node which is wrong ofc And no previusNode is present if current node is smaller than siblings list which is wrong.
The correct ones should look like this?
NextNodeif ((int) indexOf == nodeSiblings.Count - 1 || (int) indexOf == -1 || (int) indexOf + 1 > nodeSiblings.Count) return (DynamicNode) null;
PreviusNodeif ((int) indexOf == nodeSiblings.Count + 1 || (int) indexOf == -1 || ((int) indexOf == 0))
Using SmartBlog 2.0.9 And Umbraco 7.07
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
GetNextNode and GetPreviusNode
Hi
The Listing.GetNextNode and Listing.GetPreviusNode Does not work as expected.
If statements are as follows:
NextNode
if ((int) indexOf == nodeSiblings.Count - 1 || (int) indexOf == -1 || ((int) indexOf == 0 || (int) indexOf + 1 > nodeSiblings.Count))
return (DynamicNode) null;
PreviusNode
if ((int) indexOf == nodeSiblings.Count + 1 || (int) indexOf == -1 || ((int) indexOf == 0 || (int) indexOf - 1 < nodeSiblings.Count))
This means that no nextnode is present if we are on the first node which is wrong ofc And no previusNode is present if current node is smaller than siblings list which is wrong.
The correct ones should look like this?
NextNode
if ((int) indexOf == nodeSiblings.Count - 1 || (int) indexOf == -1 || (int) indexOf + 1 > nodeSiblings.Count)
return (DynamicNode) null;
PreviusNode
if ((int) indexOf == nodeSiblings.Count + 1 || (int) indexOf == -1 || ((int) indexOf == 0))
Using SmartBlog 2.0.9 And Umbraco 7.07
is working on a reply...