By Lioz on
I'm developing Marinelli theme for Drupal6.
In the node template I have to fetch theme relative path in order to print an image inside my theme folder.
Is there a correct way to do this?
the problem is that site themes can placed both in /themes/ or /sites/default/themes.
I'v tried something like
<?php global $base_url;
if ($sticky) { print '<img src="'.$base_url.'/themes/marinelli/img/sticky.gif" alt="sticky icon" class="sticky" />'; } ?>
<?php }; ?>
but of course this is not the proper way.
Thanks!
Comments
You could print your sticky
You could print your sticky icon using CSS.
Depending on what you want to show up. If its just an icon left of the node title.
I'm not the best at CSS but that is probably a better way of doing it. I want to point out that I haven't even played with Drupal 6 yet.
Good luck!
__________________________________________________________
work in progress www.TheHappyHourHero.com
.
This is a little bit better:
Other way would be:
drupal_get_path('theme', 'yourTheme')--
Lupein
Drupal themes - themeartists.com
great!
i had to to print it out as an image so Lupein's solutions worked great!
thanks!
http://www.signalkuppe.com