Re: [PHP Template] Section hiding and includes

From: Date: Tue, 14 Mar 2000 03:58:27 +0000
Subject: Re: [PHP Template] Section hiding and includes
References: 1  Groups: php.template 
Request: Send a blank email to php-template+get-314@lists.php.net to get a copy of this message
At 04:40 PM 3/13/00 -0800, Dan Libby wrote: >So, this only applies if template2 is completely empty, correct? >Otherwise it would have *some* content, and the returned value would not >be empty. I think what you are really asking though is whether sections >and variables in template2 should have meaning to template1, or if the >returned value is a simple string. I think that the latter provides 90% >of desired functionality and is easier to implement. Basically this comes >down to parsing each file as it is included or wait until all files have >been included and then parse the whole thing. I think the former is >preferable, esp since includes could be within if statements. I was thinking that the only variables that would affect automatic section collapsing would be @ (loop variables). Having section depend on # or $ variables just wouldn't make much sense. But you're right, the essence is whether the included template gets treated as the string result of parsing or as an actual compiled entity. I know it'd be easier to make it work as a string result, but then you couldn't really cache it and it'd have to be reparsed each time you happened upon it. I guess for now I'll make it so that template2 sections don't influence template1 sections, and we'll see what happens. I'm not going to be too rigid about it, we can always rework the engine. -Andrei

« previous php.template (#314) next »