CakePHP – link / include JavaScript files in layouts

JavaScript Libraries, OpenSource, PHP, Resources, Tips and Tricks, Tutorials
Create (or modify the) file [code lang="plain"]app/app_controller.php[/code] add this code [php] class AppController extends Controller { var $helpers = array('Html', 'Form', 'Javascript'); } [/php] CakePHP 1.2 allows you to define a reference to a Javascript file which is then added to the head section of the generated code. For this purpose the variable $scripts_for_layout has to be added to the layout: [php] <head> < ?php echo $scripts_for_layout; ?> </head> [/php] In the view you can now link to the Javascript file with: [php] $javascript->link('script.js', false); // OR you can simply use $javascript->link('script.js'); [/php]
Read More

Learning the Yahoo User Interface Library

Flickr, JavaScript Libraries, OpenSource, PHP, Resources, Reviews
The cool book that i just bought today. I was previously working with Prototype and Scriptaculous (and im very good at it) and then jQuery. Most recently i have also worked with mootools because i had to create a component for Joomla 1.5. This week, i had to do something with sliders and had to look into each one of these in more detail. Found out that YUI is far better (and advanced). If you want to sneak peak before purchasing the book, then visit the official YUI blog and read Sample Chapter from Dan Wellman’s “Learning the Yahoo! User Interface Library”. Note: Post comments and your criticism below.
Read More