| 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 |