سؤال

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