User login

How to call the path to theme from within the theme (and why)

We had a site that occasionally generated page not found errors for ie6_fixes.css. Occasionally, we realized, because this file was only sought by browsers following the hide-from-everything-except Internet Explorer 6 code. The file was then not being found because the name of the whole theme had changed, and the existing template had hard-coded in not just the location but also the name of the theme.

Changed in page.tpl.php (and all variations such as page-front.tpl.php and page-node-4.tpl.php:
@import "/sites/default/themes/jonas_theme/ie6_fixes.css";

One should not hard-code, of course, and so:

or the perhaps more reliable

can be used.

This page is superseded by