Are MODX snippets & chunks stored in the database or as files in the file structure?
They're stored in the DB, in the modx_site_snippets and modx_site_htmlsnippets tables, but the upcoming version 2.2 will allow you to store them in files as an option.
-
☆ A M B ☆
- 24,524 Posts
In either version, you can have the bulk of the code in files anywhere you like, and use a snippet with a simple include ... statement to load the file. Most complex snippets, like Wayfinder, only have initialization and configuration code in the snippet itself, while the bulk of the work is done from included files.