Better Pathnames?

Created on 21 November 2014, over 10 years ago
Updated 10 February 2025, 13 days ago

If you install Global Redirect β†’ & Sub-Pathauto β†’ , the pathnames for Flag β†’ will automatically get improved straight out of the box.

For example, let's say the username of user 1 is "Administrator". Then as long as I set up the path of "user/1" as "administrator" in Pathauto, Mysite.com/user/1/bookmarks will show up as Mysite.com/administrator/bookmarks.

So out of curiosity, I tried to do something similar for Flag Lists and was able to actually make some progress. Here's what I did so far:

1) I created a list called "Custom List", which would produce the following two URLs: Mysite.com/flag/lists/1 & Mysite.com/user/1/flag/lists/1.

2) I edited the "flag_lists_user_list" View. First I changed the path from "/flag/lists/%" to "/list/%". Then in Contextual Filters I used "Flag lists: List title" instead of using "Flag lists: fid", with the same exact settings except for "More" (screenshot attached). This resulted in Mysite.com/flag/lists/1 not working anymore, but Mysite.com/list/custom-list now works.

So is there a way to do the same thing so that I can use Mysite.com/administrator/list/custom-list instead of Mysite.com/user/1/flag/lists/1?

I) I think the first & easier part would be to get Mysite.com/user/1/list/custom-list working.

II) Then figure out why Sub-Pathauto doesn't work with Flag Lists. Because if it does, then both Mysite.com/user/1/list/custom-list & Mysite.com/administrator/list/custom-list should work instead of just Mysite.com/user/1/list/custom-list.

And to clarify the roles of Global Redirect vs. Sub-Pathauto:

A) Global Redirect redirects Mysite.com/user/1 to Mysite.com/administrator.

B) Sub-Pathauto makes it so that at least both Mysite.com/user/1/bookmarks & Mysite.com/administrator/bookmarks work in the case of Flag, because Global Redirect doesn't work here.

Any ideas? I know this is probably not a priority, but I think it's at least something to think about later on especially in terms of consistency & SEO.

πŸ’¬ Support request
Status

Closed: outdated

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jay.lee.bio

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024