Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Smarty e temi

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: Italian
View previous topic :: View next topic  
Author Message
cucca
Smarty Rookie


Joined: 02 Mar 2007
Posts: 6

PostPosted: Thu Mar 08, 2007 11:20 am    Post subject: Smarty e temi Reply with quote

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
View user's profile Send private message
TNTforum
Smarty Rookie


Joined: 30 Oct 2006
Posts: 5

PostPosted: Wed Apr 04, 2007 3:18 pm    Post subject: Reply with quote

Basta che metti
Code:
{$visualizza}

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: Italian All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP