Re: Trouble with the HtmlHelper and $scripts_for_layout
> Think about when in terms of processing order $scripts_for_layout is > calculated. You're absolutely right about the order of processing. It seems $scripts_for_layout is calculated from the view->__scripts[] but only for the actual view template (the one that corresponds to controller/ action) not the other templates that make up the whole view, this might or might not be because layouts and elements are rendered using the static View::_render() call instead of view->_render(). I guess that's where I was mislead or misunderstood, to me all templates that end up displaying are parts of the view that a controller renders which is why I would have expected them all to behave as one whereas this is not the case. > In what way is that result surprising, and in what way is it be > logical to do that. It's surprising to me that adding to the scripts from a view part doesn't affect a member of the view. You are right that this example is not logical, but it does illustrate the behavior that came as a surprise to me. Marc --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Trouble with the HtmlHelper and $scripts_for_layout
On Oct 7, 10:02 pm, Marc Campeau <[EMAIL PROTECTED]> wrote: > 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: > css(array('general'), null, null, false); ?> > Think about when in terms of processing order $scripts_for_layout is calculated. In what way is that result surprising, and in what way is it be logical to do that. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Trouble with the HtmlHelper and $scripts_for_layout
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: css(array('general'), null, null, false); ?> 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 -~--~~~~--~~--~--~---
Re: Trouble with the HtmlHelper and $scripts_for_layout
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 -~--~~~~--~~--~--~---
Re: Trouble with the HtmlHelper and $scripts_for_layout
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? Should I submit this as a bug/confusion/whatever? Marc On Oct 7, 10:33 am, Marc Campeau <[EMAIL PROTECTED]> wrote: > Hi all, > > still haven't found a solution for this. Does anyone know whom I might > contact to know if this is a bug or expected behavior, ie using $html->css() > within elements doesn't work the same as in views? Should I > > submit this to the bug tracker? > > Thanks for helping a new baker. > > Marc > > On Oct 7, 8:50 am, Marc Campeau <[EMAIL PROTECTED]> wrote: > > > Hi Michael, > > > thanks for looking at this problem. I know it works when calling > > $html->css() from the view (see side notes in original post) but my problem > > > is it doesn't when calling $html->css() or $javascript->link from an > > element (/views/elements/menu.ctp for instance). > > > Thanks, > > > Marc > > > On Oct 6, 6:45 pm, Michael <[EMAIL PROTECTED]> wrote: > > > > Marc, > > > I'm using RC3. > > > > In my view I'm calling $html->css() with array() as the third > > > parameter instead of null. The > > head section. > > > > Michael > > > > On Oct 6, 2:41 pm, Marc Campeau <[EMAIL PROTECTED]> wrote: > > > > > Thanks for taking the time. t least now I know I'm not alone! ;-) > > > > > On Oct 6, 3:38 pm, hydra12 <[EMAIL PROTECTED]> wrote: > > > > > > Oops! You're right. Sorry. I can't get it to work either. > > > > > > On Oct 6, 2:00 pm, "Marc Campeau" <[EMAIL PROTECTED]> wrote: > > > > > > > Thanks for your input. > > > > > > > I beg to differ though, the manual says: > > > > > > >http://manual.cakephp.org/view/96/Layouts > > > > > > When using $html->css() or $javascript->link() in view files, > > > > > > specify > > > > > > 'false' for the 'in-line' argument to place the html source in > > > > > > $scripts_for_layout. (See API for more details on usage). > > > > > > >http://manual.cakephp.org/view/206/Inserting-Well-Formatted-elements > > > > > > css(mixed $path, string $rel = null, array $htmlAttributes, boolean > > > > > > $inline = true) > > > > > > > Creates a link(s) to a CSS style-sheet. If $inline is set to false, > > > > > > the link tags are added to the $scripts_for_layout variable which > > > > > > you > > > > > > can print inside the head tag of the document. > > > > > > >http://api.cakephp.org/class_html_helper.html > > > > > > HtmlHelper::css($path, $rel = null, $htmlAttributes = array(), > > > > > > $inline = true) > > > > > > > Creates a link element for CSS stylesheets. > > > > > > > Parameters: > > > > > > mixed $path The name of a CSS style sheet in > > > > > > /app/webroot/css, > > > > > > or an array containing names of CSS stylesheets in that directory. > > > > > > string $rel Rel attribute. Defaults to "stylesheet". > > > > > > array $htmlAttributes Array of HTML attributes. > > > > > > boolean $inline If set to false, the generated tag > > > > > > appears in > > > > > > the head tag of the layout. > > > > > > >http://api.cakephp.org/class_javascript_helper.html > > > > > > JavascriptHelper::link( $url, $inline = true) > > > > > > > Returns a JavaScript include tag (SCRIPT element). If the filename > > > > > > is > > > > > > prefixed with "/", the path will be relative to the base path of > > > > > > your > > > > > > application. Otherwise, the path will be relative to your JavaScript > > > > > > path, usually webroot/js. > > > > > > > Parameters: > > > > > > mixed $url String URL to JavaScript file, or an array of > > > > > > URLs. > > > > > > boolean $inline If true, the
Re: Trouble with the HtmlHelper and $scripts_for_layout
Hi all, still haven't found a solution for this. Does anyone know whom I might contact to know if this is a bug or expected behavior, ie using $html- >css() within elements doesn't work the same as in views? Should I submit this to the bug tracker? Thanks for helping a new baker. Marc On Oct 7, 8:50 am, Marc Campeau <[EMAIL PROTECTED]> wrote: > Hi Michael, > > thanks for looking at this problem. I know it works when calling $html->css() > from the view (see side notes in original post) but my problem > > is it doesn't when calling $html->css() or $javascript->link from an > element (/views/elements/menu.ctp for instance). > > Thanks, > > Marc > > On Oct 6, 6:45 pm, Michael <[EMAIL PROTECTED]> wrote: > > > Marc, > > I'm using RC3. > > > In my view I'm calling $html->css() with array() as the third > > parameter instead of null. The > head section. > > > Michael > > > On Oct 6, 2:41 pm, Marc Campeau <[EMAIL PROTECTED]> wrote: > > > > Thanks for taking the time. t least now I know I'm not alone! ;-) > > > > On Oct 6, 3:38 pm, hydra12 <[EMAIL PROTECTED]> wrote: > > > > > Oops! You're right. Sorry. I can't get it to work either. > > > > > On Oct 6, 2:00 pm, "Marc Campeau" <[EMAIL PROTECTED]> wrote: > > > > > > Thanks for your input. > > > > > > I beg to differ though, the manual says: > > > > > >http://manual.cakephp.org/view/96/Layouts > > > > > When using $html->css() or $javascript->link() in view files, specify > > > > > 'false' for the 'in-line' argument to place the html source in > > > > > $scripts_for_layout. (See API for more details on usage). > > > > > >http://manual.cakephp.org/view/206/Inserting-Well-Formatted-elements > > > > > css(mixed $path, string $rel = null, array $htmlAttributes, boolean > > > > > $inline = true) > > > > > > Creates a link(s) to a CSS style-sheet. If $inline is set to false, > > > > > the link tags are added to the $scripts_for_layout variable which you > > > > > can print inside the head tag of the document. > > > > > >http://api.cakephp.org/class_html_helper.html > > > > > HtmlHelper::css($path, $rel = null, $htmlAttributes = array(), > > > > > $inline = true) > > > > > > Creates a link element for CSS stylesheets. > > > > > > Parameters: > > > > > mixed $path The name of a CSS style sheet in > > > > > /app/webroot/css, > > > > > or an array containing names of CSS stylesheets in that directory. > > > > > string $rel Rel attribute. Defaults to "stylesheet". > > > > > array $htmlAttributes Array of HTML attributes. > > > > > boolean $inline If set to false, the generated tag > > > > > appears in > > > > > the head tag of the layout. > > > > > >http://api.cakephp.org/class_javascript_helper.html > > > > > JavascriptHelper::link( $url, $inline = true) > > > > > > Returns a JavaScript include tag (SCRIPT element). If the filename is > > > > > prefixed with "/", the path will be relative to the base path of your > > > > > application. Otherwise, the path will be relative to your JavaScript > > > > > path, usually webroot/js. > > > > > > Parameters: > > > > > mixed $url String URL to JavaScript file, or an array of > > > > > URLs. > > > > > boolean $inline If true, the
Re: Trouble with the HtmlHelper and $scripts_for_layout
Hi Michael, thanks for looking at this problem. I know it works when calling $html- >css() from the view (see side notes in original post) but my problem is it doesn't when calling $html->css() or $javascript->link from an element (/views/elements/menu.ctp for instance). Thanks, Marc On Oct 6, 6:45 pm, Michael <[EMAIL PROTECTED]> wrote: > Marc, > I'm using RC3. > > In my view I'm calling $html->css() with array() as the third > parameter instead of null. The head section. > > Michael > > On Oct 6, 2:41 pm, Marc Campeau <[EMAIL PROTECTED]> wrote: > > > Thanks for taking the time. t least now I know I'm not alone! ;-) > > > On Oct 6, 3:38 pm, hydra12 <[EMAIL PROTECTED]> wrote: > > > > Oops! You're right. Sorry. I can't get it to work either. > > > > On Oct 6, 2:00 pm, "Marc Campeau" <[EMAIL PROTECTED]> wrote: > > > > > Thanks for your input. > > > > > I beg to differ though, the manual says: > > > > >http://manual.cakephp.org/view/96/Layouts > > > > When using $html->css() or $javascript->link() in view files, specify > > > > 'false' for the 'in-line' argument to place the html source in > > > > $scripts_for_layout. (See API for more details on usage). > > > > >http://manual.cakephp.org/view/206/Inserting-Well-Formatted-elements > > > > css(mixed $path, string $rel = null, array $htmlAttributes, boolean > > > > $inline = true) > > > > > Creates a link(s) to a CSS style-sheet. If $inline is set to false, > > > > the link tags are added to the $scripts_for_layout variable which you > > > > can print inside the head tag of the document. > > > > >http://api.cakephp.org/class_html_helper.html > > > > HtmlHelper::css($path, $rel = null, $htmlAttributes = array(), $inline > > > > = true) > > > > > Creates a link element for CSS stylesheets. > > > > > Parameters: > > > > mixed $path The name of a CSS style sheet in /app/webroot/css, > > > > or an array containing names of CSS stylesheets in that directory. > > > > string $rel Rel attribute. Defaults to "stylesheet". > > > > array $htmlAttributes Array of HTML attributes. > > > > boolean $inline If set to false, the generated tag > > > > appears in > > > > the head tag of the layout. > > > > >http://api.cakephp.org/class_javascript_helper.html > > > > JavascriptHelper::link( $url, $inline = true) > > > > > Returns a JavaScript include tag (SCRIPT element). If the filename is > > > > prefixed with "/", the path will be relative to the base path of your > > > > application. Otherwise, the path will be relative to your JavaScript > > > > path, usually webroot/js. > > > > > Parameters: > > > > mixed $url String URL to JavaScript file, or an array of URLs. > > > > boolean $inline If true, the
Re: Trouble with the HtmlHelper and $scripts_for_layout
Marc, I'm using RC3. In my view I'm calling $html->css() with array() as the third parameter instead of null. The wrote: > Thanks for taking the time. t least now I know I'm not alone! ;-) > > On Oct 6, 3:38 pm, hydra12 <[EMAIL PROTECTED]> wrote: > > > Oops! You're right. Sorry. I can't get it to work either. > > > On Oct 6, 2:00 pm, "Marc Campeau" <[EMAIL PROTECTED]> wrote: > > > > Thanks for your input. > > > > I beg to differ though, the manual says: > > > >http://manual.cakephp.org/view/96/Layouts > > > When using $html->css() or $javascript->link() in view files, specify > > > 'false' for the 'in-line' argument to place the html source in > > > $scripts_for_layout. (See API for more details on usage). > > > >http://manual.cakephp.org/view/206/Inserting-Well-Formatted-elements > > > css(mixed $path, string $rel = null, array $htmlAttributes, boolean > > > $inline = true) > > > > Creates a link(s) to a CSS style-sheet. If $inline is set to false, > > > the link tags are added to the $scripts_for_layout variable which you > > > can print inside the head tag of the document. > > > >http://api.cakephp.org/class_html_helper.html > > > HtmlHelper::css($path, $rel = null, $htmlAttributes = array(), $inline = > > > true) > > > > Creates a link element for CSS stylesheets. > > > > Parameters: > > > mixed $path The name of a CSS style sheet in /app/webroot/css, > > > or an array containing names of CSS stylesheets in that directory. > > > string $rel Rel attribute. Defaults to "stylesheet". > > > array $htmlAttributes Array of HTML attributes. > > > boolean $inline If set to false, the generated tag > > > appears in > > > the head tag of the layout. > > > >http://api.cakephp.org/class_javascript_helper.html > > > JavascriptHelper::link( $url, $inline = true) > > > > Returns a JavaScript include tag (SCRIPT element). If the filename is > > > prefixed with "/", the path will be relative to the base path of your > > > application. Otherwise, the path will be relative to your JavaScript > > > path, usually webroot/js. > > > > Parameters: > > > mixed $url String URL to JavaScript file, or an array of URLs. > > > boolean $inline If true, the
Re: Trouble with the HtmlHelper and $scripts_for_layout
Thanks for your input. I beg to differ though, the manual says: http://manual.cakephp.org/view/96/Layouts When using $html->css() or $javascript->link() in view files, specify 'false' for the 'in-line' argument to place the html source in $scripts_for_layout. (See API for more details on usage). http://manual.cakephp.org/view/206/Inserting-Well-Formatted-elements css(mixed $path, string $rel = null, array $htmlAttributes, boolean $inline = true) Creates a link(s) to a CSS style-sheet. If $inline is set to false, the link tags are added to the $scripts_for_layout variable which you can print inside the head tag of the document. http://api.cakephp.org/class_html_helper.html HtmlHelper::css($path, $rel = null, $htmlAttributes = array(), $inline = true) Creates a link element for CSS stylesheets. Parameters: mixed $path The name of a CSS style sheet in /app/webroot/css, or an array containing names of CSS stylesheets in that directory. string $rel Rel attribute. Defaults to "stylesheet". array $htmlAttributes Array of HTML attributes. boolean $inline If set to false, the generated tag appears in the head tag of the layout. http://api.cakephp.org/class_javascript_helper.html JavascriptHelper::link( $url, $inline = true) Returns a JavaScript include tag (SCRIPT element). If the filename is prefixed with "/", the path will be relative to the base path of your application. Otherwise, the path will be relative to your JavaScript path, usually webroot/js. Parameters: mixed $url String URL to JavaScript file, or an array of URLs. boolean $inline If true, the
Re: Trouble with the HtmlHelper and $scripts_for_layout
Thanks for taking the time. t least now I know I'm not alone! ;-) On Oct 6, 3:38 pm, hydra12 <[EMAIL PROTECTED]> wrote: > Oops! You're right. Sorry. I can't get it to work either. > > On Oct 6, 2:00 pm, "Marc Campeau" <[EMAIL PROTECTED]> wrote: > > > Thanks for your input. > > > I beg to differ though, the manual says: > > >http://manual.cakephp.org/view/96/Layouts > > When using $html->css() or $javascript->link() in view files, specify > > 'false' for the 'in-line' argument to place the html source in > > $scripts_for_layout. (See API for more details on usage). > > >http://manual.cakephp.org/view/206/Inserting-Well-Formatted-elements > > css(mixed $path, string $rel = null, array $htmlAttributes, boolean > > $inline = true) > > > Creates a link(s) to a CSS style-sheet. If $inline is set to false, > > the link tags are added to the $scripts_for_layout variable which you > > can print inside the head tag of the document. > > >http://api.cakephp.org/class_html_helper.html > > HtmlHelper::css($path, $rel = null, $htmlAttributes = array(), $inline = > > true) > > > Creates a link element for CSS stylesheets. > > > Parameters: > > mixed $path The name of a CSS style sheet in /app/webroot/css, > > or an array containing names of CSS stylesheets in that directory. > > string $rel Rel attribute. Defaults to "stylesheet". > > array $htmlAttributes Array of HTML attributes. > > boolean $inline If set to false, the generated tag appears > > in > > the head tag of the layout. > > >http://api.cakephp.org/class_javascript_helper.html > > JavascriptHelper::link( $url, $inline = true) > > > Returns a JavaScript include tag (SCRIPT element). If the filename is > > prefixed with "/", the path will be relative to the base path of your > > application. Otherwise, the path will be relative to your JavaScript > > path, usually webroot/js. > > > Parameters: > > mixed $url String URL to JavaScript file, or an array of URLs. > > boolean $inline If true, the
Re: Trouble with the HtmlHelper and $scripts_for_layout
Oops! You're right. Sorry. I can't get it to work either. On Oct 6, 2:00 pm, "Marc Campeau" <[EMAIL PROTECTED]> wrote: > Thanks for your input. > > I beg to differ though, the manual says: > > http://manual.cakephp.org/view/96/Layouts > When using $html->css() or $javascript->link() in view files, specify > 'false' for the 'in-line' argument to place the html source in > $scripts_for_layout. (See API for more details on usage). > > http://manual.cakephp.org/view/206/Inserting-Well-Formatted-elements > css(mixed $path, string $rel = null, array $htmlAttributes, boolean > $inline = true) > > Creates a link(s) to a CSS style-sheet. If $inline is set to false, > the link tags are added to the $scripts_for_layout variable which you > can print inside the head tag of the document. > > http://api.cakephp.org/class_html_helper.html > HtmlHelper::css($path, $rel = null, $htmlAttributes = array(), $inline = true) > > Creates a link element for CSS stylesheets. > > Parameters: > mixed $path The name of a CSS style sheet in /app/webroot/css, > or an array containing names of CSS stylesheets in that directory. > string $rel Rel attribute. Defaults to "stylesheet". > array $htmlAttributes Array of HTML attributes. > boolean $inline If set to false, the generated tag appears in > the head tag of the layout. > > http://api.cakephp.org/class_javascript_helper.html > JavascriptHelper::link( $url, $inline = true) > > Returns a JavaScript include tag (SCRIPT element). If the filename is > prefixed with "/", the path will be relative to the base path of your > application. Otherwise, the path will be relative to your JavaScript > path, usually webroot/js. > > Parameters: > mixed $url String URL to JavaScript file, or an array of URLs. > boolean $inline If true, the
Re: Trouble with the HtmlHelper and $scripts_for_layout
If you look at the api, you'll see that $html->css creates a link to a pre-existing style sheet in webroot/css. $scripts_for_layout is for javascript using the javascript helper. On Oct 6, 12:02 pm, Marc Campeau <[EMAIL PROTECTED]> wrote: > Yeah sorry, I thought I should have put that in the message. > > I'm running off the latest code from the SVN Repository, checked it > out last week, Friday if I remember well. > > Thanks for the heads up, > > Marc > > On Oct 6, 12:52 pm, "Lamonte(Scheols/Demonic)" <[EMAIL PROTECTED]> > wrote: > > > Just to help others who might help you, are you running the latest version > > of Cake? > > > On Mon, Oct 6, 2008 at 10:34 AM, Marc Campeau <[EMAIL PROTECTED]> wrote: > > > > Hi everyone, > > > > I'm having trouble with the HtmlHelper and the $scripts_for layout. > > > Basically, I use the helper to add CSS inline ($html- > > > >css(array('someCss'), null, null, false);) from within the different > > > elements (/views/elements/) that the view needs to render. I would > > > have expected these CSS to show up in the HTML Head by echoing > > > $scripts_for_layout in default.ctp but unfortunately they don't? If I > > > echo the CSS inline then they do show up in the markup. > > > > Anyone knows what I'm doing wrong? > > > > Side notes: > > > Doing the $html->css() inline call from /views/default.ctp doesn't > > > work either. > > > Doing the $html->css() inline call from the view that's rendered (/ > > > views/users/login.ctp for instance), works. > > > > Thanks for taking the time to read this, > > > > Marc > > > -- > > Join cleanscript.com Come here for professional PHP coding. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Trouble with the HtmlHelper and $scripts_for_layout
Just to help others who might help you, are you running the latest version of Cake? On Mon, Oct 6, 2008 at 10:34 AM, Marc Campeau <[EMAIL PROTECTED]> wrote: > > Hi everyone, > > I'm having trouble with the HtmlHelper and the $scripts_for layout. > Basically, I use the helper to add CSS inline ($html- > >css(array('someCss'), null, null, false);) from within the different > elements (/views/elements/) that the view needs to render. I would > have expected these CSS to show up in the HTML Head by echoing > $scripts_for_layout in default.ctp but unfortunately they don't? If I > echo the CSS inline then they do show up in the markup. > > Anyone knows what I'm doing wrong? > > Side notes: > Doing the $html->css() inline call from /views/default.ctp doesn't > work either. > Doing the $html->css() inline call from the view that's rendered (/ > views/users/login.ctp for instance), works. > > Thanks for taking the time to read this, > > Marc > > > > -- Join cleanscript.com Come here for professional PHP coding. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Trouble with the HtmlHelper and $scripts_for_layout
Yeah sorry, I thought I should have put that in the message. I'm running off the latest code from the SVN Repository, checked it out last week, Friday if I remember well. Thanks for the heads up, Marc On Oct 6, 12:52 pm, "Lamonte(Scheols/Demonic)" <[EMAIL PROTECTED]> wrote: > Just to help others who might help you, are you running the latest version > of Cake? > > > > On Mon, Oct 6, 2008 at 10:34 AM, Marc Campeau <[EMAIL PROTECTED]> wrote: > > > Hi everyone, > > > I'm having trouble with the HtmlHelper and the $scripts_for layout. > > Basically, I use the helper to add CSS inline ($html- > > >css(array('someCss'), null, null, false);) from within the different > > elements (/views/elements/) that the view needs to render. I would > > have expected these CSS to show up in the HTML Head by echoing > > $scripts_for_layout in default.ctp but unfortunately they don't? If I > > echo the CSS inline then they do show up in the markup. > > > Anyone knows what I'm doing wrong? > > > Side notes: > > Doing the $html->css() inline call from /views/default.ctp doesn't > > work either. > > Doing the $html->css() inline call from the view that's rendered (/ > > views/users/login.ctp for instance), works. > > > Thanks for taking the time to read this, > > > Marc > > -- > Join cleanscript.com Come here for professional PHP coding. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Trouble with the HtmlHelper and $scripts_for_layout
Hi everyone, I'm having trouble with the HtmlHelper and the $scripts_for layout. Basically, I use the helper to add CSS inline ($html- >css(array('someCss'), null, null, false);) from within the different elements (/views/elements/) that the view needs to render. I would have expected these CSS to show up in the HTML Head by echoing $scripts_for_layout in default.ctp but unfortunately they don't? If I echo the CSS inline then they do show up in the markup. Anyone knows what I'm doing wrong? Side notes: Doing the $html->css() inline call from /views/default.ctp doesn't work either. Doing the $html->css() inline call from the view that's rendered (/ views/users/login.ctp for instance), works. Thanks for taking the time to read this, Marc --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---