IT/ITX - How to add a empty block
| From: | Steen Rabol | Date: | Sat, 09 Feb 2002 12:57:35 +0000 |
| Subject: | IT/ITX - How to add a empty block | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-805@lists.php.net to get a copy of this message | ||
Hi
How can I add a block of HTML using the IntegratedTemplate class ?
-- Template --
<!-- BEGIN showallways -->
{somevar}
<!-- END showallways -->
<!-- BEGIN showsomtimes -->
this don't is not in the final result, but why ?
<!-- END showsomtimes -->
$go = 10;
while($go)
{
$tpl->setCurrentBlock("showallways");
$tpl->setVariable("somevar", $go);
$tpl->parseCurrentBlock();
if($go = 2 || $go = 4)
{
$tpl->setCurrentBlock("showsomtimes");
$tpl->parseCurrentBlock();
}
$go--;
}
the above will not output my "showsometimes" block
How can I make it output the "showsometimes" block ?
Thanks in advance.
Steen