hi,

I can't get the date browser to work if there's no argument. funny enough, it displays the right month but says: empty content. Am I doing anything wrong? pls help

the field "zeit" is a date field, the widget is the selector. no multiple option but required to and from dates. here's the view.

  $view = new stdClass();
  $view->name = 'Termine';
  $view->description = 'Calendar view of any date field';
  $view->access = array (
  0 => '1',
  1 => '2',
);
  $view->view_args_php = '';
  $view->page = TRUE;
  $view->page_title = 'Termine';
  $view->page_header = '';
  $view->page_header_format = '1';
  $view->page_footer = '';
  $view->page_footer_format = '1';
  $view->page_empty = 'Es wurden leider keine Termine gefunden.';
  $view->page_empty_format = '1';
  $view->page_type = 'date_views_browser';
  $view->url = 'termine';
  $view->use_pager = FALSE;
  $view->nodes_per_page = '99';
  $view->sort = array (
    array (
      'tablename' => 'node_data_field_zeit',
      'field' => 'field_zeit_value',
      'sortorder' => 'ASC',
      'options' => '',
    ),
  );
  $view->argument = array (
    array (
      'type' => 'content: field_zeit',
      'argdefault' => '7',
      'title' => '',
      'options' => 'month',
      'wildcard' => '',
      'wildcard_substitution' => '',
    ),
  );
  $view->field = array (
    array (
      'tablename' => 'node_data_field_zeit',
      'field' => 'field_zeit_value',
      'label' => 'Zeit:',
      'handler' => 'content_views_field_handler_ungroup',
      'defaultsort' => 'ASC',
      'options' => 'default',
    ),
    array (
      'tablename' => 'node',
      'field' => 'title',
      'label' => 'Termin:',
      'handler' => 'views_handler_field_nodelink',
      'options' => 'link',
    ),
    array (
      'tablename' => 'node',
      'field' => 'body',
      'label' => 'Beschreibung',
      'handler' => 'views_handler_field_teaser',
    ),
  );
  $view->filter = array (
    array (
      'tablename' => 'node',
      'field' => 'status',
      'operator' => '=',
      'options' => '',
      'value' => '1',
    ),
    array (
      'tablename' => 'node',
      'field' => 'type',
      'operator' => 'OR',
      'options' => '',
      'value' => array (
  0 => 'termin',
),
    ),
  );
  $view->exposed_filter = array (
  );
  $view->requires = array(node_data_field_zeit, node);
  $views[$view->name] = $view;

Comments

KarenS’s picture

Status: Active » Fixed

Sorry to be so slow in responding to this. You have to choose the option to 'Display all values' for the argument or it won't work right. I am adding some validation to test for that when you save the view.

Anonymous’s picture

Status: Fixed » Closed (fixed)