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...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
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...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.