Once a link is clicked in a view and the node appears with the previous and next button, there is no way to get back to the original page where the link was clicked. In my experience that is essential for usability.
Thanks

Comments

gaëlg’s picture

Status: Active » Needs work
Issue tags: +Novice

If you want to submit a patch for this, I can help you.
What is needed:
*Add an option in the settings to activate the back button or not (default to no for backward compatibility).
* Create the link in views_navigation_get_links() if the option is checked, with 'href' => 'views_navigation/' . $cid . '/back'.
* In views_navigation_store_query(), store the current path along with the query.
* In views_navigation_router(), if $pos=='back', get the cached query from the cid, and the path which has been stored along with it. Redirect to this path.

michael_otolorin’s picture

Assigned: Unassigned » michael_otolorin
michael_otolorin’s picture

Assigned: michael_otolorin » Unassigned
lunatic’s picture

Status: Needs work » Needs review
StatusFileSize
new3.44 KB

hi,

here is a patch the adds the "back to view" functionality as described in #1

lunatic’s picture

StatusFileSize
new3.52 KB

The previous patch fails to redirect when pager exists and user is leaving the view from a page other than the first. Also when there are exposed filters on the url.

This patch fixes it

gaëlg’s picture

Status: Needs review » Fixed

Great, thank you! Committed to dev with little improvements.

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