|
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 |
major7 Smarty n00b
Joined: 24 Jul 2003 Posts: 4
|
Posted: Mon Feb 02, 2004 2:44 pm Post subject: possible : smarty output to database? |
|
|
Hi,
I intend to make some template work on a personallized html-newsletter, which is to be built from a cms.
The CMS is ready so far and also produces a pretty preview of the newsletter. Now I'm looking for a way to parse the HTML stuff into the database.
does anyone know of a way to get parsed smarty code into a variable?
I could imagine something like this
Code: |
//$tpl=smarty instance
function parseMail($tpl){
//parse...
$tpl->assign("VAR",$var);
return $tpl->fetch("moo.tpl");
}
$parsedMail=parseMail($tpl);
//write parsedMail to db...
|
anyone tried anything?
thanks in advance dudes! |
|
Back to top |
|
AZTEK Smarty Pro
Joined: 16 Apr 2003 Posts: 235 Location: Purdue University
|
Posted: Mon Feb 02, 2004 5:52 pm Post subject: |
|
|
http://smarty.php.net/manual/en/api.fetch.php _________________ "Imagine a school with children that can read and write, but with teachers who cannot, and you have a metaphor of the Information Age in which we live." -Peter Cochrane |
|
Back to top |
|
major7 Smarty n00b
Joined: 24 Jul 2003 Posts: 4
|
Posted: Tue Feb 03, 2004 10:47 am Post subject: |
|
|
thanks mate! |
|
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
|