http://www.icyphoenix.com/viewtopic.php?f=4&t=3617&p=24324#p24324
-----------------------------------
Vortex
Fri 15 Feb, 2008 13:51

Re: How To Add A New Var For Template
-----------------------------------
[quote user="KasLimon" post="24323"]That happens because $template class is not defined yet, I think

Please tell me where exactly are you adding that.

Greets![/quote]


At the bottom of common.php (I chose common.php just because I suppose is recalled very frequently)


I have my own PHP function inside common.php. What it does doesn't matter actually, the important thing is that it ends with a single string I want to assign to a variable to use in the template. My function works good on a .php page, I just need to know how to integrate it in the template sistem.

Till now I've worked at .tpls only with html, so hard-coding things. I'd like to improve a bit learning how the .tpls' [b]{VARIABLE}[/b] thingy works in the "php-side", since I've never done that  :mrviolet:  and I thought it would be nice to start with a single variable ^^ (template page is overall_header.tpl )


Thanks for answering and helping, is really appreciated ^^


