Re: [phplib] PHP code in PHPLib templates From: J C Lawrence (claw <email protected>)
Date: 04/29/00

On Sat, 29 Apr 2000 12:02:33 -0500
Mocha PHPLIB <mocha_phplib <email protected>> wrote:

> At 09:52 AM 4/29/00 -0700, J C Lawrence wrote:
>> Can you place PHP code in PHPLib templates (and get it to work),
>> and if so how?
>>
>> I'm running into the situation where embedding some simple PHP
>> code in the templates would make things much simpler. I'm not
>> violating the content/presentation model -- rather allowing the
>> presentation to *also* be a computed factor.

> illustrate your situation in better details so we can properly
> respond.

Simply, a template ala:

  <!-- BEGIN bubba -->
  <ul>
    <li>Some text
    <li>Other text
  </ul>
  <!-- END bubba -->

works, but the following sends the raw uninterpreted PHP code to the
browser:

  <!-- BEGIN boffo -->
  <?
    include ("base_page.inc");
    start_page ("{TITLE}");
    {CONTENT}
    end_page ();
  ?>
  <!-- END boffo -->

-- 
J C Lawrence                                 Home: claw <email protected>
----------(*)                              Other: coder <email protected>
--=| A man is as sane as he is dangerous to his environment |=--

--------------------------------------------------------------------- To unsubscribe, e-mail: phplib-unsubscribe <email protected> For additional commands, e-mail: phplib-help <email protected>