Closed (fixed)
Project:
Switchtheme
Version:
7.x-1.0
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
18 Dec 2011 at 22:13 UTC
Updated:
18 Dec 2011 at 22:19 UTC
In my theme's page.tpl.php, I am using the following to print out my theme path (to call images from the theme directory):
<?php $theme_path = drupal_get_path('theme', variable_get('theme_default', NULL)); ?>
<img src="<?php echo $theme_path; ?>/img/foo.png" />
This of course leaves my theme looking in the wrong directory for images and breaks each one as switchtheme leaves the "default theme" intact.
Is there a way to work around this or a better way to call images in my theme that will work with switchtheme?
Comments
Comment #1
gthing commentedAh looks like this works: