Add a standalone map page

Render an embeddable map at /map url, so it won't contain any footer
or header content.

Change-Id: I462d5d641bb96372f8a8086eacf43165fb74420a
This commit is contained in:
Marton Kiss 2016-02-29 10:04:13 +01:00
parent 69d7293ba0
commit adef663bbc
3 changed files with 19 additions and 0 deletions

View File

@ -94,6 +94,7 @@ function groups_directory_views_default_views() {
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler->display->display_options['title'] = 'Groups map';
$handler->display->display_options['use_more_always'] = FALSE;
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['cache']['type'] = 'none';
@ -134,6 +135,11 @@ function groups_directory_views_default_views() {
/* Display: Content pane */
$handler = $view->new_display('panel_pane', 'Content pane', 'panel_pane_1');
/* Display: Page */
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->display->display_options['path'] = 'map';
$export['groups_map'] = $view;
return $export;

View File

@ -22,6 +22,9 @@ function openstack_bootstrap_preprocess_page(&$variables) {
unset($variables['navbar_classes_array'][$key]);
$variables['navbar_classes_array'][] = 'navbar-os';
}
if (request_path() == 'map') {
$vars['theme_hook_suggestions'][] = 'page__map';
}
drupal_add_css('//netdna.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.css', array('type' => 'external'));
}

View File

@ -0,0 +1,10 @@
<?php
/**
* @file
* Display the map without any footer or header.
*
*/
?>
<div class="map-container">
<?php print render($page['content']); ?>
</div>