Page 1 of 1

next entry sort just like next page sort

PostPosted: Fri Jun 26, 2015 9:30 pm
by winters
does someone know if there is a way to use next (and prev) entry but sort them on title just like next page the option has (http://book.pivotx.net/page/app-b#anchor-nextpage)?

thanks!
winters

Re: next entry sort just like next page sort

PostPosted: Sat Jun 27, 2015 8:34 pm
by Harm10
The next and previous options for entries are dependent on the sort order you are displaying them in.
You can view entries through archive display, category display and weblog display.
I assume you want to use this in the weblog display.
Then you should order this weblog by title. You should be able to use the orderby http://book.pivotx.net/index.php?page=app-b#anchor-subweblog--weblog in the template you are using to display the weblog.

Re: next entry sort just like next page sort

PostPosted: Sat Jun 27, 2015 8:52 pm
by winters
thanks for the info harm

this will be used on an entry. so is it correct that when you setup the weblog with a sort on title this
will influence the entry from the weblog and so the next (prev.) entry

better I will just try and report back

thanks
winters

Re: next entry sort just like next page sort

PostPosted: Wed Jul 01, 2015 4:22 pm
by winters
No matter what I try I do not get the result I want, the next en prev entry sorting on title

Could there be something I am overlooking?

thanks
winters

Re: next entry sort just like next page sort

PostPosted: Wed Jul 01, 2015 7:59 pm
by Harm10
You are right. It doesn't work. Setting up a weblog sorting on title is easy but as long as you stay on front page or archive the titles are sorted.
As soon as you display an entry in detail the prev/next links are the "normal" ones.
I have to investigate this further. But right now it is just too hot for that.......................... :oops:
So I will come back and try to solve this for you.

Re: next entry sort just like next page sort

PostPosted: Thu Jul 02, 2015 6:21 pm
by winters
thanks harm!
winters

Re: next entry sort just like next page sort

PostPosted: Fri Jul 03, 2015 7:48 pm
by winters
Hi harm

I did some searching but can't seem to find where (In witch file) this is taken care of?

do you know witch file that is?

thanks again,
willem

Re: next entry sort just like next page sort

PostPosted: Sat Jul 04, 2015 8:23 am
by Harm10
Most of the tags coming with PivotX itself are located in modules/module_smarty.php.
I have taken a brief look and the entry implementation does not accept a sort parm.
As there are 2 implementations needed for flat file and sql the routine points to get_next_code (same folder in entries_flat.php and entries_sql.php).
As you can see there currently only date is used to decide what is the next entry.
You maybe already know this but development of PivotX has long stopped. We only do error fixing now.
You could try to fiddle around yourself with this code but as it is core code it could be replaced in future by an error fix.

Another option could be to code a weblog in the smarty theme template for the entry with exactly the same specifications, go through this entire weblog and create an array for all entries, pick out your current entry and use the previous and next occurence in the array to create prev/next links from.
Quite some code for experts............... ;)

Re: next entry sort just like next page sort

PostPosted: Fri Jul 17, 2015 11:20 pm
by hansfn
OK, the reason nextentry and previousentry only works for sorting by date is that, well, it's a blog: "[website] consisting of discrete entries ("posts") typically displayed in reverse chronological order". Not very helpful, but at least it's an explanation.

Harm's suggestion, "code a weblog in the smarty theme template for the entry with exactly the same specifications, go through this entire weblog [...]", is actually much easier than it seems, but I don't have time to write that smarty code for free - sorry.

Re: next entry sort just like next page sort

PostPosted: Mon Oct 26, 2015 7:01 am
by sarwanov
I am strongly agree with Harm10's idea and thoughts and I appreciate his efforts.