Hello,
I'm trying to add a php randomize instruction into the template.
It works just fine on a .php page but not in the template.
.jpg" width="215" height="110" alt="Header Image" />
Is this possible please?
CMSMS ver 1.1
cheers.
Adding php instruction to template [solved]
-
crackmedia
Adding php instruction to template [solved]
Last edited by crackmedia on Thu Aug 16, 2007 7:55 pm, edited 1 time in total.
Re: Adding php instruction to template
You have to have it enabled in your config.php and the syntax is:
{php}
your code
{/php}
or, alternatively, you may be able to do it using a UDT with your php code and call it in your template.
UDT named random
Nullig
{php}
your code
{/php}
or, alternatively, you may be able to do it using a UDT with your php code and call it in your template.
UDT named random
Code: Select all
echo(rand(1,6));
Code: Select all
src="http://www.longbarrow.co.uk/images/header_{random}.jpg"
Last edited by Nullig on Thu Aug 16, 2007 7:19 pm, edited 1 time in total.
Re: Adding php instruction to template [solved]
Add [solved] to the original post subject line Please....


