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 <LINK) is correctly located in 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 <script> tag will be > > > > printed > > > > inline, otherwise it will be printed in the <head>, using > > > > $scripts_for_layout > > > > > On top of which, when looking at the actual HtmlHelper::css method, > > > > the last few lines read like this: > > > > if ($inline) { > > > > return $out; > > > > } else { > > > > $view =& ClassRegistry::getObject('view'); > > > > $view->addScript($out); > > > > } > > > > > Other Side note: > > > > Using the JavascriptHelper::link method yields the same result, ie the > > > > method calls don't generate the HTML to include an external JS file. > > > > > Thanks, > > > > > Marc --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---
