ProcessWire doesn't produce markup on it's own, nor does it provide a sophisticated template hierarchy out of the box. This is not a flaw, but rather a clever design decision: since ProcessWire is extremely unopinionated, it's well suited for numerous use cases.
By default full page content is rendered by a template file depending on the template used by the page you're viewing (
/site/templates/[template].php). This approach is what we call "direct output", and it's arguably the easiest way to develop simple sites with ProcessWire. It's also not very scalable.
Output strategies to the rescue!
Now, if you've been developing sites – or anything, really – before, you're no doubt aware that mixing code with markup and business logic with presentation logic is a bad idea, and can eventually lead into an unmanageable mess.
Most output strategies provide some means to structure the template files in a way that keeps concerns separate and minimizes code repetition. Some of the most popular output strategies for ProcessWire include ...
- direct output, which is the default, out-of-the-box approach. This is very simple and provides an easy way to grasp the basics of ProcessWire, but doesn't scale very well.
- direct output with includes is essentially the same thing, except with parts of code and markup split into reusable include files. Still simple, but much more scalable.
- delayed output involves defining content as variables in the template file, and then including a (shared between templates) output file, usually called main.inc. Even more scalable, but still pretty simple.
- markup regions is a built-in solution included with more recent ProcessWire versions. This approach combines direct and delayed output, allowing you to populate markup into existing HTML using ID values and/or data-attributes.
Many third party projects also introduce their own approaches to the mix. Among these options, Wireframe is – in our opinion – on the developer oriented end of the spectrum. You can read more about these from our Wireframe alternatives page.
Wireframe is great for scalability, serious developers, and teams
Based on an earlier project called pw-mvc, Wireframe is designed to resolve issues such as code repetition and separation of concerns. Built on the foundation of its battle-tested predecessors, Wireframe is a modern, object-oriented, and MVC inspired solution for building robust and scalable ProcessWire sites.
While it's not a "pure" MVC implementation by any means, Wireframe contains concepts that are most commonly utilized in the context of software development, and as such it's quite well suited for complex projects. On the other hand it puts a lot of weight on ease of use and simplicity, which makes it a great candidate for even the smallest sites.
Finally, Wireframe is rather opinionated, which means that things tend to work the same from project to project – a particularly valuable feature if you're working in a team. While there are a number of configurable features included, everything works just fine right out of the box, and the recommended approach is to leave these as-is.