Domanda

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);
È stato utile?

Soluzione

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)

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top