Re: Template Question
| From: | Jonathan Hadddad | Date: | Tue, 17 Aug 2004 17:00:39 +0000 |
| Subject: | Re: Template Question | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-194058@lists.php.net to get a copy of this message | ||
Rather than kill myself trying to do this, I'm simply cutting the file at the content point and saving each half of the file, and using INCLUDE("Start.php") and INCLUDE("finish.php"). Template variables are included in the $template array.
As far as the actual template is concerned, I'll keep using the one I have for sites that do not require PHP in the template. Perhaps even splitting the template into the 2 files (start, finish) and the start() and finish() functions simply include those files.
Yep, huge pain. But since the developer guys will refuse to use either one, there's no point in wasting my time.
Jon
On Aug 14, 2004, at 2:04 PM, rush wrote:
"Jonathan Haddad" <jon@oldirtyhaddad.com> wrote in message news:F463B8D8-ED3C-11D8-A9C3-000393BB7FCE@oldirtyhaddad.com... eval takes a string and evaluates it as PHP, which I also thought would work. But this is a file of mixed PHP and HTML. I've designed it this way because I work with guys that are dreamweaver crazy and want to do all their layout there. Maybe I should parse the file, and eval() the PHP and echoing the HTML? Or is there a better way? well, maybe you could search for php opening and closing tags (<?) and evaluating only what you find between them and echoing, but I am not sure what would happen if two such snippets needed to share the context. Anyway, are you sure this is a good idea? templates are about separating code and html, and most template systems I know are dreamweaver friendly. rush -- http://www.templatetamer.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php