Blog Sections Open
Using GetFile and IncludeFile for Faster Evo Template Development
A file-based development pattern for faster local work on templates and snippets in MODX Evolution.
Before file-based development became a more formal direction around Evolution CMS, many developers were already trying to avoid endless copy-paste between local editors and the manager. This older pattern shows one of the simplest ways to do that during local development.
The idea is to keep HTML or PHP in files on disk and let small helper snippets include them while you work. That gives you syntax highlighting, faster iteration, and fewer repetitive manager edits.
Two helper snippets
// GetFile
$filename = isset($filename) ? $filename : 'assets/index.html';
return implode('', file($filename));// IncludeFile
$filename = isset($filename) ? $filename : 'assets/index.html';
include $filename;Typical usage looked like this:
[!GetFile? &filename=`assets/templates/tmpl_your/index.html`!]
[!IncludeFile? &filename=`assets/snippets/test/test.php`!]Why it mattered
This was never meant as a production architecture. It was a development convenience. But historically it matters because it shows how Evo users were already moving toward editor-on-disk workflows long before that became a cleaner official direction.
Keeping Ditto Pagination Placeholders Working When PHx Is Involved
A parser-order workaround for keeping Ditto pagination visible on PHx-driven pages.
Getting Started with MODX Evolution for Real-World Business Sites
A historical beginner guide that framed where MODX Evolution fit best and how to start from plain HTML templates.