Syntax should be: echo $html->css( 'right_column', array( 'media' => 'screen' ), null, false );
On Jan 24, 6:45 pm, Gonzalo Servat <gser...@gmail.com> wrote: > Hi All, > > I never had the need to do this, but I've come across a situation where it > comes in handy. I'd like to add a stylesheet for inclusion in <head></head> > from an element. This is because the element I'm including is called > "right_column.ctp" and the CSS to-be-included modifies a few of the styles > on the main page to accomodate for it. There are probably better ways of > doing this, and I'd love to hear your suggestions and ways of doing this, > but for the time being I'd like to find out why I can't include a stylesheet > from an element. My code looks like this: > > $html->css( 'right_column', null, array( 'media' => 'screen' ), false ); > > I started looking into cake/libs/view/view.php and it looks like the layout > is rendered before the elements which explains why it doesn't work > ($this->__scripts is empty at the time that the layout is being rendered). > Anyone? > > Thanks! > Gonzalo --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---