>> But, regardless how hard I try, the css <link [..]> gets printed at
>> its own location instead of at $scripts_for_layout which remains
>> empty.
>
> Of course. It's because you call the element in the layout. By the
> time the PHP interpreter arrives at that line, it's already passed the
> line, up above, with echo $scripts_for_layout. This will work if you
> instead include the element inside a view template.
>
> Besides, if the element is inside a layout, you may as well include
> the CSS in the layout itself.

I don't think that's correct - you can use this technique to include
javascript or css files from a view file, so I don't see any reason
why you can't from within an element, the html helper isn't aware of
the file that's called it.

In cake 1.1 there was a define in core.php which forced all (default
cakephp) helpers to echo rather than return, but I think that's been
removed in 1.2.

I realise this hasn't helped much!

j

-- 
jon bennett - www.jben.net - blog.jben.net

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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

Reply via email to