Re: Template System
"MADHATter7" <[email protected]>
| Newsgroups | gmane.comp.web.envolution.devel |
|---|---|
| Message-ID | <003b01c242d0$baba5680$8412fea9@bkvirgin> |
----- Original Message ----- From: "Brook Humphrey" <[email protected]> To: <[email protected]> Sent: Tuesday, August 13, 2002 8:16 AM Subject: Re: [envdev] Template System > What are the actual specifics of the template system? How will it be > simplified? What will our templates look like instead? I would like to help > if I can I didn't really like smarty to begin with but am willing ot work > with whatever you provide in the end. More below. The actual specifics of the template system we are still building... however, in its current form it is very basic and easy to use --along the lines of Smarty. It is simplified because there is no logic or plugins to load //// // BEGIN example usage (example only) //// <?php // READ the template files to be used into memory $tpl = new rendition(array( MASTER => 'master1.tpl', HEADER => 'header.tpl', FOOTER => 'footer.tpl' )); // DEFINE the template holder tags, PROCESS templates $tpl->process(HEADER, array( TIME => GetUserTime(), BANNERS => pnBannerDisplay() )); $tpl->process(FOOTER, array( FOOTMSG => $footmessage )); // Even straight HTML templates must be processed $tpl->process(MASTER); // We can now EMBED templates into other templates $tpl->embed(HEADER, MASTER); // Embeds header template into the master $tpl->embed(FOOTER, MASTER); // Render the templates $tpl->render(); ?> //// // END sample usage //// This is pretty much it for now, it is a barebones system that we can build on and add to as needed. Any input in this regards would be most helpful (additonal needs or ideas). Template files will use holders like this: [HOLDER], [BANNERS], [FOOTMSG], etc... > > I'm glad you liked jpcache. I reinstalled postnuke with encompas thet you guys > posted on your site and put jpcahe on index.php. and modules.php. THe only > other things installed are phpbb2. It runs rather faaast compared to the way > it was before. Yes, I do like the jpcache system --I am looking at version 2 (I really need to look at Version 1, to check differences). I like the db cache idea to eliminate the security risk involved with a file cache syste, however it will still be available as an option. I am adapting it to our needs and for easy API usage. mh7 > By the way my site should be more well whatever now at www.webmedic.net. > > > > -- > -~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~` '~- > Brook Humphrey > Mobile PC Medic, 420 1st, Cheney, WA 99004, 509-235-9107 > http://www.webmedic.net, [email protected], [email protected] > Holiness unto the Lord > -~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~` '~- > > > _______________________________________________ > Envdev mailing list > [email protected] > http://www.madhatt.info/mailman/listinfo/envdev_madhatt.info