X-Git-Url: https://git.llucax.com/software/bife/bife-all.git/blobdiff_plain/78a4e568bfc178ddc4f685c6d76c44aad1a158ff..972d7506d82949eed70dd5095852b69de1c79d2f:/hit/examples/index.php diff --git a/hit/examples/index.php b/hit/examples/index.php index 0e6aa25..ba7c74e 100644 --- a/hit/examples/index.php +++ b/hit/examples/index.php @@ -1,5 +1,5 @@ -parseBuffered('cell', 'CELL', "$i,$j"); +// If not, we make a table using the template {{{ +} else { + $hit->pushGroup('table'); + for ($i = 0; $i < 20; $i++) { + for ($j = 0; $j < 20; $j++) { + $hit->parseBuffered('cell', 'CELL', "$i,$j"); + } + $hit->parseBuffered('row', 'ROW', $hit->popBuffer('cell')); } - $hit->parseBuffered('row', 'ROW', $hit->popBuffer('cell')); + $body = $hit->parse('body', 'ROWS', $hit->popBuffer('row')); + $hit->popGroup('table'); } +// }}} + +// Now a link, to look at the source or to look at the results {{{ +if (@$_REQUEST['s']) { + $link = $hit->parse('link', array('NAME' => 'View results', 'PAGE' => '?s=0')); +} else { + $link = $hit->parse('link', array('NAME' => 'View source', 'PAGE' => '?s=1')); +} +// }}} + +// We put all in the body and prints it {{{ echo $hit->parse( 'body', array( - 'ROWS' => $hit->popBuffer('row'), - 'TITLE' => 'HOLA MUNDO!!!', + 'TITLE' => 'HELLO WORLD!!!', + 'BODY' => $body, + 'LINK' => $link, ) ); +// }}} ?>