The SET and BLOCK are handled identical when a new
SET block or a BLOCK block has been started, but when
the current BLOCK should be ended, the SET block will
not be used correctly.
The old lines are removed correctly, but no variable shall
be inserted. This result in not displaying the parsed
information specified by the SET block.
For an example see the end of this submit!
Possible fix for CVS ( saterday 27 dec. 2003) :
Updating line 187 with:
if ($j == $currblockstart && ( $currblocktype == 'BLOCK'
|| $currblocktype == 'SET' ) )
This will insert a variable for BLOCK and SET blocks...
EXAMPLE:
Example template for that has the problem:
[SET select_spool]
<b>Categorie:</b><br />
<select name="spool">
[BLOCK spool]
<option value="{ID}">{NAME}</option>
[END spool]
</select>
[END select_spool]
Example PHP-code for the problem:
foreach( $data as $line ) {
$template->set( "ID", $line["id"] );
$template->set( "NAME", $line["name"] );
$template->parse( "spool" );
}
$template->parse("select_spool");
$template->parse();
$template->spit();
This result in NO html code...
Updated version of yapter.hp according CVS from 27 dec. 2003