Code Comments
Programming Forum and web based access to our favorite programming groups.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 template Well, 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 kno w 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 outpu t in your scripts.
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.