You can use variables, you just put a php variable directly in the template. You can use any variable that's available when the template is eval()'d. So you could do something like:
Code:
<ul id="slider">
<li>
<a class="featured-item_$item" href="showthread.php?t=$tid" title="$title">
<span class="slide-caption">$title</span></a>
</li>
</ul>
Then of course you'd need to set those variavle in php code somewhere, like a plugin or a custom script.