I was following the screencast of
http://designfromwithin.com/ in how to include the template html code dynamically, and i use the following snippet:
<?php
# Snippet to include template files from file system
# USAGE: [[includeTemplate? &tpl=’mytemplate/template.html’]]
if ( !isset($tpl) || $tpl== "" ) return "Missing Template file!";
$tpl = $base_path.’assets/templates/’.$tpl;
ob_start();
include($tpl);
return ob_get_clean();
?>
The problem is that after saving the snippet, it removes the ( ?> ) from the php end tag.
I’m using MODX Revolution 2.1.0-pl (traditional), installed in mamp running on osx.
Can anyone help me please?
Thanks in advance