This is how I include the Blueprint CSS framework in my cake app.
NOTE: In $html->css($path, $attributes), the first argument is the path from app/webroot/css. The second argument is html attributes.
css(array('blueprint/screen', 'blueprint/ie', 'style'), null, array('media' => 'screen, projection'));
echo $html->css('print', null, array('media' => 'print'));
?>
Results in:
Linking JavaScript libraries is very similar.
$jslibraries = array('prototype', 'scriptaculous', 'jquery');
This will link to prototype.js, scriptaculous.js and jquery.js respectively as long as there in app/webroot/js.
Put echo $javascript->link($jslibraries); into the head of your layout and you’re done. You have all three JavaScript libraries at your disposal.
Other good resources:
blog comments powered by Disqus