I have a weird problem that needs some expert help...
I’m trying to build a very simple site using a very simple template... wanting to use external files for my tpl files...
So... a snippet called ’include’:
<?php
if (file_exists($file)) {
$tpl = include $file;
} else { $tpl = 'File not found at: '.$file; }
return $tpl;
?>
And a call to the snippet inside my template:
[[!include? &file=`assets/templates/header.php`]][[!include? &file=`assets/templates/menu.php`]]
[[!include? &file=`assets/templates/footer.php`]]
Returns a very strange thing: a number 1 appears before each template section when I preview the page, see:
http://www.blutree.tv/modx
Anybody have any clue why? lol