PDA

View Full Version : constants in template?


XiZa
05-08-2008, 02:00 PM
Hello,

I want to integrate a constant (define()) in my template, how can I do that?

Thanks

Lynne
05-08-2008, 02:02 PM
Template are for html, if you want to use code/php, then you need to do so in a plugin.

XiZa
05-08-2008, 06:38 PM
you don't understand, I want my constant value in a template. I do not want to define the constant in the template.

Lynne
05-08-2008, 07:53 PM
I guess I don't understand. Maybe give an example of what you are using right now in your template and what the result is (either the error or an image of what you get).

Kirk Y
05-08-2008, 08:43 PM
You'll need to use a plugin to store the constant in a variable, as constants aren't parsed in templates.

ie:
$thisscript = THIS_SCRIPT;

You can then use $thisscript in a template.

XiZa
05-08-2008, 10:32 PM
Thanks :)