Re: QuickForm: Blocknames in ITDynamic

From: Date: Thu, 05 Jun 2003 13:56:06 +0000
Subject: Re: QuickForm: Blocknames in ITDynamic
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-5826@lists.php.net to get a copy of this message
Hi! Marco Schuler wrote:
Thank you for the link. Explained me exactly what I wanted to know. Just one little question left regarding loop. In the document (link that you gave me), explanation is as follows: ------------------------------------------------------------------------ qf_main_loop This block should always be present and should be a parent for all visible elements' blocks. It is used to implement "flow", to render elements one after another. ------------------------------------------------------------------------ Can you explain me "flow" a little bit more concisely?
Well, the form should be finally output as: Block with element1 Block with element2 ... Block with elementN But these blocks can actually be different for different elements, and we cannot juggle them inside the template to put them in the needed order. But you know that we can call parse() on some block several times to repeat it. So we have an outer block, qf_main_loop, and when the element is rendered, its block get parse()'d first and then qf_main_loop (that now contains the contents of this element's block *only*) gets parse()'d. Thus we get the desired output.

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