Defining New Template Variable Defining New Template Variable
 

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

Main Menu

Defining New Template Variable

Started by kingspice, March 20, 2005, 06:32:00 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

kingspice

To define a new variable for template.html i.e. {ADVERT} do i just need to add it to:
$template_vars array in theme.php
or does it require additional changes?

donnoman

If you want to add a new token like that, you need to add a template var that contains the content you want to replace {TOKEN} with.

Place {TOKEN} in your template.html where you want it to go.

if your {TOKEN} is above {GALLERY} then you need to add the replacement instructions to function pageheader in theme.php
If it is below {GALLERY} then you need to add the replacement instructions to function pagefooter in theme.php


donnoman