1

I need to create a View which displays content of users that their username should be passed as contextual filter. The number of parameters (usernames) are not specified but the View must include every username that is passed via url, as an example

example.com/some-path/user1
example.com/some-path/user1/user2
example.com/some-path/user3/user2/user12

the view must include all of pathes like the above ones and filter the contents but I really have no idea how to implement this using Views UI. I can do this programmatically by looping through each component of the url but I don't want to use such methods.

4
  • why dont you use comma seperation for user name like "example.com/some-path/user3,user2,user12" ?
    – vgoradiya
    Commented Aug 13, 2015 at 6:25
  • @VimalGoradiya how do I config the View??
    – M a m a D
    Commented Aug 13, 2015 at 6:27
  • need to add Content: Author relationship and in contextual filter need add User: Name. Where you can pass multiple username seperated by comma.
    – vgoradiya
    Commented Aug 13, 2015 at 6:35
  • I already did this before but I can't get the results when I type user1,user2
    – M a m a D
    Commented Aug 13, 2015 at 7:35

1 Answer 1

1

All you need to check "Allow multiple values" true by click on More toggle part of contextual filters field works well.

example.com/some-path/user3,user2,user12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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