문제

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