By vancelee on
By default Drupal can list out all blog entries of a particular user,
1. but will that be possible if I want to have, say, all story nodes contributed by a particular user? (and vice versa)
2. furthermore is it possbile to list out all nodes (regardless of types) contributed by a particular user?
Can the default Drupal do this? Or if I need some extension modules?
Thanks a lot!
Comments
yes
You can do this fairly easily with a php snippet on a page. Here's a sample snippet to get you started:
Create a new node of the type page, and select PHP Code for the format, and paste this in. There ya go. To use it, just go to the node and add on a username and optionally a node type. Example, if you are using clean URL's:
node/thisnodeid/username/story
would list all the nodes of type story by user 'username'.
Or you could just do
node/nodeid/username
and list all nodes by username of any type.
Didn't work for me
I tried this, but regardless of the parameters it always shows some 9 items of content, always the same ones
try this
Hi Adolg,
Try some of the sliced bread snippets in the Drupal Handbook.
there's a few variations of "listing nodes created by a certain user" there. The snippets in there are tested so they should work for you.
Dub
Currently in Switzerland working as an Application Developer with UBS Investment Bank...using Drupal 7 and lots of swiss chocolate