Hilfe - Suche - Mitglieder - Kalender
Vollansicht: Wie übergiebt man Style in einem modul?
Forum Sefrengo.org > Allgemeine Foren > Entwicklung
dederpapst3000
Hallo leute
Habe die letzte zeit mit dem erlernen der Modulerstellung verbracht. Leider raffe ich es noch nicht. habe mir die dokumentationen durchgelesen, welche sehr hilfreich sind.
Aber nun zu meinem problem: Ich habe angefangen mit einem neuen Modul, und in der Konfiguration möchte ich style-classen zuweisen so wie z.b. im Kontaktformular.
CODE
<?php

//config mode
$mip_form['99']['desc'] = 'Konfigurationsmodus';
$mip_form['99']['cat'] = 'option';
$mip_form['99']['size'] = '1';
$mip_form['99']['option_desc'][] = 'Normal';
$mip_form['99']['option_val'][] = '';
$mip_form['99']['option_desc'][] = 'Erweitert';
$mip_form['99']['option_val'][] = 'advanced';
$mip_form['99']['option_desc'][] = 'Ausgeblendet';
$mip_form['99']['option_val'][] = 'hidden';
$mip_form['99']['cms_var'] = 'MOD_VAR[99]';
$mip_form['99']['cms_val'] = $cms_mod['value']['99'];
$mip_form['99']['flag'] = 'reload';
mip_formsp($mip_form['99']);

//hidden config
if($cms_mod['value']['99'] == 'hidden'){
foreach($cms_mod['value'] AS $ke=>$va){
if($ke != '99'){
?>
<input name="MOD_VAR[<?php echo $ke; ?>]" type="hidden" value="<?php echo htmlentities($va, ENT_COMPAT, 'UTF-8');?>">
<?php
}
}
}
//normal config (not hidden config)
else if($cms_mod['value']['99'] == ''){

// Schriftart
$mip_form['0']['desc'] = $mod_lang['gen_font'];
$mip_form['0']['cat'] = 'app_css';
$mip_form['0']['output_cat'] = 'option';
$mip_form['0']['cms_var'] = 'MOD_VAR[0]';
$mip_form['0']['cms_val'] = $cms_mod['value']['0'];
$mip_form['0']['flag'] = 'class_only';



// Box
$mip_form['1']['desc'] = 'Box';
$mip_form['1']['cat'] = 'app_css';
$mip_form['1']['output_cat'] = 'option';
$mip_form['1']['cms_var'] = 'MOD_VAR[1]';
$mip_form['1']['cms_val'] = $cms_mod['value']['1'];
$mip_form['1']['flag'] = 'class_only';



// Titel
$mip_form['2']['desc'] = 'Titel';
$mip_form['2']['cat'] = 'app_css';
$mip_form['2']['output_cat'] = 'option';
$mip_form['2']['cms_var'] = 'MOD_VAR[2]';
$mip_form['2']['cms_val'] = $cms_mod['value']['2'];
$mip_form['2']['flag'] = 'class_only';






// Ausgabe
mip_formsp($mip_form['0']);
mip_formsp($mip_form['1']);
mip_formsp($mip_form['2']);




}
unset($mip_form);
?>


Wie mache ich dem unteren element klar das ich dort die css für den Titel haben will.? unsure.gif

Dank euch: der papst

QUELLTEXT
<h3><cms:mod type="text" id="1" menuoptions="true"  title="Titel" /></h3>
saschapi
Den unteren Schnippsel fügst du ja im Layout ein (also dein H3). Du musst im ModulOUTPUT all das zusammenschreiben, was dort in den CMS-Tag eingefüllt werden soll. Auf die im ModulINPUT konfigurierten Einstellungen kannst du dort dank Variablen zugreifen.
Eigentlich müsste das aus der Doku hervorgehen. Schau dir doch auch mal diesen Artikel an um das Zusammenspiel von Input und Output zu verstehen.
Dieses ist eine vereinfachte Darstellung unseres Foreninhaltes. Um die detaillierte Vollansicht mit Formatierung und Bildern zu betrachten, bitte hier klicken.
Invision Power Board © 2001-2024 Invision Power Services, Inc.