Directory structure

The directory structure outlined here is loosely based on the recommended project directory structure for Zend Framework 1.x. Each component has it's place in the tree, and each directory exists for a reason.

The default directory structure

Wireframe has to be able to find various files from your /site/templates/ directory, and as such it depends on a known directory structure. This page explains how this structure is set up in the default configuration – you can change each directory to something different if you so choose, but ultimately their purposes will remain the same.

Here's the entire (default) directory structure:

.
├── admin.php
├── controllers
│   └── HomeController.php
├── errors
│   └── 500.html
├── lib
├── layouts
│   └── default.php
├── partials
│   └── menu
│       ├── breadcrumbs.php
│       └── top.php
├── resources
│   ├── css
│   │ └── main.css
│   ├── images
│   └── js
│       └── main.js
├── views
│   ├── basic-page
│   │   └── default.php
│   └── home
│       ├── default.php
│       └── json.php
└── wireframe.php

Creating required directories automagically

Since version 0.3.0 Wireframe has provided an option for creating the required directories (lib, layouts, partials, and views) automatically. This feature can be found from the Wireframe module configuration screen, and only requires checking the checkbox fields next to the directories you want the module to create for you.



Note: this feature requires ProcessWire to have write access to the parent directory of the Wireframe directories, and as such may not be available in all environments.

Back to top