foreach ($groups as $group) {
you expose a new view, but there is no code at all to filter by group that view, so it basically doesn't work at all.
I added this to the view filters:
$terms = taxonomy_get_term_by_name($group);
$term = $terms[0];
$view->filter = array(
array (
'tablename' => 'term_node_1',
'field' => 'tid',
'operator' => 'AND',
'options' => '',
'value' => array (
0 => $term->tid,
),
),
);
and now it works, but I don't know if "term_node_1" is the correct string in every deployment.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | ads_active_by_group_view.patch | 1.63 KB | malaussene |
Comments
Comment #1
malaussene commentedFrom the title of the view, it seems that 'Ad: Status' must be set to 'active'.
Here is patch that add the 2 filters to the 'active_@group_group_ads' views:
Comment #2
jeremy commentedExcellent, thanks!
Patch applied in the development tree. Testing would be greatly appreciated.
Comment #3
malaussene commentedthank you, and keep the hard work :)
Comment #4
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.