Before we even start building our theme or the custom functionality it contains, let’s create that package I mentioned earlier.

The Concrete CMS package format is a way to bundle most aspects of Concrete functionality together, so that they can be easily distributed, installed and uninstalled. The package format is used by the Concrete marketplace, but can also be used without connecting to

This isn’t strictly necessary -- Conrete lets you group custom functionality in the application/ directory without forking the core -- but it’s a process we like to follow. It forces us to keep code clean up and well separated, and the built-in version number and upgrading of packages makes it so that we can add functionality over time more easily than we might if things were just in the application/ directory.

Packages consist of an outer directory, an optional icon image (icon.png), a controller.php file immediately within the directory, and then a files and folders that map to Concrete components. The controller.php specifies the version of the package, defines an installation and uninstallation routine, and specifies any custom code that should be added to the Concrete startup routine when that package is installed. In general, the filesystem of a particular package's contents will match the filesystem of those contents in the concrete/ directory, if they were to be installed by the core.