I have narrowed the problem down to the following puzzling fact.
The problem is that I can't get anything back into the block.
The following doesn't work:
// Create the block handle
$tpl->set_block("theList", "myblock", "HANDLE");
// Make the list
$tpl->set_var("BLOCK_ROW", "One");
$tpl->parse("HANDLE", "myblock", true);
//and more items...
This just prints the word HANDLE where the list is is supposed to be.
What does work is this:
// Create the block handle
$tpl->set_block("theList", "myblock", "{HANDLE}");
// Make the list
$tpl->set_var("BLOCK_ROW", "One");
$tpl->parse("HANDLE", "myblock", true);
//more items...
Note the difference. HANDLE in set_block is replaced by {HANDLE}. With this
code everything prints nicely.
I have checked the source of template.inc and indeed looks right.
(Row 109) $str = preg_replace($reg, "{$name}", $str);
I don't get it! Why is this? Everybody writing examples and using
template.inc seem to have no problem.
/NinjaMan
--
PHP Install Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]