Re: Strip <HTML>,<BODY> and similar from the beginning
| From: | Roel Vanhout | Date: | Mon, 12 Mar 2001 16:03:14 +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-376@lists.php.net to get a copy of this message | ||
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
(sorry I don't know the line number, my version is a bit hacked up).
It's not a nice solution but it's easy.
cheers,
roel
On Mon, Mar 12, 2001 at 04:37:52PM +0100, Victor wrote:
> I'm using a WYSIWYG-app (dreamweaver) to design my template files. I'm also using a
> main template that's using {include} to include all subpages.
> But to make it easier for editing the subpages in dreamweaver, I must have a <BODY> tag
> as well as <LINK rel=..> tag for the style sheet. Well, it looks better that way. So when I
> include the file with smarty, those lines are put in the middle of the rendered HTML-output which is
> Very Bad<tm>.
>
> Is there any way I can filter out these lines (2 lines on every subpage)? If it was possible,
> I'd like it to be standard in smarty, but I can do with a small hack or similar. Well, all
> feedback is welcome.
>
> tia,
> Victor
>
>
>
>
> ---
> You are currently subscribed to smarty as: roel@2e-systems.com
> To unsubscribe send a blank email to $subst('Email.Unsub')
> Visit Smarty's homepage at
> http://www.phpinsider.com/php/code/Smarty/