Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.6
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
23 Jun 2009 at 06:49 UTC
Updated:
16 May 2024 at 00:50 UTC
Jump to comment: Most recent
Comments
Comment #1
Anonymous (not verified) commentedStill having issues with this...
To explain what I'm wanting:
I have 2 content types: Activities and Areas. One of the fields in an Activity is a node_reference to an Area (i.e. activities are located in a specific area). I then have 2 views to display the nodes from each content type. The Areas view displays the area nodes whose titles I've set to link to the Activities view.
The problem occurs, however, when there aren't any Activity nodes in a given Area - clicking on the Area title takes you to an empty view. This is not desirable, so I'm trying to make it so that only Areas that have associated Activity nodes are displayed.
I'm now trying to use the following code, but it's still producing empty results:
If anyone could help me out, or tell me of a better/easier way to do what I'm wanting, it'd be much appreciated!
Comment #2
dawehnerdid you forgot pre_execute() ? its definitive needed!
Comment #3
Anonymous (not verified) commentedThis code produced the following error:
But adding
$my_view->set_display();just before the pre_execute() did the trick.Thanks dereine!