When we reach last node in a list why not to hide 'next' link instead of pointing to the first node?

Or even better to add option in view settings: cycle or not these links.

Comments

gaëlg’s picture

Status: Active » Needs work

This is a performance matter. The behavior implemented by the module need to execute the view with no pagination to get the whole list of nodes, which can be very long if there is a bunch of results.
That's why I made this calculation happen only if the user click for the first time on a next/previous button for this view. If the user never use those buttons, the entire result set is never calculated, to avoid unneeded processing. So that when the buttons are rendered, we don't know if the item currently viewed is the first or the last of the list.
Of course this could be added as an option, with a warning message about performances. Or maybe there's a clever way to do, like set this info in the GET parameters. Feel free to suggest a patch.

gaëlg’s picture

Status: Needs work » Fixed

Actually I could use the total_rows attribute of the view. Committed and available in rc1.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.