footer_config / content_copyright_notice

Alles rund um Module und Plugins in CONTENIDO 4.9.
Antworten
benja
Beiträge: 168
Registriert: Mi 31. Aug 2005, 10:54
Wohnort: Köln
Kontaktdaten:

footer_config / content_copyright_notice

Beitrag von benja »

Kennt jemand eine Lösung dafür, wenn der Inhalt vom Modul content_copyright_notice, bzw. Der Vorlage footer_config sprachabhängig sein soll?

Liebe Grüsse
Benja
benja
Beiträge: 168
Registriert: Mi 31. Aug 2005, 10:54
Wohnort: Köln
Kontaktdaten:

Re: footer_config / content_copyright_notice

Beitrag von benja »

Falls noch jemand das Problem haben sollte, hier dank xmurrix die Lösung:

Code: Alles auswählen

<?php

/**
 * description: copyright notice
 *
 * @package Module
 * @subpackage ContentCopyrightNotice
 * @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.');

$configIdart = getEffectiveSetting('footer_config', 'idart', 0);

if (0 < $configIdart) {

    $lang = cRegistry::getLanguageId(true);
    $article = new cApiArticleLanguage();
    $article->loadByArticleAndLanguageId($configIdart, $lang, true);

    $text = $article->getContent('CMS_HTML', 1);
    $text = str_replace('{year}', date('Y'), $text);

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

?>
Antworten