0

I'm creating Views blocks on profile pages such as drupalsite.com/users/testuser. I need to display blocks such as "Test User's Posts" and "Test User's comments." What is the best way to get the User ID of the profile pages' subject in order to filter the content based on this User ID?

1

In this case, /user/testuser is just an alias of /user/n where n is the user ID. Which means the user ID is available in the unaliased URL, allowing you to do this.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.