On Oct 7, 7:57 pm, Marc Campeau <[EMAIL PROTECTED]> wrote:
> Me again,
>
> so I think I figured some of it out.
>
> It seems like the call to render the default.ctp doesn't defer the
> output of the header until the end of all other element rendering.
> Hence, if echo $scripts_for_layout is processed before in-page element
> (inside the page's body), which are output using echo $this-
>
> >element(...) then they're not found in the header.
>
> If you echo $scripts_for_layout later on, let's say after your
> element() call, then it does contain the link tags that the elements
> added. So I guess the it works but not as expected.
>
> My question now is:
> Was I right to expect that the echo $scripts_for_layout would be
> delayed until all sub-elements are rendered?

$scripts_for_layout is not a marker, when you echo it in the layout
you echo what it contains . If you are calling your element from the
layout, then no, that's not going to and isn't expected to work:
anything it does wrt this variable won't have any effect - it's
contents have already been constructed.

hth,

AD
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to