I am looking to display my own block on user profile page. The block will to display the username of the user whom profile we are viewing.
I went ahead and created a view, show users, block.
Added contextual filter for UIID, Raw value from URL. Path component 2
User profile and a user sub-pages have this structure: domain.com/u/username (user main profile page) domain.com/user/845/posts (user posts, where 845 is uid)
How can I add a contextual filter that will work on both cases? The username is changed a little by path auto. Dashes, commas, uppercases and such are removed so that may be why raw value from URL is not working.
Btw, I am open to creating a custom user profile by creating user/% view for user profile.