|
mySkin.htmlA zoglair generated web page starts out from a master HTML template, provided by the active skin. This is in contrast with other template systems, you might have worked with, where separate templates for the header, body and footer parts, are used. It is also worth pointing out that there is only one master template in a skin. Inside that template, you can use conditional structures, if you want, to switch layouts among pages. The master template is a complete HTML document, from Generally speaking, however, a master template should be dealing with just menu and column placement. Don't forget that the same template will be used for all site pages, so, it must be generic. Zoglair gives the site owner the ability to change menus at will, and choose what goes in a page column. The following code is an example of a master HTML template: <?php echo $this->render_unit_doctype($Unit)."\n" ?> <head> <?php echo zoglair::indent($this->render_unit_head($Unit), 1)."\n" ?> </head> <body> <div id="page"> <div id="head"> [[|{{logo}}]] </div> <div id="body"> <div id="title" class="lrc"> <div class="left"> <?php echo sprintf('<h1>%s</h1>', $Unit->get_info('z_con/title')))."\n" ?> </div> <div class="right"> <?php echo zoglair::indent($this->render_unit_buttons($Unit), 4)."\n" ?> </div> </div> <div id="zBody" class="lrc <?php echo $this->render_unit_column($Unit, 'cols', FALSE) ?>"> <div id="zBodyMain" class="zBodyMain left"> <?php echo zoglair::indent($this->render_unit_column($Unit, 'main', TRUE), 4)."\n" ?> </div> <div id="zBodySbar" class="zBodySbar right"> <?php echo zoglair::indent($this->render_unit_column($Unit, 'sbar', TRUE), 4)."\n" ?> </div> </div> </div> <div id="copy" class="lrc"> <div class="left"> <?php echo $zoglair->get_info('domain/copyleft' )."\n" ?> </div> <div class="right"> <?php echo $zoglair->get_info('domain/copyright' )."\n" ?> </div> <div class="center"> <?php echo $zoglair->get_info('domain/copycenter')."\n" ?> </div> </div> </div> < /body> </html> Besides the familiar HTML tags, you will notice a few PHP statements, sharing a common syntax. The generic form you use, to print out anything, is:
Replace ellipsis (...) with whatever you want to print. You will also notice a few instances of Finally, there are 3 objects, whose methods are called:
You can find a full reference of the objects' available methods in the links provided. As for their properties (accessible through
« mySkin.php
mySkin.css »
|