MyXoops Forum

Forum - myXOOPS German Support

9 - 8 = ?  
Geben Sie das Ergebnis der Berechnung ein
Sie haben max. 10 Versuche.
 
* = Erforderlich

Re: Templates in Module einbauen?

Betreff: Re: Templates in Module einbauen?
von glassJAw am 10.04.2003 10:48:55

diese info ist ja alt! :)

also mal ein kleiner crashkurs:

xoops_version.php
$modversion['use_smarty'] = 1;

alle templates so anführen:
$modversion['templates'][1]['file'] = 'module_template1.html';
$modversion['templates'][1]['description'] = '';
$modversion['templates'][2]['file'] = 'module_template2.html';
$modversion['templates'][2]['description'] = '';
diese müssen auch in /modules/templates vorhanden sein

alle blöcke so anführen
$modversion['blocks'][1]['file'] = "function_file.php";
$modversion['blocks'][1]['name'] = _MI_CLA_BNAME1;
$modversion['blocks'][1]['description'] = _MI_CLA_BDESC1;
$modversion['blocks'][1]['show_func'] = "var_prepare_function";
$modversion['blocks'][1]['template'] = 'module_block_template1.html';
diese müssen auch in /modules/templates/blocks vorhanden sein


modul-script
template-nutzung durch
$xoopsOption['template_main'] = 'modul_template1.html';
festlegen!

dann nach der reihe variablen zuordnen nach dem schema:
$xoopsTpl->assign('var_name', 'var_value')

und anschließend im template durch <{$var_name}> aufrufen!
arrays und for-schleifen handeln sich etwas komplizierter, aber mit etwas übung kein problem

greetz
gj

Aktuell aus dem Forum

Forum Thema Antworten Views Letzter Beitrag
Modulentwicklung New Xoops Xcreate Module 0 5737 26.11.2025 15:22
efkan Gehe zum letzten Beitrag
Modulentwicklung XOOPS Custom Field Module 1 2067 24.11.2025 11:21
Goffy Gehe zum letzten Beitrag