By hass on
hi
i must add a CSS file inside the page-*.tpl.php pages. this following isn't working.
drupal_add_css( (path_to_theme() . '/css/layout_test.css'), 'theme', 'all');
the old way
print theme('stylesheet_import', base_path() . path_to_theme() . '/css/layout_test.css');
worked well...
Regards
Alex
Comments
What does
What does function_exists('drupal_add_css') give you?
======================
Z.Stolar
iStolar Consulting
linnovate.net - Open Source Solutions
iStolar illustration
i found out it is added to
i found out it is added to the array, but the $styles variable isn't updated...
Just use or to include the
Just use
or to include the stylesheet in your theme. There is no need to use other functions because you are in your theme anyway.no, this is not possible. i
no, this is not possible. i must order my styles befor style.css, but after modules. this cannot be done with a include or by manual adding code to page.tpl.php for e.g. after/befor $styles.
It looks like i need to add a
theme('styles',... )function to the theme and add the 'theme' style as type 'module' this way. this one is a bad workaround... but the drupal developers made us to do so until they add a "weight" feature.Take a look at this comment
Take a look at this comment http://drupal.org/node/64292#comment-170649. This should help you.
---------------------------------------------
last projects: www.happyfaces-kinderschminken.de - www.3p-consulting.com
Here is the answer
In Drupal 5.x, if you want to add css from your page.tpl.php in the manner showen above:
In your "page.tpl.php" file, change the line that currently reads
print drupal_get_css($css);toprint drupal_get_css();. That's it. problem solved.