Gepostet am:10.04.2003 10:48
#4
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
Re: Templates in Module einbauen?
10.04.2003 10:48 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
[size=xx-small]a child's rhyme stuck in my head.
it said that life is but a dream.
I've spent so many years in question
to find I've known this all along.
|~ Maynard James Keenan ~||~ Tool - Third Eye ~|[/size]
it said that life is but a dream.
I've spent so many years in question
to find I've known this all along.
|~ Maynard James Keenan ~||~ Tool - Third Eye ~|[/size]