Re: smarty - php as template
| From: | Amanda Hemmerich | Date: | Thu, 08 Apr 2004 19:40:43 +0000 |
| Subject: | Re: smarty - php as template | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-182901@lists.php.net to get a copy of this message | ||
Can anyone direct me to a good resource for learning to use PHP as a
templating language along with plenty of examples? I prefer books, but
web is fine, too.
Thanks so much!
Amanda
On Thu, 8 Apr 2004, Justin French wrote:
> On 07/04/2004, at 1:33 AM, Angelo Zanetti wrote:
>
> > hi all has anyone used smarty before? what do you think of it? I think
> > it's
> > pretty nice to seperate your script (code) from your design.
> >
> > i would like to hear your comments and if you have any alternatives
> > let me
> > know.
>
> PHP itself is a great templating language :)
>
> <h1><?=$title?></h1>
> <table>
> <? foreach($staff as $person): ?>
> <tr >
> <td><?=$person['firstname']?>
> <?=$person['surname']?></td>
> <td><?=$person['role']?></td>
> <td><?=$person['phone']?></td>
> <td><a href='E±�àêGÍv£9s
> v@"Kmailto:<?=$person['email']?>'><?=$person['email']?></td>
> </tr>
> <? endforeach; ?>
> </table>
>
> You can still separate your logic from your presentation, template
> designers can still use quick, simple "tags" to include code, and the
> upside is that people familiar with PHP don't need to learn ANOTHER
> language (that's what Smarty is) -- they can dive straight in.
>
> The question is, do you want to give your templater designers full
> access to the power of PHP, or not. In my case, I did.
>
>
> Justin
>
> ---
> Justin French
> http://indent.com.au
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>