php - CakePHP - include css based on specific pages? -


I want to include a specific CSS file that should be applied to the homepage, and on my site 6-7 Other pages

I know that I can do this via PHP, I am getting URL, looking for a page linking CSS, but I was wondering if there is a clever way (or Better way to include the correct css file (s) to KCPHP

I realize that I can combine the CSS file with specific ideas, but - then they & lt; Head & gt; . Can anyone link to the scene and be shown in the head?

I hope that my questions should be understood, and appreciate any help.

I realize that I can add a CSS file to specific scenes, but - then They & lt; Head & gt; . Can anyone link to the scene and be shown in the head?

Yes, they should be in the head:

If the key option is set to false in the '$' option parameter, then the link tag $ scripts_for_layout variable Which you can print inside the head tag of the document. / P>

So, this snippet in your view ...

  $ this-> HTML-> Css ('my-css', null, array ('inline' = & gt; wrong));   

... Your & lt; Head & gt; is appropriate in & lt; Link & gt; element.

Comments