Hi All,
Within my template files e.g. home.html or details.html, I would like to do a php include for a file to be included on the template.
The include part works fine, however I am finding that any of the dynamic 4images code is not being executed or carried out if they are in the include file. They appear to only run if they are in the main template files e.g. home.html, details.html etc. When I say dynamic parts I mean the bits that are dynamic within the template files that are enclosed by the curly brackets {} e.g.
{template_url}
{if random_image}
{site_name}
For example in home.html, I have the following snippet of code in the template:
<?PHP
$special_include_file = "./templates/default/simplified/test.php";
Include($special_include_file);
?>
And in the include file (test.php) I have:
<img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" />
<?PHP
Echo “php is working”;
?>
When the page is generated on the webserver, if I look at the page source code, this is what I get:
<img src="/images/spacer.gif" alt="" width="4" height="4" />
php is working
You can see that the php in the include is executed fine but the 4images dynamic part did not e.g. {template_url}
Any help would be greatly appreciated.
Thanks,
Adrian