Views konten sesuai kategori user dan konten
Here is a slightly different approach:
* Create a user view.
* Add a contextual filter on user: uid. If no filter value is present, build a default value using the currently logged in user. (This will give you exactly one user object in your view -- the logged in user.)
* Add a relationship, using the relevant taxonomy reference field on the user accounts. This will bring you information about the "interest" term for the logged in user.
* Add another relationship, called "term: nodes marked with term" (or something like that). This will bring you information about all nodes marked with the interest term for the logged in user.
* Either set the view to display node teasers, or select a number of fields to display.
* Add a display as usual. Done!
Two things to note:
1) I haven't actually done this myself, so I *might* be missing something. It should work, though.
2) "Contextual filters" are called "arguments" in previous versions of Views. Could be good to know if you're not using the latest beta.
Good luck!
//Johan Falk, NodeOne
tambahan
-----------------
- pada Exposed Form--Query settings, centang opsi Distinct
Komentar
Posting Komentar