The $page variable contains all the fields specific to the page being viewed. This includes built-in fields, which are common to all pages, as well as the fields that are specific to this one page alone. But how can you access the fields of a page? Let’s dive right in by looking at some simple examples. Output the content of the text field named title: Display the name of the page’s template: Generate a breadcrumb navigation: Since version 2.5.27 you can also write the above as following: Output an image only if it has actually been uploaded: Note: You have to set your image field to contain just one image for this to work. In the following are a few examples for when an image field is set to contain multiple images. Grab and output the first image: Grab and output a random image: Cycle through all the images, create a large image at 500 pixel width with proportional height, and a thumbnail at 100×100 with specific quality and cropping settings, and then have the thumbnail link to the large variant: Note: ProcessWire will create your images at any size on the fly and then keep a cache of them. ### The$pages Variable

The \$pages variable is a reference of all pages in your site. This lets you access all of your site’s content and pages from anywhere you want.

For the next examples I’ll refer to ProcessWire’s standard demo site which provides a collection of skyscrapers in the United States.

Get a specific page and output its title:

Note: /cities/chicago/sears-tower/ is the complete path pointing to the Sears Tower page in the hierarchy of ProcessWire’s page tree.

Find all skyscrapers with a height greater than 500 ft, and less than or equal to 1,000 ft:

Note: height is a field contained inside the template skyscraper.

Find all skyscrapers built before 1950 with 10+ floors, sorted by year descending, then floors descending:

Note: year and floors are fields contained inside the template skyscraper.

Find all skyscrapers in Chicago with 60+ floors, sorted by floors ascending:

Find all skyscrapers by architects David Childs or Renzo Piano, and sort by height descending:

Note: architects is a field contained inside the template skyscraper.

## 3. It’s Built Around a Modular and Easily Extendable Architecture

ProcessWire itself consists of a small core framework (consider this the essence of ProcessWire which enables the basic functionalities) and a set of pre-packaged modules, which come with every installation. Some of these core modules are installed, and others are uninstalled, by default. Think of ProcessWire modules as WordPress plugins: They extend and customize the system.

The modular nature of ProcessWire has a few nice advantages:

• The code base is more maintainable because core functionalities are isolated and decoupled from other parts of the system, which also greatly increases the overall security.
• The development of new features is being simplified, and bugs can be targeted and fixed much more easily and quickly.
• Upgrades to newer versions of ProcessWire or single modules are usually a no-brainer, and you don’t have to worry that after an upgrade everything is broken.

### Installing Modules

Installing a module is as easy as dragging the module’s files to the /site/modules/ directory and then clicking Install in the admin GUI. But there are actually many more ways to install a module from the modules directory

For example, you can install the Modules Manager, which enables you to browse, download, install and update modules right in the admin GUI.

### Amount of Modules: Quality Over Quantity

At the time of writing, around 370 modules exist for ProcessWire. You may now compare that number to the approximately 40,500 WordPress plugins that are out there, and that comparison is indeed interesting and revealing at the same time. Following this, one can draw a few conclusions thinking about the general nature of ProcessWire and its modules, and how they compare to plugins of other CMSs:

• ProcessWire is not nearly as popular and widespread as WordPress, Joomla, Drupal, and others.
• ProcessWire modules are usually of a pretty high code quality. They do one thing and do that thing well.
• The ProcessWire core by itself is so powerful and flexible that it’s simply not necessary to add a ton of additional modules to extend it. For example, you don’t need modules for creating gallery slideshows, modules for getting the first child of something, modules for generating thumbnails, etc. All that (and much more) is already covered with the basic functionalities of ProcessWire.

### Hooks

While hooks are a rather advanced topic, it is noteworthy and shows that the functionality of ProcessWire is meant to be super-easy to alter and extend. ProcessWire contains hundreds of methods that you may hook into, in order to modify the behavior of a method.

Let’s say we have built a simple contact form using the API or the Form Builder, and some of the fields are marked as required by the back-end. What we want to achieve is to also add the appropriate HTML5 front-end markup for required form fields. ProcessWire makes this pretty easy. We simply hook into the render method of input fields and define what we want to customize: Ask if the field is required, add the desired front-end attribute, and put an asterisk at the end of the input label.

## 4. It Doesn’t Get in Your Way and It Provides Tools to Create Tailored, User-Friendly Interfaces

One of the main things people like about ProcessWire: It doesn’t get in your way. It behaves in the way you want it to and adjusts to your style of developing a website.

For example, you have complete control over the output of markup and you are not forced into a specific way of developing a template on the file system. If you are familiar with the WordPress style of developing things, you can continue just as you are used to. Or if you want to create a more sophisticated architecture you could use a MVC-inspired approach, and it will work just as well.

As I mentioned earlier, pages don’t have a set of mandatory fields in order for ProcessWire to understand the structure of a page. (At least not visible ones. There are a few built-in fields like references to the page’s parent or the number of the page’s children, etc.) You can put 100 fields on a page if you want to, order them in any way you want, specify which are required and which aren’t, and you can put them in different field sets or tabs for a better UI experience.

The other main thing people like about ProcessWire: It naturally provides tools to create tailored, user-friendly interfaces. I gave you a glimpse of that in the previous paragraph. The level of customization for templates is mind-blowing. Once you’ve experienced this yourself, you’ll understand why ProcessWire is more a CMF than a CMS.

For example: Every field has a template-specific context attached to it. That means that you can specify that one and the same field has a certain label, description and behavior in one template, and a completely different label, description and behavior in another template.

Another example are inputfield dependencies: They enable you to specify the conditions under which a particular field in the page editor is shown or required.

And yet another example is the module PageTableExtended: it lets a user view, edit and modify the different parts of your website page (which you as a developer define) in a visual and intuitive way.

That to me is the definition of elegant and deeply empowering.

## Conclusion

This article can only scratch the surface of what you can do with ProcessWire and what it has to offer. The list of great features is, simply put, too long and would go beyond the scope of this article. Let me give you a glimpse of some of these:

• ProcessWire has great caching mechanisms (e.g. template and markup cache or ProCache) and performs very well. Scalability is also pretty impressive. You can literally have millions of pages on a single installation.
• ProcessWire has a small but fantastic community. The discussion board is the central place to discuss any questions and problems.
• ProcessWire has stellar multi-language support. The multi-language modules are part of the pre-packaged core modules. It’s very easy to set up and maintain.
• ProcessWire has great built-in user management capabilities with settings that are very detailed and easy manageable at the same time. For example, you can create a role for users which have the sole permission to edit fields in French, and in no other language.
• There are a bunch of admin themes you can choose from to change the appearance of the admin GUI.
• Security is a top priority for ProcessWire.
• ProcessWire has a transparent roadmap and the development is very active. There are new minor releases nearly every week.

The more you use ProcessWire and the more you internalize the core concepts, the API and its modular architecture, the more you will have fun using it. You will realize how incredibly powerful ProcessWire’s tools and workflows really are. One could say that the only thing limiting you in achieving a certain goal with ProcessWire is your own imagination.

Let me finish by quoting the creator of ProcessWire, Ryan Cramer:

ProcessWire is a system that rewards you by being curious. We aim to show you how to fish so that you can catch the big fish.

## Where to Go From Here

Useful links and tools around ProcessWire: