Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Defining New Template Variable  (Read 2017 times)

0 Members and 1 Guest are viewing this topic.

kingspice

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 61
Defining New Template Variable
« on: March 20, 2005, 06:32:00 pm »

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?
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: Defining New Template Variable
« Reply #1 on: March 20, 2005, 07:12:34 pm »

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

Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Logged
Pages: [1]   Go Up
 

Page created in 0.014 seconds with 20 queries.