RE: Sections

From: Date: Tue, 26 Feb 2002 01:15:30 +0000
Subject: RE: Sections
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-2846@lists.php.net to get a copy of this message
Question: I have a template like this: search.htm <HTML> <HEAD> <TITLE>Untitled Document</TITLE> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> </HEAD> <BODY BGCOLOR="#FFFFFF" TEXT="#000000"> {capture name=body} <FORM NAME="form1" METHOD="post" ACTION=""> <INPUT TYPE="text" NAME="textfield" VALUE="{$Name}"> <INPUT TYPE="submit" NAME="Submit" VALUE="Search"> </FORM> {/capture} </BODY> </HTML> Can I caputure "body" on my script Script: <? $smarty = new Smarty; $smarty->assign("Name","Fred Irving Johnathan Bradley Peppergill"); $body = $smarty->fetch('search.htm'); ?> But i don't want to get the whole template... just the {capture} 'body' part. And use that to place on my site template. <? $smarty->clear_all_assign(); $smarty->assign("Body",$body); $smarty->display('template.htm'); ?> Is it possible to do that? WiL

« previous php.smarty.general (#2846) next »