The use case: I have Organic Groups which are associated with a vocabulary, and I want to list various content types associated with organic groups that are associated with a taxonomy term.
I ask the question here because it could be the entrance for some people (like myself) to actual views development.
How difficult would it be to write a custom SQL query, but plug into views for display (and integration with panels)? I remember reading this isn't the views way, but it seems that presentation could be separated from query formation.
Or, how many years in Views U would I have to spend to understand how to approach adding support for next-of-kin relations like this?
I've looked at views fusion but its emphasis is on displaying fields from multiple nodes, and it feels a little heavy because of this. Appreciate your thoughts!

Comments
more info
what you described so far is just standard Views based on taxo and node type. for example, here are the working groups on the site (i only have one node type as a group right now - thats a simple extension of this View.
Not that simple
Let me try to be clearer, because I'm pretty sure it can't be done with views as is:
Content of type "News" belongs to an organic group "FOSS Action"
The organic group "FOSS Action" has the taxonomy term "Boston"
We need to show all content of type "News" associated with the taxonomy term "Boston" by way of the organic group (in this case, "FOSS Action").
The taxonomy term attaches to the group, not the other content type, but it's the other content type we want to show. Clear, or am I still missing something?
~ ben melançon
member, Agaric Design Collective
http://AgaricDesign.com - "Open Source Free Software Web Development"
benjamin, agaric
i get it now.
i get it now. thanks.
architecturally, Views supports this but not all the the Views table definitions that you need are done. there is a start with og_node_data table (see og_views.inc). but that needs ot be expanded to link in the group's taxo. for an example of extreme Views tricks that are relevant here, see the Views integration that comes with very latest bio module.
in the end, this might be too hard to do via Views. In that case, just query and iterate and render the nodes. it still works.
I think this will do it --
http://drupal.org/project/ReferencedByFilter
and discussion here: http://groups.drupal.org/node/6441
Cheers,
Bill
FunnyMonkey
Tools for Teachers
FunnyMonkey
Thanks for the link!
Thanks for the link!
Ah, no cigar for me. I'm
Ah, no cigar for me. I'm looking for a field module that adds nodes that reference nodes returned by the view.
custom it is
Thanks Moshe, thanks Bill.
The ReferencedByFilter is Nodereference only, and we need organic groups affiliations.
It looks like a custom query is the way to go (or make all nodes belonging to a group inherit and save themselves with the same taxonomy terms), though I'd love to know more about the Views way, to extend this for others' use. I don't think I'll be able to understand it quickly enough.
(On a custom query– can it be handed to views display for a way of theming that designers are familiar with?)
~ ben melançon
member, Agaric Design Collective
http://AgaricDesign.com - "Open Source Free Software Web Development"
benjamin, agaric
Thanks again... taking the easy way out for now
I've looked into the latest dev bio and og_views and I can definitely see helping out here to provide this kind of functionality.
However in our case (WSF2008), after thought, it makes more sense to add certain taxonomy terms from groups directly to nodes behind the scenes.
Next person who needs this for organic groups, though, contact Agaric. I'd like to help.
benjamin, agaric
Solution
For me, this nodequeue solution didn't do it... Here's something that I came across: http://labs.calibrate.be/2009/08/20/custom-sql-queries-in-views/