How to pass contextual filters programmatically through views_get_view_result()?

Events happening in the community are now at Drupal community events on www.drupal.org.
drupal7er's picture

In the live preview I can successfully pass the uid (the filter is set to uid) but doing that programmatically returns an empty array.

$results = views_get_view_result( 'my_view', 'default', array( 1 ) );

How should I pass the arguments here? Thanks.

Comments

Not passing args as array

drupal7er's picture

Not passing args as array seems to have worked.

$results = views_get_view_result( 'my_view', 'default', 1 );

Not passings args as an array worked 4 me 2

knowpixels's picture

This worked for me too on Drupal 6.22 and Views 2 :)

Views Developers

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: