By berenErchamion on
I'm building a theme starting from the Zen theme. I want to have some custom graphics in the header area near the logo. What's the best way to include these? I'd rather not have to hard code anything. I've poked around in some other themes to get ideas and this is the best I've come up with:
<img src="<?php print base_path() . drupal_get_path('theme', 'zen') .'/images/commando_r.jpg' ?>">
but this still hardcodes the name of my theme. Is there a better way?
beren
Comments
API
http://api.drupal.org/api/function/path_to_theme/5
Ah cool - thanks. I guess I
Ah cool - thanks. I guess I can take that ans strip off the end to get my theme's name...and then I can insert it, but then I'll need to hardcode the url pieces before this. Still seems not perfect, but definitely thanks for the tip.
beren