1
Hello Everyone,
I have the following problem with smarty variables.
In my toy example,
I have the following lines in xoops_version.php
// Templates
$modversion['templates'][1]['file'] = 'interface_index.html';
$modversion['templates'][1]['description'] = '';
I have the following lines in my index.php
$xoopsOption['template_main'] = 'interface_index.html';
.....
$xoopsTpl->assign('uid', $uid);
.....
And, I have the following definition in interface_index.html
<{$uid}>
Up to here, everything works fine. It outputs a userID.
BUT, if I change the variable name $uid in interface_index.html to, say $uid1,
then, the following will not work.
In index.php
$xoopsTpl->assign('uid1', $uid);
In interface_index.html
<{$uid1}>
There is not output.
Moreover, if I try the following line in index.php,
$xoopsTpl->assign('uid', $uid);
and the content of interface_index.html is STILL <{$uid1}>.
It will output the userID.
I just wonder if there is a buffer mechanism that remembers my first declaration of $uid in interface_index.html?
Please let me know what is wrong here.
Many thanks in advance,
Josh