Closed (fixed)
Project:
Location Views
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
11 May 2007 at 21:12 UTC
Updated:
14 May 2007 at 18:57 UTC
I'm trying to get this to list the states that have upcoming events so that the user can find events near them. Unfortunately, I can't get it to work at all - it just display the page title but nothing in the body:
$view = new stdClass();
$view->name = 'trainings';
$view->description = '';
$view->access = array (
);
$view->view_args_php = '';
$view->page = TRUE;
$view->page_title = 'Find a training near you';
$view->page_header = '';
$view->page_header_format = '3';
$view->page_footer = '';
$view->page_footer_format = '3';
$view->page_empty = '';
$view->page_empty_format = '3';
$view->page_type = 'teaser';
$view->url = 'trainings';
$view->use_pager = TRUE;
$view->nodes_per_page = '10';
$view->sort = array (
array (
'tablename' => 'event',
'field' => 'event_start',
'sortorder' => 'ASC',
'options' => '',
),
);
$view->argument = array (
array (
'type' => 'province',
'argdefault' => '2',
'title' => '',
'options' => '',
'wildcard' => '',
'wildcard_substitution' => '',
),
array (
'type' => 'country',
'argdefault' => '2',
'title' => '',
'options' => '',
'wildcard' => '',
'wildcard_substitution' => '',
),
);
$view->field = array (
array (
'tablename' => 'node',
'field' => 'title',
'label' => '',
'handler' => 'views_handler_field_nodelink',
'options' => 'link',
),
);
$view->filter = array (
array (
'tablename' => 'node',
'field' => 'status',
'operator' => '=',
'options' => '',
'value' => '1',
),
array (
'tablename' => 'node',
'field' => 'type',
'operator' => 'OR',
'options' => '',
'value' => array (
0 => 'content-training_event',
),
),
array (
'tablename' => 'event',
'field' => 'event_start',
'operator' => '>',
'options' => '',
'value' => 'now',
),
);
$view->exposed_filter = array (
);
$view->requires = array(event, node);
$views[$view->name] = $view;
Comments
Comment #1
seanrBTW, this is the 4.7 version.
Comment #2
seanrThis was a PEBKAC error.