Footnotes von 4.8 nach 4.9

Alles rund um Module und Plugins in CONTENIDO 4.9.
Antworten
lunsen_de
Beiträge: 297
Registriert: Mo 17. Okt 2005, 20:26
Wohnort: Weimar
Kontaktdaten:

Footnotes von 4.8 nach 4.9

Beitrag von lunsen_de » Di 25. Jul 2017, 13:06

Hallo,

ich versuche das Modul Footnotes in 4.9 zu verwenden.

Code: Alles auswählen

<?php
/**
* $RCSfile$
* Description: Display footnotes, fixed output directly from template
* @version 1.0.0
* @author Rudi Bieller
* @copyright four for business AG <www.4fb.de>
* {@internal
* created 2008-04-11
* }}
* $Id$
*/
if (!isset($tpl) || !is_object($tpl)) {
    $tpl = new cTemplate();
}
$tpl->display('footnotes_'.strval($lang).'.html');
?>
in der footnotes_1.html steht dann z.B.

Code: Alles auswählen

<div id="footer_top_address_wrapper" class="fright">hallo</div>
Nutze ich nun im Layout auch das Modul df_kontakt bekomme ich beim Aufruf der Seite (Backend)

Code: Alles auswählen

PHP Fatal error:  Call to undefined method cTemplate::display() in /var/www/vhosts/web/httpdocs/contenido/includes/include.con_editcontent.php(523) : eval()'d code on line 367
Ändere ich nun im Moduloutput das

Code: Alles auswählen

$tpl->display('footnotes_'.strval($lang).'.html');
in

Code: Alles auswählen

$tpl->generate('footnotes_'.strval($lang).'.html');
kommt folgende Fehlermeldung:

Code: Alles auswählen

PHP Fatal error:  Uncaught  --> Smarty: Call of unknown method 'generate'. <-- 
  thrown in /var/www/vhosts/web/httpdocs/contenido/plugins/smarty/smarty_source/sysplugins/smarty_internal_templatebase.php on line 859
Kann jemand helfen? Danke.

Gruß lunsen_de

homtata
Beiträge: 1142
Registriert: Mi 14. Jan 2004, 14:41
Kontaktdaten:

Re: Footnotes von 4.8 nach 4.9

Beitrag von homtata » Di 25. Jul 2017, 13:44

Hallo,
meiner Erfahrung nach muss die if-Bedingung um cTemplate weg. Statt

Code: Alles auswählen

if (!isset($tpl) || !is_object($tpl)) {
    $tpl = new cTemplate();
}
also nur

Code: Alles auswählen

$tpl = new cTemplate();
}
Hilf das weiter?

lunsen_de
Beiträge: 297
Registriert: Mo 17. Okt 2005, 20:26
Wohnort: Weimar
Kontaktdaten:

Re: Footnotes von 4.8 nach 4.9

Beitrag von lunsen_de » Do 27. Jul 2017, 14:28

Hallo, vielen Dank. Hat geholfen!!!

Gruß lunsen_de

Antworten