Let's say you want to create page view displaying special content for example (articles) created by specific user, and you want to use user name in the url instead of the UID, something like /articles-by/admin instead of /articles-by/1.
How to use User Name instead of UID in view tab ?
To do so follow the following steps:
- Create a view page with the path /articles-by/%user
- Create a user relationship
- Add contextual filters with User Name
- Configure your contextual filter ((author) User: Name) like this by adding a Specify validation criteria:
- Save your view configuration.
Now you have a view list articles created by user with a user name in the url instead of uid as number, by going to https://example.com/articles-by/admin you will see the articles created by the admin and so on!
I hope this was helpful.