Modify ↓
#1487 closed Erweiterung (wontfix)
Text- und Funktionsblöcke in main_content
| Reported by: | Volker Strähle | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Module | Version: | 2.0.4.0 |
| Keywords: | Cc: | ||
| Blocked By: | Blocking: |
Description
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']);
Attachments (0)
Change History (4)
comment:1 by , 7 years ago
| Milestone: | modified-shop-2.0.4.1 → modified-shop-2.0.5.0 |
|---|
comment:2 by , 7 years ago
| Summary: | Text- und Funktionsblöcke in maincontent → Text- und Funktionsblöcke in main_content |
|---|
comment:3 by , 7 years ago
| Resolution: | → wontfix |
|---|---|
| Status: | new → closed |
comment:4 by , 7 years ago
| Milestone: | modified-shop-2.0.5.0 |
|---|
Note:
See TracTickets
for help on using tickets.

Es gibt bereits seit r10969 einen auto_include in der shop_content.php mit dem das gemacht werden kann.