Coding a Views Page Display and Views Block Display?

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

I'm trying to figure out how to code a Views page display. I've managed to create a Views Default display.

I've looked at:

I'm confused.

It appears that if i want to create a default view I should implement the method or hook mymodule_views_default_views()
place the exported view in the method and wrap it with

$view = new view;

and
 
    $views[$view->name] = $view;
    return $views;

And the place that hook in the file mymethod.views_default.inc

In mymodule.module declare the Views API version with path of includes:

function station_reg_views_views_api() {
  return array(
    'api' => 2,
    'path' => drupal_get_path('module', 'station_reg') .'/includes',
  );
}

But how do I get the page to work and the block?
Do I create a mymodule_views_plugin_display_page and place it in mymodule_views_plugin_display_page.inc?
Do I also need to create a mymodule.views.inc to call the above plugin?

When I looked Calendar.views.inc and calendar_plugin_display_page.inc i get dizzy from all the options and settings.

Views Developers

Group organizers

Group notifications

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