RE: Sections

From: Date: Tue, 26 Feb 2002 10:07:07 +0000
Subject: RE: Sections
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-2848@lists.php.net to get a copy of this message
WiL Laxa wrote:
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? Smarty does not have that functionality built into it, however you should be able to extract everything from between the <BODY> and </BODY> tags of the returned content using a regular expression - the PCRE library tends to be significantly faster than PHP's ereg functions so I would suggest starting off by looking here:
http://www.php.net/manual/en/ref.pcre.php Cheers, Simon

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