Verwijderd schreef op 20 juni 2004 @ 19:45:
Ik heb me gisteren een sprong in het diepe Smarty zwembad gewaard en ik kom ergens maar niet uit.
Ik heb de volgende code:
index.php
PHP:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 <?php require 'smarty/Smarty.class.php'; $smarty = new Smarty; $smarty->compile_check = true; $smarty->debugging = false; //if($_GET['pagina'] == "") { $smarty->assign("content", include("hoofdpagina.php")); //} else { // $smarty->assign("content", include($_GET['pagina'])); //} $smarty->display('index.tpl'); ?>
index.tpl
code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 <div align="center"> <table cellpadding="4" cellspacing="4" border="1" width="80%"> <tr> <td colspan="2"><div align="center">Banner</div></td> </tr> <tr> <td width="20%"> <tr> <td width="20%"> <a href="?pagina=voorstellingen.php&selectie=nieuw">Nieuw</a><br /> <a href="?pagina=voorstellingen.php&selectie=verwacht">Verwacht</a><br /> <a href="?pagina=voorstellingen.php&selectie=recent">Recent</a><br /><br /> </td> <td width="80%" rowspan="4" valign="top">{$content}</td> </tr> <tr> <form method="post" action=""> <tr> <td width="20%"><input type="text" name="search_value" /></td> </tr> <tr> <td><input type="submit" name="search" value="Zoeken" class="normal" /></td> </tr> </form> </tr> </td> </tr> <tr> <td colspan="2"><div align="center">Banner</div></td> </tr> </table> </div>
hoofdpagina.php
PHP:
1 2 3 4 5 <?php $smarty->display('hoofdpagina.tpl'); ?>
hoofdpagina.tpl
code:
1 Hallo, ik ben content.
De output die wel goed staat is "1", maar waar die vandaan komt snap ik niet. En de output die hij eigenlijk moet geven staat linksboven in de hoek.
Snapt het niet![]()
[ Voor 30% gewijzigd door Verwijderd op 20-06-2004 21:25 ]