Re: HTML_Template_Sigma
| From: | Alexey Borzov | Date: | Mon, 06 Jun 2005 21:43:46 +0000 |
| Subject: | Re: HTML_Template_Sigma | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-19488@lists.php.net to get a copy of this message | ||
Hi,
Cliff wrote:
I know I have posted before with a stupid PHP problem that had nothing do with PEAR. This time, however, I have made sure it is a problem with HTML_Template_Sigma, as the looping works fine but the templates output is not working as it should. http://pearbb.net It shows one (the last) category and 0 forums, while there are in fact 3 categories and 5 forums. http://pearbb.net/Includes/main.phps - the code http://pearbb.net/Templates/1/boards.tpl - the templateWell, you never actually loop over a 'rootforums' block. You do $global->tpl->setCurrentBlock( "rootforums" ); and after that you do $global->tpl->parseCurrentBlock(); But between these calls you do either $global->tpl->setCurrentBlock( "linkforums" ); or $global->tpl->setCurrentBlock( "forums" ); therefore that parseCurrentBlock() loops over either 'linkforums' or 'forums'. But that's only the part of the problem, I suspect that your /* loop through forums */ part does not work at all. I can't comment further as I do not know what junk you actually keep in the database.
Could someone point out what I have done wrong?You didn't get yourself a debugger. And didn't even bother to do debug output in your scripts.