On my site, we have "Author Profiles" (nodes with CCK fields for Name, Research interests, User ID, etc...) as well as Biblio publications. I would like to be able to generate a Views block to place on these Profile pages that lists all of the corresponding author's publications. Since I have the user id in the Profile node, I can pass that as an argument to Views and theoretically could match it up with Biblio nodes (since Biblio now has the "Drupal User ID" field on the edit author page). However, in practice this is currently impossible because the "Drupal User ID" field is not exposed in Views as a filter choice. The nearest thing, Biblio Contributors, is a select list and doesn't appear to take arguments.
Is there another way to do this currently, or can this functionality be added to the next release? Thanks!
Comments
Comment #1
rjerome CreditAttribution: rjerome commentedNo I don't think this is currently possible, but I think it would be fairly simple to implement. Actually, on the weekend I revisited the Views code a bit and hope to add some additional functionality in terms of sorting and filtering very soon. I will keep your request in mind and make sure it's one of the first to hit the street.
Ron.
Comment #2
Dane Powell CreditAttribution: Dane Powell commentedThanks a lot for the quick response Ron, I look forward to it. Let me know if I can help.
Comment #3
danieleboyo CreditAttribution: danieleboyo commentedsubscribing
This module is awesome so far! keep it up!
daniele - Evolving Web
Comment #4
rjerome CreditAttribution: rjerome commentedI just released 6.x-1.5 which contains a much more complete Views integration. Give it a try and let me know how it works..
Ron.
Comment #5
Dane Powell CreditAttribution: Dane Powell commentedAwesome, this is a great step forward. I still can't figure out how to do what I want, but I think that's due to a limitation with Views and not Biblio (I need to figure out how to pass arguments from each Member Profile to a View that will generate a list of all publication by that member, and then display that View inline on the Member Profile)
Comment #6
rjerome CreditAttribution: rjerome commentedI don't profess to be a Views expert either, but I must say the this exercise has made me a believer, and I thinking seriously about doing all the biblio pages using Views.
What about making your entire member profile page with views?
Comment #7
Dane Powell CreditAttribution: Dane Powell commentedOoh... what a neat idea. For now I think the views_attach module will get the job done, and it'll be a good first step in that direction for me.
Comment #8
Dane Powell CreditAttribution: Dane Powell commentedActually, I think I might need some more help with this - I'm not sure if it's a problem with Biblio, or if I just don't understand how to use Views.
I created a display of type "Node Content". The default argument passed is the user_id of interest (this comes from a CCK field on the Member Profile). I need to filter the view based on Biblio: Drupal User ID using the user_id argument. Any idea how to do this? I am completely stumped and don't really understand how arguments and filters can interact. :)
Comment #9
Dane Powell CreditAttribution: Dane Powell commentedI've taken a little closer look at it, and I'm thinking there's a bug with Views_attach. Can you just confirm this for me to make sure I'm not doing something wrong- if I pass a user_id (the number, not the user name) as an argument for Biblio: Drupal User ID, only Biblio publications with that author listed on them should be returned, correct?
Comment #10
rjerome CreditAttribution: rjerome commentedThat is correct, if you pass the Durpal UserID as a integer value to the argument handler, then only publications which have this UID as an author will be displayed. (I just tried it, and it works for me :-)
Ron.
Comment #11
Dane Powell CreditAttribution: Dane Powell commentedBeautiful! It did turn out to be a bug in views_attach #485832: Token data not passed to argument. With that nailed everything is working great. Thanks for your help.
Comment #12
ublanke CreditAttribution: ublanke commentedHey guys,
I'm still struggling getting views to work properly with biblio.
I started to experiment with a simple views page (not the views attachment) and wanted to set a hardcoded user id of biblio to test it.
When selecting biblio: drupal user id as filter, I can't set any value (apparently it automatically chooses the logged-on user).
Can anyone give me a short hint on how to combine views and biblio?
Sorry, just started drupal and im not very proficient,
cheers,
ulf
p.s.: reason to use views instead of standard biblio tabs, is that the tab doesnt show when using profile node (works just for the http://website/user/8). If there is a way to get the tabs into the profile nodes i'd be happy about that too :).
Comment #13
Dane Powell CreditAttribution: Dane Powell commentedI suspect that you need to learn the same thing that I did in order to make this work: arguments are basically filters that accept an nid or uid from the URL. In other words, do exactly what you're doing now, but do it with arguments instead of filters. To test (or "hardcode" a uid) I think you can provide a default argument. Let me know if you still need help. Remember that in order for this to work you need to link authors to their Drupal user ids in biblio.
Comment #14
ublanke CreditAttribution: ublanke commentedMany thanks about the argument hint. It works now.
Comment #15
Dane Powell CreditAttribution: Dane Powell commentedNo problem, glad to hear it works for you :)
Comment #17
aboros CreditAttribution: aboros commentedhi,
i am trying to do the same. i have 'profile' node type created with 'content profile' module. my users are associated with biblio authors on their user account page. i am going to create a block (or a tab) which appears on such 'profile node' pages and shows the corresponding publications.
i can easily create a view for this, however the argument 'Biblio: Drupal UserID' won't use relationships. if i add a relationship 'node: content profile' and then i set up the 'biblio: drupal userID' argument to use this relationship, provide default argument, user id from url, also look for a node id and use the author of the node, the query has no results at all.
i have a user with id 1943, his 'content profile' node is nid 69.
if i pass 69 as the argument, the query will look like this:
you can see at the and that it looks like this: node_users__biblio_contributor_data.drupal_uid = 69 .. but it should have the uid of the node author, which is 1943.
if i do not use relationships, just simply use the argument, it works, but i want to use a relationship. any idea what is wrong with it?
many thanks, i love your module, keep up the good job!
Comment #18
aboros CreditAttribution: aboros commented(sorry i didn't want to change issue title. changing back)
Comment #19
Dane Powell CreditAttribution: Dane Powell commentedI'm not sure why you need to use a relationship rather than an argument? Also you might want to open a separate support request instead of posting in a closed issue.