Skip to content

Instantly share code, notes, and snippets.

@kp52
kp52 / makeInstall.module.php
Last active December 14, 2015 23:09
Action file for MODX Evo/Clipper module that generates installer-style TPL files for snippets, chunks and other elements. The module itself (copy makeInstall.module.php into a new Module in the Manager) must set $exportDir and include makeInstall.php Generally works well, but needs something to allow for empty comment fields; for Evo, add an @in…
//<?php
// MakeInstall module
if (!isset($exportDir)) {
echo "Set export destination in the module configuration: &exportDir=Export to;string;";
echo $modx->config['base_path'] . "assets/site/";
return false;
}
include_once $modx->config['base_path'] . 'assets/modules/makeinstall/makeInstall.php';