X-Git-Url: https://git.llucax.com/software/bife/bife-all.git/blobdiff_plain/e28cc11b1bd4804c3ed35ef506c2425f321586ea..e8635d15ec803ea97364ff72f136a9e0fcc66281:/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, ) ); +// }}} ?>