Postingan

Menampilkan postingan dari Agustus, 2020

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. ...

Menampilkan User and Flagged content

Gambar
  order by                             active                           oldest                           votes                       Up vote 0 Down vote I had the same issue where I wanted to show the title of the content flagged with a certain flag by each user. I solved it as follows: Created 2 views - 1 of users and another of content In the user view, add 'Flags: User's flaggings' relationship ( Refer attachment user_view ) In the content view, add 'Flags: Node flag' relationship and 'Flags: User uid' contextual filter ( Refer attachment content_view ) Select 'Display contents of "No results found"' for 'WHEN THE FILTER VALUE IS NOT IN THE URL' in the co...

Menampilkan author name pada views drupal

Pada tab 'Relationships' di 'Advanced' options and click 'add' Select the option 'Content: Author' and apply Now when you go to add fields you will notice several new fields, including 'User: Name' When configuring 'User: Name' make sure that the relationship field matches what was set as the identifier under the 'Relationship'. If you have only one relationship set then it should be selected automatically.