X-Git-Url: https://git.llucax.com/software/bife/bife-all.git/blobdiff_plain/78a4e568bfc178ddc4f685c6d76c44aad1a158ff..refs/heads/master:/hit/examples/index.php?ds=sidebyside diff --git a/hit/examples/index.php b/hit/examples/index.php index 0e6aa25..ff13d25 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, ) ); +// }}} -?> +?> \ No newline at end of file