T5 renders with a dom.
Gives you a lot of control...
You could create a "style" component that finds the head and inserts the appropriate <link> element. Then your components could add their own stylesheets using the style component, with the page and containing components none the wiser. You would want to make sure that a given stylesheet is inserted only once, of course (eg, if your component is contained within a loop...).
A component like this should be very straightforward to write in T5.

Robert

On Aug 13, 2007, at 8/134:51 PM , Chris Lewis wrote:

One of the nice things I learned in my brief investigation of T4.1.2 was that the Shell component would automatically pick up any style sheets a page declared using the @Style annotation (or something like that). I've been wondering how something like this might be achieved in T5, using the available components as opposed to subclassing a base page. This seems like a feature that would be part of the core, as it is such a common need. I know I could emulate this by creating a layout that expected a page property, say externalCss (a collection), and using the Loop component to iterate it and insert the link elements. Is this the only way to do this in T5?

thanks!
chris

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to