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:
- advanced help
- http://views.doc.logrus.com/
- http://www.templatezine.com/2010/03/drupal-creating-views-programmatical...
- http://drupal.org/node/685432
- Views
- Calendar
- Tagadelic Views
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.
