/ Published in: PHP

Code to include template files in MODx. This way files can be edited in Dreamweaver or other editor without cutting and pasting into the Manager all the time.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php # Snippet to include template files from file system # USAGE: [[includeTemplate? &tpl=`mytemplate/template.html`]] $tpl = $base_path .'assets/templates/'.$tpl; include($tpl); ?>
Comments
