CakePHP Quick tip: Adding CSS links to $scripts_for_layout in 1.3
Got caught with this one upgrading from an older version of CakePHP to 1.3
In your view, to add a css file to the $script_for_layout variable, you used to do this:
<?php $html->css("css_file", null, array(), false); ?>
In 1.3, you have to change this to:
<?php $html->css("css_file", null, array("inline"=>false)); ?>
Must have glossed over that on in the CakePHP 1.3 migration guide.


Comments
Thanks for the tip
Thanks for the tip :-)
Haven't really had much chance to play with 1.3 yet...
In 1.3, helpers should really
In 1.3, helpers should really be accessed via the View's property rather than via the $helper variable in order to prevent collisions:
<?php $this->Html->css("css_file", null, array("inline"=>false)); ?>Post new comment