Re: IT/ITX - I don't get it - long messages

From: Date: Mon, 11 Feb 2002 13:13:31 +0000
Subject: Re: IT/ITX - I don't get it - long messages
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-824@lists.php.net to get a copy of this message
le 11/02/02 13:30, Bertrand Mansion à bmansion@mamasam.com a écrit : > <srabol@mail.tele.dk> wrote : > >> >> if(!isset($userinfo['medlemsnr'])) >> { >> // Load the loginform >> $tpl->addBlockfile("USER_MENU", "loginForm_block", >> "login_form.html"); >> if(isset($errmsg)) >> { >> $tpl->setCurrentBlock("LOGINERR"); >> $tpl->setVariable("ERR_MSG",$errmsg); >> $tpl->parseCurrentBlock(); >> } >> >> $tpl->setCurrentBlock("LOGINFORM"); >> $tpl->touchBlock("LOGINFORM"); >> $tpl->parseCurrentBlock(); >> } >> else >> { >> // load usermenu >> $tpl->addBlockfile("USER_MENU", "usermenu_block", >> "user_menu.html"); >> $tpl->setCurrentBlock("usermenu_block"); >> // this block don't contains any vars {}, so we need to touch it >> $tpl->touchBlock("usermenu_block"); >> $tpl->parseCurrentBlock(); >> } Maybe you should do $tpl->touchBlock("loginForm_block"); instead of $tpl->touchBlock("LOGINFORM"); in the first part of your code. It's pretty hard to help if I can't see the template, I just have to guess what your placeholders are. Smarty is very good too and it works with PEAR. You can use conditions directly in your template. Bertrand Mansion Mamasam

« previous php.pear.general (#824) next »