Modify

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#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 Torsten Riemer, 7 years ago

Milestone: modified-shop-2.0.4.1modified-shop-2.0.5.0

comment:2 by Torsten Riemer, 7 years ago

Summary: Text- und Funktionsblöcke in maincontentText- und Funktionsblöcke in main_content

comment:3 by Gerhard Waldemair, 7 years ago

Resolution: wontfix
Status: newclosed

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

Last edited 7 years ago by Torsten Riemer (previous) (diff)

comment:4 by Torsten Riemer, 7 years ago

Milestone: modified-shop-2.0.5.0

Modify Ticket

Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.