Hi,
I have made custom template files for my custom content types. Example page-test.tpl.php

Now I want to a custom css file for each of my custom template files. I am confused as to how to go about doing this ?

Please point me to the right direction or documentation so that I can get this done.

Cheers,
Vishal

Comments

Aniara.io’s picture

There are several ways. One is to override template_preprocess_page in your template.php file and check if the current template file is == page-test (check the end of the function), then you'd use drupal_add_css to add your custom CSS.

Another less standard way is to add a <link /> tag in page-test.tpl.php's <head> element. You won't benefit from Drupal's CSS optimization in this case.

Aniara.io’s picture

Oopps, fixed the tags above.