Page MenuHomePhabricator

"returnto" URL parameter
Closed, ResolvedPublic

Description

A "returnto" URL parameter (or whatever we name it) to be used in links from the wikis would allow the tool in Toolforge to provide a "Back" button—without assuming all users will come from an English Wikipedia article.

Not sure if there is an easier way to get the page URL from a MediaWiki page to use for this in templates, but https://{{SERVERNAME}}/wiki/{{PAGENAMEE}} works...

Event Timeline

Both the Toolforge tool and the user script (https://phabricator.wikimedia.org/T315364) have been updated to support returnTo functionality.

Example:
https://view-it.toolforge.org/?q=Q2&returnTo=https://en.wikipedia.org/wiki/Earth produces:

Screen Shot 2022-08-21 at 9.43.36 PM.png (684×782 px, 193 KB)

Since clicking the View it! portlet link now opens in a new tab (T317214), it may be a good idea to remove the "return to article" button, as all the user needs to do to return to the article is switch or close tabs. Removing the button also helps reduce how crowded the top of the page is getting, especially with advanced search enabled.