wildcard = '### Product ###'; $objTemplate -> title = $this -> headline; $objTemplate -> id = $this -> id; $objTemplate -> link = $this -> article_number; $objTemplate -> href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this -> id; return $objTemplate -> parse(); } return parent::generate(); } public function compile() { $GLOBALS['TL_CSS'][] = 'system/modules/ptt_module/assets/css/grid.css'; $GLOBALS['TL_CSS'][] = 'system/modules/ptt_module/assets/css/tl_ptt_product_view_style.css'; $GLOBALS['TL_CSS'][] = 'system/modules/ptt_module/assets/css/tl_ptt_article_form_style.css'; $GLOBALS['TL_CSS'][] = 'system/modules/ptt_module/assets/css/jquery-ui.css'; // $GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/ptt_module/assets/js/modernizr.custom.js'; $GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/ptt_module/assets/js/form.js'; $GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/ptt_module/assets/js/product_slider.js'; $GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/ptt_module/assets/js/jquery-ui.min.js'; $GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/ptt_module/assets/js/datalist.js'; $db = \Database::getInstance(); $t = $this -> Template; $this -> language = $GLOBALS['TL_LANGUAGE']; $query = ' SELECT * FROM `tl_ptt_products` WHERE `id` = ? '; $result = $db -> prepare($query) -> execute($this -> article_number); if ($result -> next()) { $row = $result -> row(); $images = unserialize($row['orderSRC']); for ($i = 0; $i < sizeof($images); $i++) { $images[$i] = PttHelper::uuidToPath($images[$i]); } $row['images'] = $images; $this -> product = $row; } // get translated field $this -> product['description'] = $this -> get_translated_field("description"); $this -> product['type'] = $this -> get_translated_field("type"); $this -> product['implementation'] = $this -> get_translated_field("implementation"); $this -> product['cooling'] = $this -> get_translated_field("cooling"); // $this -> product['pole_count_options'] = $this -> splitProductOptions($this -> product['pole_count_options'], 'pole_count_options'); // $this -> product['package_length_options'] = $this -> splitProductOptions($this -> product['package_length_options'], 'package_length_options'); $this -> product['type_options'] = $this -> splitProductOptions($this -> get_translated_field('type_options'), 'type_options'); $this -> product['implementation_options'] = $this -> splitProductOptions($this -> get_translated_field('implementation_options'), 'implementation_options'); $this -> product['cooling_options'] = $this -> splitProductOptions($this -> get_translated_field('cooling_options'), 'cooling_options'); $t -> product = $this -> product; $this -> loadLanguageFile('tl_content'); $t -> texts = $GLOBALS['TL_LANG']['tl_content']['form_labels']; } public function get_translated_field($field_name) { $field = $field_name . "_" . $this -> language; if (!array_key_exists($field, $this -> product)) { $field = $field_name . "_de"; } return $this -> product[$field]; } protected function splitProductOptions($strOptions, $tagId) { $ret = false; $arr = explode('|', trim($strOptions)); foreach ($arr as $key => $option) { if (empty($option)) { unset($arr[$key]); } } if (count($arr) > 0) { $ret = ''; foreach ($arr as $option) { $ret .= ''; } $ret .= ''; } return $ret; } } wildcard = '### Product ###'; $objTemplate -> title = $this -> headline; $objTemplate -> id = $this -> id; $objTemplate -> link = $this -> article_number; $objTemplate -> href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this -> id; return $objTemplate -> parse(); } return parent::generate(); } public function compile() { $GLOBALS['TL_CSS'][] = 'system/modules/ptt_module/assets/css/grid.css'; $GLOBALS['TL_CSS'][] = 'system/modules/ptt_module/assets/css/tl_ptt_product_view_style.css'; $GLOBALS['TL_CSS'][] = 'system/modules/ptt_module/assets/css/tl_ptt_article_form_style.css'; $GLOBALS['TL_CSS'][] = 'system/modules/ptt_module/assets/css/jquery-ui.css'; // $GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/ptt_module/assets/js/modernizr.custom.js'; $GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/ptt_module/assets/js/form.js'; $GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/ptt_module/assets/js/product_slider.js'; $GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/ptt_module/assets/js/jquery-ui.min.js'; $GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/ptt_module/assets/js/datalist.js'; $db = \Database::getInstance(); $t = $this -> Template; $this -> language = $GLOBALS['TL_LANGUAGE']; $query = ' SELECT * FROM `tl_ptt_products` WHERE `id` = ? '; $result = $db -> prepare($query) -> execute($this -> article_number); if ($result -> next()) { $row = $result -> row(); $images = unserialize($row['orderSRC']); for ($i = 0; $i < sizeof($images); $i++) { $images[$i] = PttHelper::uuidToPath($images[$i]); } $row['images'] = $images; $this -> product = $row; } // get translated field $this -> product['description'] = $this -> get_translated_field("description"); $this -> product['type'] = $this -> get_translated_field("type"); $this -> product['implementation'] = $this -> get_translated_field("implementation"); $this -> product['cooling'] = $this -> get_translated_field("cooling"); // $this -> product['pole_count_options'] = $this -> splitProductOptions($this -> product['pole_count_options'], 'pole_count_options'); // $this -> product['package_length_options'] = $this -> splitProductOptions($this -> product['package_length_options'], 'package_length_options'); $this -> product['type_options'] = $this -> splitProductOptions($this -> get_translated_field('type_options'), 'type_options'); $this -> product['implementation_options'] = $this -> splitProductOptions($this -> get_translated_field('implementation_options'), 'implementation_options'); $this -> product['cooling_options'] = $this -> splitProductOptions($this -> get_translated_field('cooling_options'), 'cooling_options'); $t -> product = $this -> product; $this -> loadLanguageFile('tl_content'); $t -> texts = $GLOBALS['TL_LANG']['tl_content']['form_labels']; } public function get_translated_field($field_name) { $field = $field_name . "_" . $this -> language; if (!array_key_exists($field, $this -> product)) { $field = $field_name . "_de"; } return $this -> product[$field]; } protected function splitProductOptions($strOptions, $tagId) { $ret = false; $arr = explode('|', trim($strOptions)); foreach ($arr as $key => $option) { if (empty($option)) { unset($arr[$key]); } } if (count($arr) > 0) { $ret = ''; foreach ($arr as $option) { $ret .= ''; } $ret .= ''; } return $ret; } } wildcard = '### Newsletter Form ###'; $objTemplate -> title = $this -> headline; $objTemplate -> id = $this -> id; $objTemplate -> link = $this -> article_number; $objTemplate -> href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this -> id; return $objTemplate -> parse(); } return parent::generate(); } public function compile() { $GLOBALS['TL_CSS'][] = 'system/modules/gal_rapidmail/assets/css/gal_rapidmail_form.css'; $GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/gal_rapidmail/assets/js/gal_rapidmail_form.js'; $t = $this -> Template; $this->loadLanguageFile('tl_content'); $newsletter['title'] = $GLOBALS['TL_LANG']['tl_content']['gal_rapidmail']['module_title']; $newsletter['recipient_list_id'] = $this->gal_rapidmail_recipient_list_id; $newsletter['newsletter_language'] = $GLOBALS['TL_LANGUAGE']; $t->newsletter = $newsletter; $t->texts = $GLOBALS['TL_LANG']['tl_content']['gal_rapidmail']['form_labels']; } } wildcard = '### Newsletter Form ###'; $objTemplate -> title = $this -> headline; $objTemplate -> id = $this -> id; $objTemplate -> link = $this -> article_number; $objTemplate -> href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this -> id; return $objTemplate -> parse(); } return parent::generate(); } public function compile() { $GLOBALS['TL_CSS'][] = 'system/modules/gal_rapidmail/assets/css/gal_rapidmail_form.css'; $GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/gal_rapidmail/assets/js/gal_rapidmail_form.js'; $t = $this -> Template; $this->loadLanguageFile('tl_content'); $newsletter['title'] = $GLOBALS['TL_LANG']['tl_content']['gal_rapidmail']['module_title']; $newsletter['recipient_list_id'] = $this->gal_rapidmail_recipient_list_id; $newsletter['newsletter_language'] = $GLOBALS['TL_LANGUAGE']; $t->newsletter = $newsletter; $t->texts = $GLOBALS['TL_LANG']['tl_content']['gal_rapidmail']['form_labels']; } } ACM 26 / 15 AC-Motor, Asynchronmotor - Jäger Powertrain Technology
Telefon: +49 6002 9123-0 info@jaeger-ptt.de
ACM 26 / 15 AC-Motor, Asynchronmotor
Copyright Alfred Jäger GmbH © 2015