From: Alex B. <en...@tu...> - 2001-05-22 07:11:53
|
> next thing up is actually to build TemplateManager so I can do master > templates and layouts in XSLT. I got here and realized that was in-a-coding-stupor talk, and that's bull. master templates, and module layouts, are normal php-in-html for a number of reasons, not least of which we'd have to generate a huge amount of xml for every page render, only to be hurt by using xsl. anyway, I have a completely functional Page class in cvs. The entire page render pipeline is functional, I even have the ability to dynamically switch a template based on a call to the name of the template in request_uri. (woohoo!). ... for those of you not familiar with the idea of layouts, it goes like this: in r1, I had this itch, like sometimes I wanted to have a little bit of extra fluff/formatting html in a particular page that I didn't necessarily want to associate with a module. so, layouts were born in r2, and they solve the only production/implementation flaw with core_template: no "extra page specific layout code" quite convenient, and you can do nearly anything in a layout, cuz it's php. :) ... some of the methods in Page are a little dense for my taste, although anyone can gain a cursory understanding of the class by reading Page::BuildPage Where possible, I will attempt to simplify the methods, but then again no one will need to putz with (or even know much about) this code so long as they are aware of how it acts under varying conditions. some examples: -you can entirely omit the $bc_page[templates] array (you don't have to have a master template.. if you don't the module groups will just be printed in sequence. -you can change the load order of module::Init methods, just as in r1. -etc. this will all be documented. time for sleep. _a an update: > Init (done, cooked) > Page (done, cooked) > Auth (kneading the dough) > Perm (ditto) > DB (ah, thanks manuel) > Err (need to putz with PEAR_Error to see if it jives) > Lang (this is simple, and will come last) > Sess (done) > Request (done, but needs poking and prodding before going into CVS) > > soon(er!)! soon(er!)! -- alex black, ceo en...@tu... the turing studio, inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 |