Using pagination, I’m looking for a way to figure out which “page” of data needs to be displayed to show a specific node (I know its uid). The pagination function “after” is great, though of course it means that the uid in question will always be the first node returned in that query, as opposed to its natural position within a page.
How would I go about finding the “position” of a node in the results of a specific query? maybe just counting the uids until that node? Maybe I’m missing something obvious…
EDIT
What I’m trying to figure out now is how to have a value that iterates as the query results come in. Is there any way of doing that? Or put another way, a value for count(uid) that is not the final number at the end of the query, but rather an iterator that is updated within each node.
In fact, generally speaking, is there a way to declare and manipulate variables within a search query? (like the mysql user variables using ‘SET @iterator := 1’ syntax)