On Wed, Sep 12, 2007 at 10:38:01AM -0700, Bill Moseley wrote: > One time I simply prefixed my css files with digits and sorted, but that's > a bit ugly. > > > Is the only solution not to use more than one wrapper? > > I'm a big fan of wrappers. >
This is our way to handle wrappers with wrappers.. etc..
------------ global_wrapper -------------
<html>
<head><title>Blah...</title>
<style type="text/css">
[%
DEFAULT styles = [];
styles.unshift('/css/global.css');
FOREACH style = styles.unique;
'@import url("' _ style _ '");' _ "\n";
END;
%]
</style>
<body>
[% content %]
</body>
</html>
---------------------------------------------
------------ department_wrapper -------------
[%
DEFAULT styles = [];
styles.unshift('/css/departmental.css');
WRAPPER global_wrapper;
%]
<div id='container'>
<div id='main_column'>
[% content %]
</div>
</div>
[% END; %]
---------------------------------------------
-------------- normal_page ------------------
[%
DEFAULT styles = [];
styles.unshift('/css/blah.css');
WRAPPER department_wrapper;
%]
<div id='main_content'>
Blah de blah... boo boo bork
</div>
[%
END;
%]
---------------------------------------------
Technically using this technique you can have any number of levels of
wrappers... I litterally do this with every block I make cause I know
then that I can wrap a weather bug inside a main content inside a
departmental page inside the global header/footer and not worry.
Only forces me to add 1 line plus a line for each css... and we of
course use the same trick for the javascript (actually use it WAY more
for the javascript (jquery :P ) )
--
Todd Freeman Ext 6103 .^. Don't fear the penguins!
Programming Department /V\
Andrews University // \\ http://www.linux.org/
http://www.andrews.edu/~freeman/ /( )\ http://www.debian.org/
^^ ^^
signature.asc
Description: Digital signature
