[geeklog-devel] CSS-Layout possible!
joe at ThrowingDice.com
Tue Sep 18 10:49:55 EDT 2007
At 09:38 AM 9/18/2007, Tony Bibbs wrote:
>In the end I think we should support using straight CSS with DIV's
>and Tables. We do a lot of this stuff at work and what we find is
>that generally the Header/Footer and body content are put in their
>own TD tags and within them we do a lot of DIV's. It's pretty much
>how we strike a balance between overdoing it with tables and trying
>to make the most use of CSS.
>So maybe we can have a config file switch or a switch in the theme's
>functions.php that lets the theme developer decide? I don't think
>this has to be all or nothing...I think we could accommodate either methods.
I'm no CSS expert but if order of appearance in the output matters,
then we just need a config option that handles order of appearance.
Then we don't care if the theme is CSS or TABLE based:
$_CONF['layout_order'] = Array('header', 'left', 'center', 'right',
'footer'); // if we use Oliver's single function
$_CONF['layout_order'] = Array('siteheader' => Array('header',
'left'), 'sitefooter' => Array('right','footer')); // using
siteHeader/siteFooter and center is assumed to go between the two arrays
Then in the theme's functions.php, it can reassign them as needed.
Just let the theme specify the templates entirely:
$_CONF['layout_templates'] = Array('main' => 'something.thtml',
'header' => 'header.thtml', 'footer' => 'footer.thtml', 'left-blocks'
=> 'left-blocks.thtml', ....etc.);
$_CONF['layout_parse'] = Array('header', 'left-blocks',
'right-blocks', 'footer', 'main'); // specifies the order in which
the parts will be parsed.
(Again, assuming Oliver's single layout function. With header and
footer in two functions, just add another array level:
$_CONF['layout_templates'] => Array('siteheader' => Array(...),
'sitefooter' => Array(...));
Throwing Dice Games
More information about the geeklog-devel