I want to assign an id to loaded CSS in CakePHP. How to assign the id to CSS using the CakePHP HTML helper?

While loading the single CSS:

echo $this->Html->css('......');

While loading multiple CSS:

$all_css = array('first', 'second', '....');
echo $this->Html->css($all_css);
有帮助吗?

解决方案

loading a single css you can do

echo $this->Html->css('foo', array('id' => 'your_css_id'));

I don't know how to do this with multiple css (unless you want to set the same id to all the tags but I don't think it's your case)

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top