I have put
< ?php echo $javascript->link('jtip', false); ?>
in my view. False just means do not put it here, but put it where $scripts_for_layout is in my layout, so in the header.
Still looking for a way to have js scripts automatically included. It exists, but I still haven't found what I'm looking for... Anyone?
[...] How to use $scripts_for_layout | CakePHP Tips (tags: cakephp javascript) [...]
BeantwoordenVerwijderenCheers. Really concise explanation.
BeantwoordenVerwijderen[...] I wrote about $scripts_for_layout and I was looking for a solution to automatically load js files into your layout. Well, I think the [...]
BeantwoordenVerwijderenThanks!
BeantwoordenVerwijderenhuh.. thanks for explanations :D
BeantwoordenVerwijderen@ ADMIN
BeantwoordenVerwijderenHey, uma observation. No need add echo, only < ? php $javascript->link( 'jtip', fase ); ? >
Falopa!
and how to code in cakephp version 2.x?
BeantwoordenVerwijderenNice Tip!
BeantwoordenVerwijderen