Re: Strip <HTML>,<BODY> and similar from the beginning

From: Date: Mon, 12 Mar 2001 16:29:09 +0000
Subject: Re: Strip <HTML>,<BODY> and similar from the beginning
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-378@lists.php.net to get a copy of this message
This is an application-specific hack that won't make it into the distribution. Unless we can figure out a cleaner way to accomodate this, you'll have to live with your hack. I think using a delimiter syntax that Dreamweaver likes is the cleanest way. How does Dreamweaver handle other programming language templates? Victor wrote: > > > You can put > > > > preg_replace('<head>', '', $template_contents); > > preg_replace('</head>', '', $template_contents); > > > > ...etc in Smarty_Compiler.class.php, in function > > _compile_file($filepath, $compilepath), after the line > > $template_contents = preg_replace("!{$l.... blabla > > Perfect! Just the sort of solution I wanted. But does check if it's an included file, or > does it do that for all files? Well, it's easier for me to test it. > > But I'll have to add support for <html><body ..... > (long tag>, > </html>, > ---<BR> > You are currently subscribed to smarty as: monte@ispi.net<BR> > To unsubscribe send a blank email to $subst('Email.Unsub')<BR> > Visit Smarty's homepage at > http://www.phpinsider.com/php/code/Smarty/ > </BODY>,<meta>, <link ...> etc, etc.. > > *I* think this function should be included in the original dist. Maybe inactivated by default, > but it should be easy to turn it when needed. > > Thanks! > // Victor -- Monte Ohrt <monte@ispi.net> http://www.ispi.net/

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