By oilnam on
Hello,
Let's assume I have a bunch of users, I want each of them to have a page listing his own articles.
The easy way is a view where:
(author) User: Name (= name-of-the-author)
but then I would need a different view for each author, which is simply insane if I have, say, 300+ authors.
I think a better way would be something like:
(author) User : Name (= current-node-owner)
so I could use the same view for all my authors.
Fine, but how to make this with views? (views 3.0, running on D7).
Any ideas, or better solutions?
Thanks a lot.
Comments
Contextual filters.
1. Add new relationship to "Author"
2. Add new Contextual filter - "User:ID"
3. In the "User:ID" contextual filter's settings, select "Provide default value " > "User ID from URL" > "Also look for a node and use the node author"
4. Save.
You won't see any result in live preview then. Enter a UID (author's user ID) manually or put the block. it will take author's UID automatically and show nodes from that UID.
What's new and changing in PHP 8.4
Perfect
That was exactly what I was looking for. Thank you very much Ayesh :)