Choosing a templating engine is only one piece of the architectural puzzle of modern MODX development. An equally important strategic decision is determining the workflow: where and how are site elements created and edited?
You can work directly in the admin panel, using built-in tools for creating templates, chunks, and resources, or move development to an IDE, leveraging a file structure, version control, and modern templating engines. Each approach has its strengths and weaknesses, and the choice depends on the scale of the project, the team, and performance requirements.
In this article, we’ll examine each approach in detail, including their advantages, disadvantages, and ideal use cases, to help you build the most efficient workflow.
- 1. The Classic Approach: Developing Through the Admin Panel
- When to choose an admin panel?
- How it works
- Tips
- A Modern Approach: File-Based Development via an IDE
- Features in MODX 3
- How it works
- When to use
- Tips
- Combined approach
- Principles of the Hybrid Approach
- Comparison Table of Approaches
- Conclusion: Which Approach Should You Choose?
1. The Classic Approach: Developing Through the Admin Panel
This is the original and most intuitive way to work with MODX, allowing all actions to create templates, chunks, snippets, and TV parameters to be performed directly in the browser.
Advantages and disadvantages of working through the admin panel
When to choose an admin panel?
- If you’re new to MODX development.
- For content management and minor edits.
- If you don’t have access to a local server or development environment.
- Ideal scenario: creating small business card websites, landing pages, and blogs where one person works on the project and there are no requirements for version control or teamwork.
How it works
- Creating templates. In the “Elements” → “Templates” section, create a template using MODX syntax (
[[+placeholder]]) or Fenom syntax ({if},{foreach}).<html> <head> <title>[[*pagetitle]]</title> </head> <body> <h1>[[*pagetitle]]</h1> [[$content]] </body> </html> - Chunks and Snippets. Create chunks for repeating blocks (e.g., header, footer) and snippets for dynamic logic.
- Resources. Add pages in the “Resources” section, linking them to the template.
- Configuring Extensions. Install pdoTools to use Fenom or other tools through your package manager.
Tips
- Use the Collections add-on to easily manage large resource sets.
- Enable Fenom through pdoTools to extend template functionality.
- Configure access rights to restrict editing of critical elements for content managers.
A Modern Approach: File-Based Development via an IDE
IDEs (Integrated Development Environments) are software environments designed for professional development.
Working with an IDE involves using professional development tools, such as PhpStorm, VS Code, and other programs, to create and manage website code.
With this approach, all or most MODX elements (templates, chunks, snippets) are stored as files in a directory structure, and an IDE is used for work, typically with version control (Git) and modern templating engines (e.g., Fenom).
This approach is implemented using specialized add-ons, such as Gitify or MODX Cloud. They map MODX elements to files (most often in .json or .php format) and vice versa.
Features in MODX 3
- File Elements. MODX 3 supports working with files both out of the box and through add-ons such as PdoTools, ZoomX, or MODX CLI.
- Template Engines. Integration with Fenom or custom solutions (Twig) simplifies development.
- Automation. Support for Composer, npm, and other tools for building frontend and backend.
- Performance. Working with files reduces database load and speeds up development.
Advantages and disadvantages of working through IDE
How it works
- Environment setup:
- Install MODX 3 and required add-ons (pdoTools).
- Set up an IDE (e.g., VS CODE) with MODX plugins (e.g., IntelliSense for MODX).
- Install Composer for dependency management and Git for version control.
- File structure:
Create a folder for the project, for example:/project ├── /app │ ├── /snippets │ ├── /templates │ └── /chunks ├── /core └── /assets-
- Templates: Stored in
/app/templates(e.g.home.tpl). - Chunks: In
/app/chunks(e.g.header.tpl). - Snippets: In
/app/snippets(e.g.getMenu.php).
- Templates: Stored in
-
- Database Sync:
- Use the StaticElements or Gitify addon to sync files with the database.
- Example Command Gitify:
gitify element:extract --type=template
- Frontend:
- Use npm/yarn to build CSS/JS (e.g., Tailwind CSS, Webpack).
- Include built files via chunks or directly in templates.
When to use
- Complex projects. Online stores, portals, sites with APIs or custom logic.
- Team development. When several developers are working on a project.
- Performance. If you need to minimize server load.
- Integration with frameworks. For using Laravel, Symfony, or custom solutions.
- Ideal scenario: large corporate portals, online stores, projects with distributed development teams where version control, reliability, and code review processes are critical.
Tips
- Use pdoTools to work with Fenom and file elements.
- Configure autocompletion in your MODX IDE (for example, the IntelliSense for MODX plugin for VS Code).
- Automate deployment using the MODX CLI or CI/CD scripts.
- Regularly sync files with the database to avoid desyncs.
Combined approach
In practice, a combined (hybrid) approach is often used, which combines the advantages of the admin panel and the IDE. Resources and basic elements (such as page content) are created in the admin panel, while complex templates, snippets, and logic are developed in the IDE using a file-based structure. Synchronization between files and the database is accomplished through add-ons such as Gitify or StaticElements. This approach is ideal for projects that require a balance between easy content management and professional development.
Principles of the Hybrid Approach
- Separation by element type:
- In files (in the IDE): Templates, Chunks, Snippets, Plugins, System Settings. This is code that requires version control and advanced IDE tooling.
- In the admin panel (in the database): Resources (pages), TV parameters, content, menu settings, collections (MIGX, ExtraBuilder). This is data that is frequently changed by content managers and has no meaning in Git.
- Using helper snippets: For working with file chunks and templates from the admin panel, pdoTools is actively used. For example, calling a file chunk via [[$pdoResources? &tpl=’@FILE path/to/chunk.tpl
']].
Advantages and disadvantages of a hybrid approach
Ideal use case: the vast majority of projects—from corporate websites to complex catalogs. This is the most balanced and productive approach available today.
Comparison Table of Approaches
| Characteristic / Criterion | Administration | IDE | Combined Approach |
|---|---|---|---|
| Complexity | Low | High | Medium |
| Startup Speed | High | Low | Medium |
| Version Control | None | Full support (Git) | Partial (for file elements) |
| Performance | Medium / High (depending on the templating engine) | High (single parse) | High (depending on the templating engine) |
| Teamwork | Limited | Supported | Supported (with synchronization) |
| Complexity Settings | Low | High | Medium |
| Ideal Audience | Beginners, Individuals | DevOps Teams, Large Projects | Most Developers and Agencies |
Conclusion: Which Approach Should You Choose?
There is no single right answer. The choice depends on the scale of the project, the composition of the team, and your long-term goals.
- Starting with MODX or building a simple website? Feel free to work through the admin panel. This will help you quickly master the system.
- Developing a complex product with a team of several programmers? A file-based approach with Gitify is a must for you.
- Are you an agency or a freelancer creating standard projects and then handing them over to clients? A hybrid approach is the gold standard. It gives you all the benefits of version control for your code while preserving the convenience of content management for your clients.
Modern MODX development isn’t about being limited to a single tool, but about skillfully combining techniques to achieve maximum efficiency. Start with the classic approach, but be sure to experiment with moving code to files and using Git—this is an investment in the quality and scalability of your future projects.






