On Wed, Sep 12, 2007 at 11:04:34AM +0100, Rob Clarke wrote:
> I've been working on a Template toolkit plugin that will make it easier for
> our client side developers to include relevant CSS files in their templates.
> The basic idea is that developers can use the plugin as follows:
>
> [% USE CSS href="video_player_styles.tt" media="screen" %]
> [% USE CSS href="story_styles.tt" media="screen" %]
I'd agree that a Plugin is overkill, but seems like you can use the
tools as you see fit.
It only takes a few lines of template code, so I've used a macro:
include_javascript( 'calendar' );
which pushes it onto an array. CSS is often better in one file, I
think, although I do have an included_css() macro that does the same
thing.
I also have inline_css( 'block_name' ) where BLOCK block_name ... END
gets added to any inline css at the top of that page. Rarely used,
but handy for css that really is only used on one page.
> <link rel="stylesheet" type="text/css" href="story.css" />
> <link rel="stylesheet" type="text/css" href="video_player.css" />
> <link rel="stylesheet" type="text/css" href="sports_wrapper.css" />
>
> However the desirable output for our developers would be:
>
> <link rel="stylesheet" type="text/css" href="sports_wrapper.css" />
> <link rel="stylesheet" type="text/css" href="story.css" />
> <link rel="stylesheet" type="text/css" href="video_player.css" />
A good reason to have the css in one file.
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.
--
Bill Moseley
[EMAIL PROTECTED]
_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates