views:

20

answers:

1

Hello,

I have a page which should list nodes. The views is called from a locality page (a taxonomy term page). What I need is almost the same as using the Taxonomy: tid in arguments and passing the tid. I can't use the term_node table, as (for other reasons) we have a custom table term_node_hierarchy (with nid and tid only). The table term_node_hierarchy is like term_node but also saves the tid of the parents (from an "external" code)

I've been looking for options but still no joy.

Currently I'm building an array of the nid's that should be displayed on the current page, and passing them like print views_build_view('embed', $view, $matching_nids); but the Argument Node: ID states This argument is a single Node ID. As said, only the first node is displayed when printing the views. It would be great if it could filter on more than one nid.

I'm open to any kind of suggestions on how to do this.

Thanks

A: 

You could create your own module for this. You could populate the $page_content variable with the results of your own custom query where you allow the user to sort against multiple nids. You could do this a number of different ways. You could display a list of the existing nids with corresponding checkboxes, so that, when the user clicks submit, all the nids that match the selected checkboxes get used in the query. Then you just display the result of that query. That's the easiest way I can think of to offer that degree of flexibility.

Dylan West
I'm currently doing the query on a tpl.php page, so I think its quite similar. My goal was using less code, basically hoping that some kind of function would allow me to filter by the array of nids. Talking with other people, I saw this is feasible in Drupal 6 / Views 2, but not on Views 1.
Ferran Gil