If the element is being rendered in the layout, why not add the $html-
>css to the header as normal in the layout?
Is the element optional in the layout? ie. is it only displayed on
some pages and not others?
If so, I think the minor overhead of including the CSS on every page
(and therefore cac
On Tue, Jan 27, 2009 at 12:51 PM, RichardAtHome wrote:
>
> Try it from a layout.
>
> ...but your question is about calling it from inside an element :-S
>
> ... or do you mean an element that's linked from a layout and not a
> view?
Right! An element called from a layout that has a call to $html
Try it from a layout.
...but your question is about calling it from inside an element :-S
... or do you mean an element that's linked from a layout and not a
view?
On Jan 26, 2:19 pm, Gonzalo Servat wrote:
> On Mon, Jan 26, 2009 at 12:17 PM, RichardAtHome
> wrote:
>
>
>
> > Sorry AD7six, just
On Mon, Jan 26, 2009 at 12:17 PM, RichardAtHome wrote:
>
> Sorry AD7six, just tried it in an element and the code IS injected
> into the header:
>
> view.ctp
> element("test") ?>
>
> elements\test.ctp
> css("test", array(), null, false) ?>
>
> I'm using the latest stable build of Cake
>
Try it fr
Sorry AD7six, just tried it in an element and the code IS injected
into the header:
view.ctp
element("test") ?>
elements\test.ctp
css("test", array(), null, false) ?>
I'm using the latest stable build of Cake
On Jan 26, 11:33 am, Gonzalo Servat wrote:
> On Mon, Jan 26, 2009 at 9:24 AM, Rich
On Mon, Jan 26, 2009 at 9:24 AM, RichardAtHome wrote:
>
> Syntax should be:
>
> echo $html->css( 'right_column', array( 'media' => 'screen' ), null,
> false );
>
>
Not if you're using the last parameter as "false". It just adds it to an
array which later gets printed in the $scripts_for_layout sec
Syntax should be:
echo $html->css( 'right_column', array( 'media' => 'screen' ), null,
false );
On Jan 24, 6:45 pm, Gonzalo Servat 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
>
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
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 m