Seite 1 von 1

Contenido text Modul Duplizieren

Verfasst: Sa 26. Okt 2013, 12:48
von divox
Wie kann man das Modul duplizieren um es auf einer Seite mehrmals zu verwenden?
Bei der V4.8 hat es immer gereicht CMS_HTML[1] auf CMS_HTML[2] bei weiteren Modul zu ändern.

<?php

/**
* description: standard text
*
* @package Module
* @subpackage ContentText
* @version SVN Revision $Rev:$
*
* @author marcus.gnass@4fb.de
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
*/

// assert framework initialization
defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');

// get text from content type HTML with index 1
$text = "CMS_HTML[1]";

// When in backend edit mode add a label so the author
// knows what to type in the shown field.
if (cRegistry::isBackendEditMode()) {
$label = mi18n("LABEL_TEXT");
} else {
$label = NULL;
}

// use smarty template to output header text
$tpl = cSmartyFrontend::getInstance();
$tpl->assign('label', $label);
$tpl->assign('text', $text);
$tpl->display('get.tpl');

?>

Re: Contenido text Modul Duplizieren

Verfasst: Sa 26. Okt 2013, 13:21
von homtata
das geht im Prinzip noch genau so.
Den Modulcode in ein neues Modul kopieren, [1] auf [2] ändern, und dann aber nicht vergessen, dass du noch das HTML-Template (Modul-Tag: "HTML") namens get.tpl auch ins neue Modul kopieren musst... ggf. dann noch die Übersetzungsdatei ebenfalls mitkopieren.
Schau einfach mal ein bisschen, was sich hierzu in den Unterordnern /data/modules auf deinem Server tut.

LG

Re: Contenido text Modul Duplizieren

Verfasst: Sa 26. Okt 2013, 13:29
von divox
Vielen Dank :)