Loading different images based on theme

cjeanson - March 27, 2008 - 23:50

Hello everyone, I am creating a theme for a site and plan on adding additional themes which users can choose between using the SwitchTheme module and its block.

However, I would like to use a dozen or so images in the content of the site (say perhaps as dividers, headers, other miscellaneous images). However, I would like these to be theme related.

So, if I have a red theme, I would like the images to suit the theme.

If I add a water-esque theme, I would perhaps change these images to leaves floating on the water, etc. etc.

Now, I imagine this could be done through a PHP insertion, with a variable used in place of the theme name.

If I am right in this assumption, I could use a variable that uses "current theme" in its path so if everything is relative, it would load the image for the theme currently selected.

Am I close in my reasoning, or totally out to lunch? I would love to know how to accomplish this, I can think of some very cool things I can do with this issue solved.

Thanks

Nevermind, makes more sense

cjeanson - March 28, 2008 - 04:08

Nevermind, makes more sense to use background images and define everything through CSS.

 
 

Drupal is a registered trademark of Dries Buytaert.