Next-Prev is based upon date
I was wondering if there was a simple way to do something similar but based upon the contents of a custom field?
bit of background - I’m preparing informative entries according to a numbered scheme, but am completing them in a moderately random order. In each entry I have a custom field to which I’ve enter a sequence number.
So initially I will have a few entries whose sequence numbers are dotted round all over the place, e.g.
entry 1 #0020
entry 2 #0055
entry 3 #0010
entry 4 #0001
entry 5 #0100
now if I’m looking at entry3[#0010], then I don’t want my prev/next to be entry2/entry4
BUT entry4/entry1 because their sequence numbers are #0001 & #0020
So, for the ‘next’ [as an example] I’m sort to thinking about using the weblog tag, ordering it by the sequence number field, and seeing if the sequence number of each entry is more than that of the one I’m looking at.
However, where I get stuck is that I can’t see how just to find the first entry that passes the test, i.e. I want just one ‘next, and not 10 or 20 nexts!
have I missed some clever EE way of solving this?
thanks in advance