With pathauto in core, we get pretty, SEO-friendly paths for our content. While the path works fine for the "View" tab (you get www.example.com/test-page
for example), the "Edit" and "Revisions" tabs (as well as other tabs/paths added by contrib modules, like the "Devel" tab) are still in the form of www.example.com/node/1/edit
, www.example.com/node/1/revisions
, www.example.com/node/1/devel
. We should have them be www.example.com/test-page/edit
, www.example.com/test-page/revisions
and www.example.com/test-page/devel
respectively.
There are a few modules that implement this in Drupal:
Sub-pathauto (Sub-path URL Aliases) has more than 9000 installations, is minimally maintained, with last commit in the 7.x branch back in 2013, and has 24 pending issues in the 7.x queue (). Clearly this one seems to be the choice of many, so there must be a reason. It seems to have a known issue that depends on a core issue (#1419).
Extended Path Aliases has close to ~3000 installations, actively maintained status, last commit in the 7.x branch about 2 years ago, with 8 open issues in the 7.x queue. This one is my personal favorite for the simple reason that it worked without dramas out of the box when I tested it many years ago, and has been working perfectly for the sites I needed it.
[edit] the reason why this module works where Sub-pathauto and others fail (due to the core bug I mentioned I guess), is because it relies on php runkit. We should fix core so that the 3rd party dependency is not a requirement (hard to get runkit on shared hosting).
Recent comments
Sorry the query works. The problem is, the global $language doesnt update unless page cache is rebuilt anytime the site language changes. Question is why and how to fix?
How to get the current page language?
When there are thousands of links to be listed, it is better to split the map. Otherwise, hreflang is a good choice.
xmlsitemap module generates wrong links for languages
I don't fully understand why someone would need multiple sitemaps for different languages, but you certainly know better. Good luck!
xmlsitemap module generates wrong links for languages