|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
cucca Smarty Rookie
Joined: 02 Mar 2007 Posts: 6
|
Posted: Thu Mar 08, 2007 11:20 am Post subject: Smarty e temi |
|
|
Salve a tutti,
sto cercando di utilizzare smarty, ma mi rimane difficile come strutturare
una pagina: io ho creato una pagina "mastro" di questo tipo:
Quote: |
<html>
<head>
<title></title>
<style type="text/css">
@import url("{$theme}/default.css");
</style>
</head>
<body bgcolor="white">
<div id="main">
<div id="container">
<div id="header">
{include file="header.tpl"}
</div>
<div id="menu">
{include file="menu.php"}
</div>
<div id="content">
{include file="page.php"}
</div>
</div>
<div id="footer">
{include file="footer.tpl"}
</div>
</div>
</body>
</html>
|
ma non so come andare a scrivere nel content (qui ho provato a mettere un
page.php ma vabbe' era solo un test). Mi spiego meglio, vorrei mantere
quella pagina fissa, come "tema" poi scrivere l'output del mio programma nel
div content, ad esempio vorrei utilizzare quella pagina sia per visualizzare
un form che per mostrarne il risultato... come fare? Ho visto che sugarcrm usa un sistema del genere, ma non credo che usi smarty (anche se ce l'ha come modulo...)
grazie a tutti |
|
Back to top |
|
TNTforum Smarty Rookie
Joined: 30 Oct 2006 Posts: 5
|
Posted: Wed Apr 04, 2007 3:18 pm Post subject: |
|
|
Basta che metti
al posto di
Code: | {include file="page.php"} |
e metti nella variabile valorizza l'output da visualizzare:
[pcode]$smarty->assign('visualizza', '<p>Ciao!</p>');[/code] |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|