/** * Parse the data into the template */ private function parse() { // show message $this->tpl->assign('widgetLocationItems', FrontendLocationModel::get((int) $this->data['id'])); // hide form $this->tpl->assign('widgetLocationSettings', FrontendModel::getModuleSettings('location')); }
/** * Load the data */ protected function loadData() { $this->items = FrontendLocationModel::get($this->data['id']); $this->settings = FrontendLocationModel::getMapSettings($this->data['id']); if (empty($this->settings)) { $settings = FrontendModel::getModuleSettings('location'); $this->settings['width'] = $settings['width_widget']; $this->settings['height'] = $settings['height_widget']; $this->settings['map_type'] = $settings['map_type_widget']; $this->settings['zoom_level'] = $settings['zoom_level_widget']; $this->settings['center']['lat'] = $this->items['lat']; $this->settings['center']['lng'] = $this->items['lng']; } // no center point given yet, use the first occurance if (!isset($this->settings['center'])) { $this->settings['center']['lat'] = $this->items['lat']; $this->settings['center']['lng'] = $this->items['lng']; } $this->settings['maps_url'] = FrontendLocationModel::buildUrl($this->settings, array($this->items)); }