Hi,
I just started a new project on revolution and I could not find a solution to keep the templates in files.
So, I made my own based on the includeTemplate for Evo. Is there a better way to do this in Revolution?
Here’s the code:
<?php
/*
Snippet to include template files from file system. Put your templates in assets/templates
USAGE: [[incTpl? &path=`home.html`]]
*/
if ( !isset($path) || $path== "" )
return "Missing Template file!";
$path = MODX_BASE_PATH . 'assets/templates/' . $path;
ob_start();
include($path);
return ob_get_clean();
?>