Hi all,
Within the index.tpl in a theme, I want to make use of an image, which comes along the theme. The question now is, which variable gives me the right path to the template directory?
{$serendipityBaseURL} gives the baseurl, is there a similiar variable for the template directory?
Any documentation on all functions/variables that can be used within the smarty templates?
Source image from theme in index.tpl
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Yes, this function is the only way. This is because the templates can be nested inside the directory, depending on how people put it.
A theme can not only be in /serendipity/themes/mytheme, but other people could have it in /serendipity/themes/more_themes/mytheme/.
This function also ensures that if a specific file is not found in the current template, it falls back to the default template. Which is a very good thing to have, and many users appreciate about serendipity.
If you just use the template for your own, you can use "{$serendipityBaseURL}templates/mytheme/img/bla.gif" of course.
Regards,
Garvin
A theme can not only be in /serendipity/themes/mytheme, but other people could have it in /serendipity/themes/more_themes/mytheme/.
This function also ensures that if a specific file is not found in the current template, it falls back to the default template. Which is a very good thing to have, and many users appreciate about serendipity.
If you just use the template for your own, you can use "{$serendipityBaseURL}templates/mytheme/img/bla.gif" of course.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/