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" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
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




-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to