Thanks for clarifying this. On a side note, there's something fishy about the fact that the following doesn't yield what I expected:
In the head tag section of default.ctp: <?php $html->css(array('general'), null, null, false); ?> <?php echo $scripts_for_layout ?> The output doesn't contain the Link tag. Could it be because the render method is run statically (View::_render) when rendering templates? See view.php ~line 370 Marc On Oct 7, 2:25 pm, AD7six <[EMAIL PROTECTED]> wrote: > 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 -~----------~----~----~----~------~----~------~--~---