Closed (fixed)
Project:
View reference
Version:
6.x-2.8
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
19 Nov 2008 at 01:20 UTC
Updated:
10 Oct 2010 at 16:50 UTC
Is it possible to display the viewreference in another view then? I'm trying this with arguments, so that my be complicating things? Seems to be working will in the node view, but I can't get it to display in another view then?
Comments
Comment #1
danielb commentedSorry, I don't know. Just experiment with it. Seems another guy had a view of nodes that contained views in another issue - he is having some troubles with the arguments for the inner view, but the view itself I think is actually working?
Everyone is being very cryptic about their use-cases so I it is difficult for me to understand.
Comment #2
danielb commentedComment #3
danielb commentedReopen this issue if you need help on this.
Comment #4
dinomight commentedI actually am trying to do this as well, and I am having problems with the arguments. It seems that inputting the argument I need into the View that contains the references does not actually do the same thing as if I were to input an argument directly on a page with a reference.
You mentioned that people were being cryptic on what they were trying to do, so I'll see if I can be a little more specific. I am working on a coaches' questionnaire for a sports site. Each page of the questionnaire has its own view, which displays the data in a certain way (some use tables, some use lists, etc.). I'm now wanting to make a single page where we, the admins, can input a certain user name in the arguments which then is sent to every view of the questionnaire.
So, the argument I'm using is the user name. I've created a test view reference on a page, and if I enter a user name into the argument field on the edit page, everything works fine. That would be fine for a couple pages, but not for the 200+ user pages I would need to make. Instead, I would like to make a view that lists each of my view references and links to the full views.
Like I said, though, I can't seem to make the arguments work. When I test an argument in Views' preview, all I get is the heading View Reference with no actual content.
Comment #5
danielb commentedCombining knowledge from http://drupal.org/node/372064 and this old 5.x tut http://drupal.org/node/70145
I don't know if this will work but...
Set up the argument to use "Provide default argument"
and choose "PHP Code"
and then you can use $args[0] or arg() or $_GET['q'] to access the values in the URL and return them to the view as default args.
Something like that.
Comment #6
dinomight commentedThanks for the quick reply. I ended up working out a completely different way to do what I was trying (using panels to pass on arguments), but hopefully this will still be of some help to people with similar needs.
Comment #7
danielb commentedComment #9
stevegmag commentedHow did this get marked fixed?
Here's what I'm trying to do (simplified), and it seems like what the original issue is, but no one seemed to get close to addressing it.
Please let me know if you need any more information than this:
I have a content type "media". For that content type I have a view_reference field, and a node_reference field added.
I have a view set up using node reference, all pulling in the correct media bits as related in the node reference field argument passed to the view. These display one each node page correctly.
I have a view set up using views reference, set up exactly the same way as the node reference view, using the view reference as the argument instead of the node reference. I am anticipating that it will return just the media that has been flag by view reference when I'm on the view's page. What I'm getting with various results dependent on how I have "Action to take if argument is not present:", either I can get nothing or I can get all media, I can't get the media as related to the view via view_reference.
Basically, it seems like the view argument handling functionality of view_reference is completely missing.
If I should be using some custom PHP to provide a default argument, can we get a little more specific. Neither URLs seem to be covering this particular issue. Using: $args[0] = arg(1); which is what i think you were trying to include, just returns all media items.
Am I missing something? Is this not how this module was intended to work? Do I nee to investigate dinomight's panel - arg solution (A little bit of detail there would be nice)?
Comment #10
stevegmag commentedIt would appear that the view_reference fields can't be used in a view relationship (not displaying as an option) or as a filter in a view. Trying to use it as a filter returns: Error: handler for node_data_field_landing_reference > field_landing_reference_view_id doesn't exist! (field_landing_reference being the name of my views_relation field I created.
Comment #11
clashar commentedsubscribe