PDA

View Full Version : Template and including php variables


dodjer42
09-15-2008, 10:00 AM
I have a template which has static mapping for some data which frequently changes. For example, the template contains these lines:

Slot 1: <br />
<td align="right"><span><b><a><font color="#FFFFFF" size="1">Closed </font></a></b></span></td>

Slot 2: <br />
<td align="right"><span><b><a><font color="#000000" size="1">Open </font></a></b></span></td>

I have a page which allows the administrator to modify the closed or open status which is stored in the database.

I can read the data back from the database no problem, but I cant figure out how to modify the template to use that data.

Naturally in a pure PHP environment, I'd just insert a <?php echo $varname ?>, but this isn't possible in a template. Please correct me if I am wrong.

I've read some guides, and I just cant get my head around this implementation.

Please help.

Opserty
09-15-2008, 11:51 AM
<td align="right"><span><b><a><font color="#FFFFFF" size="1">$varname</font></a></b></span></td>

dodjer42
09-15-2008, 08:16 PM
Thanks Opserty.

I found this article: https://vborg.vbsupport.ru/showthread.php?t=82625&highlight=template+plugin+options

So do I need to create a plugin?

Regards,
Dave