﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking
1487	Text- und Funktionsblöcke in main_content	Volker Strähle		"Schlage folgende Änderung in /includes/modules/default.php vor

{{{
/**
  * default content page
  *
  */
} else {

  $shop_content_data = $main->getContentData(5, '', '', false, ADD_SELECT_CONTENT);
  
  $content_main_template = 'main_content.html';

  $default_smarty->assign('title', $shop_content_data['content_heading']);
  
  // Here only for homepage
  foreach(auto_include(DIR_FS_CATALOG.'includes/extra/default/center_modules/','php') as $file) require_once ($file);
  
  // Here for Hompage AND all shop_content.php
  foreach(auto_include(DIR_FS_CATALOG.'includes/extra/default/shop_content/','php') as $file) require_once ($file); // <<< NEW
  
  $default_smarty->assign('text', $shop_content_data['content_text']); // <<< NEW

  $default_smarty->assign('language', $_SESSION['language']);
}}}

Neues Hook-Verzeichnis: includes/extra/default/shop_content/

Verschieben von includes/extra/default/center_modules/customer_greeting.php nach includes/extra/default/shop_content/customer_greeting.php

Änderung in customer_greeting.php:

{{{
require_once (DIR_FS_INC.'xtc_customer_greeting.inc.php');

//$default_smarty->assign('text', str_replace('{$greeting}', xtc_customer_greeting(), $shop_content_data['content_text']));
$shop_content_data['content_text'] = str_replace('{$greeting}', xtc_customer_greeting(), $shop_content_data['content_text']);
}}}

Änderung in shop_content.php:

{{{
  if ($content_exists == 1) {
	  foreach(auto_include(DIR_FS_CATALOG.'includes/extra/default/shop_content/','php') as $file) require_once ($file);  // <<<NEW
  }
  
  $smarty->assign('CONTENT_HEADING', (($shop_content_data['content_heading'] != '') ? $shop_content_data['content_heading'] : $shop_content_data['content_title']));

  if ($_GET['coID'] == 7 && $content_exists == 1) {
    include (DIR_WS_INCLUDES.'contact_us.php');

}}}

Damit kann man neue Textblöcke für die Content-Seiten erstellen. z. B. includes/extra/default/shop_content/webald.php:

{{{
$shop_content_data['content_text'] = str_replace('{$webald_new_special}', 'Produkte nur für Sie....', $shop_content_data['content_text']);

}}}
"	Erweiterung	closed	normal		Module	2.0.4.0	wontfix				
