By anonymouscowards on
I'm having trouble getting the Optional CSS configured by your visitors snippet working in Drupal 5 (title is a bit misleading too, it just allows users to add an extra stylesheet, rather than configure any css tags).
I've replaced theme_add_style with drupal_add_css but this "optional" stylesheet is being added before my main theme stylesheet which means I can't override it and defeats the purpose of the additional stylesheet altogether.
Can anyone tell me how I can change the order these stylesheets are loaded, or how to make this snippet work in Drupal 5?
Thanks a lot for your help.
Comments
Solved.
Still don't know how to directly control the order of loading the stylesheets. I'm guessing the only way is to manipulate the array $styles in template.tpl.php (but I can't work out how to manipulate arrays in php effectively yet, would like to do it with $links).
However the problem with the snippet was that I needed drupal_add_css($style_sheet, 'theme','all'); rather than just drupal_add_css($style_sheet);