teamgeist Posted April 22, 2008 Report Share Posted April 22, 2008 Hallo erstmal, ich bin der Neue ;-) Nun zu meinem Problem. Ich habe drei Themenbereiche, also Produktkategorien, die farblich und vom Aufbau unterschiedlich dargestellt werden sollen. Habe dafür nun das Template clearseller 3 mal kopiert und dementsprechend abgewandelt. Nun möchte ich, dass die Templates per Klick auf einen oberen Reiter ausgewählt werden. Nur, wie mache ich das? Vielen Dank TEAMGEIST Link to comment Share on other sites More sharing options...
tech4freaks Posted May 10, 2008 Report Share Posted May 10, 2008 Hallo, versuche es mal damit xt:C Template Switcher für 3.04 SP2.1: Alle Änderungen erfolgen auf eigene Gefahr und wie immer gilt: Backup nicht vergessen! [template] steht für den Namen des Templates /** * Template Switcher **/ /*-----------------------------------------------------------------------------------------------*/ includes/application_top.php /*-----------------------------------------------------------------------------------------------*/ Suchen nach: while ($configuration = xtc_db_fetch_array($configuration_query)) { define($configuration['cfgKey'], $configuration['cfgValue']); } Ersetzen durch: while ($configuration = xtc_db_fetch_array($configuration_query)) { // modified // msslovi0 2006-11-30 // Template-Switcher // continued after session is started if($configuration['cfgKey']=="CURRENT_TEMPLATE") { $template = $configuration['cfgValue']; } else { define($configuration['cfgKey'], $configuration['cfgValue']); } // end msslovi0 } Suchen nach: // check the Agent Danach einfügen: // modified // msslovi0 2006-11-30 // Template-Switcher, part II if(isset($_GET["tpl"])) { $_SESSION["tpl"] = $_GET["tpl"]; } if(isset($_SESSION["tpl"]) && file_exists(DIR_FS_CATALOG."templates/".$_SESSION["tpl"])) { define("CURRENT_TEMPLATE", $_SESSION["tpl"]); } else { define("CURRENT_TEMPLATE", $template); } // end msslovi0 /*-----------------------------------------------------------------------------------------------*/ includes/header.php /*-----------------------------------------------------------------------------------------------*/ Suchen nach: $smarty->assign('store_name',TITLE); Danach einfügen: // modified // msslovi0 2006-11-30 // Template-Switcher, part III $handle = opendir(DIR_FS_CATALOG."templates/"); $t_array = array(); while (false !== ($file = readdir($handle))) { if(!preg_match("/^\./", $file)) { $t_array[] = $file; } } sort($t_array); for($i=0;$i<sizeof($t_array);$i++) { $tpls[] = array("id" => $t_array[$i], 'text' => $t_array[$i]); } $parameters = xtc_get_all_get_params(array ('tpl', 'x', 'y')); parse_str(urldecode($parameters), $para); $hidden = ""; for(reset($para); $k = key($para); next($para)) { $hidden .= sprintf("<input type='hidden' name='%s' value='%s' />", $k, $para[$k]); } $t_select = xtc_draw_pull_down_menu('tpl', $tpls, CURRENT_TEMPLATE, 'onchange="this.form.submit()"'); $smarty->assign('TEMPLATE_SWITCHER', sprintf("%s%s <noscript>%s</noscript>%s</form>", xtc_draw_form('template-switcher', $PHP_SELF, 'get'), $t_select, xtc_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE), $hidden)); // end msslovi0 /*-----------------------------------------------------------------------------------------------*/ templates/[template]/index.html /*-----------------------------------------------------------------------------------------------*/ {$TEMPLATE_SWITCHER} einbauen Gruß Rene Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.