Block isn't displayed
| From: | Michael Ochs | Date: | Sun, 19 Oct 2003 18:20:11 +0000 |
| Subject: | Block isn't displayed | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-8488@lists.php.net to get a copy of this message | ||
Hi,
I've a problem with the templateclass, I don't know where the problem is:
The Templatefile:
//-->
<div class="headline">Login:</div><BR>
<!-- BEGIN message -->
{message}<BR>
<!-- END message -->
<!-- BEGIN formular -->
<form action="user_login.php" method="post"
style="display:inline;">
<table border=0 cellpadding=2 cellspacing=0>
<tr>
<td>Benutzername:</td>
<td><input name="username" value="{input_username}"
size=20></td>
</tr>
<tr>
<td>Passwort:</td>
<td><input type="password" name="passwort"
value="{input_passwort}"
size=20></td>
</tr>
<tr>
<td colspan=2><input type="checkbox" name="setcookie"
value="doit"
size=20{checked}> Autologin aktivieren (Cookies)</td>
</tr>
<tr>
<td><input type="hidden" name="mode"
value="check"></td>
<td><input type="submit" value="login"></td>
</tr>
</table>
</form>
<!-- END formular -->
<BR> <BR>
<--//
The formular block isn't displayed, the message block works!
The PHP Code is like this:
//-->
if($mode=="display") {
$tpl->setCurrentBlock("message");
$tpl->setVariable(array("message"=>"Hier kannst du dich nun
einloggen!"));
$tpl->parseCurrentBlock();
$tpl->setCurrentBlock("formular");
$tpl->setVariable(array(
"test"=>"test",
"input_username"=>$_POST['username'],
"input_passwort"=>$_POST['passwort'],
"checked"=>$checked
));
$tpl->parseCurrentBlock();
}
<--//
New Template is Generated before.
So where is the problem? Everytime I work with this class there is something
stupid that woun't work! :(
thx for help, Michael