0

In Drupal 7, I have defined a node type 'article' which has an 'author' field (The author is not a user, but just a 3rd party contributor). Now I want to list articles by the each author in a view. How can I do that?

I know that it can be done somehow using contextual filters but got quite perplexed so appreciate your help.

2

In your case, i would create a Vocabulary "authors" and add them with a Auto Tag Widget to the Content Type. And add the Authors as a Taxonomy Tag. There are much more Handly then Text Fields. Then you can easily Create a View with the author Tag. And much more, you can also add more fields to the Taxonomy such as author Picture and Author Description.

|improve this answer|||||
0

Ideally the author should be a reference either to an user of the site or to a content type call author, then like you mention using a view you will pass an argument or contextual filter and show only nodes that have that author.

If in you case you don't use a reference, then on your view you just need to add a filter indicating the value of the field with the author name.

Here is where to set the filter:

enter image description here

|improve this answer|||||
  • Well the author is just a string as they are entered by admin on the field. So how can make the filter? Thanks – alfish Sep 2 '12 at 22:18
  • I added an screenshot indicating where do you go to add a filter to your view. – Emil Orol Sep 2 '12 at 22:22
  • oh dear, I know how to add a filter,what should be at 'Content Type = File'? :) – alfish Sep 2 '12 at 22:28
  • Don't worry about that as that only apply to my view. In that case that said that the content type has to be the one call "File" and again that is a content type of my site. – Emil Orol Sep 2 '12 at 22:29
  • In you case use Content Type = article – Emil Orol Sep 2 '12 at 22:30

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.