Re: JS question
On Fri, Apr 1, 2011 at 12:26 AM, Krissy Masters
<naked.cake.baker@gmail.com> wrote:
> I can not seem to figure out how to output all javascript codeblocks in 1
> place on the page.
>
> I have elements that might require a scriptblock then some other element on
> the page. How can I output the js in the element and the view into 1 spot in
> the layout rather than in the middle of the page top bottom of where the
> element gets placed.
>
> Read the cookbook scriptStart codeblock js->outputbuffer tried various
> things and everything just gets spit out all over.
>
> <script type="text/javascript">
> .
> </script>
Use the "inline" option.
$this->Html->script('lib/some.library.min', array('inline' => false));
$code =<<<EOT
...
EOT;
$this->Html->scriptBlock($code, array('inline' => false));
--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home