February 01, 2011

Getting started with custom module development for PyroCMS

To help make the development of PyroCMS modules easier I decided to put together a simple module that could be used for a template.


While you will not use all of these folders in the average module the following is the supported folder structure for a module.

folder-structure.jpg

And at the bare minimum you will have the details.php file and the controllers and views folders.

Download the code (links below), rename the zip and the folder within it to “sample”, and upload it to your installation of PyroCMS to see how it functions. It is hosted at http://github.com/pyrocms/sample if you happen to be a git user. I intend for the code to be a template to get you started so do what you want with it. Just don’t redistribute it as a tutorial under your name.

Leave your thoughts in the comments below and if you have questions once your development is under way refer to PyroCMS’ documentation and forums.

Update: As of June 21, 2011 This module has been mostly rewritten (I wrote the first version in a big hurry and never finished it to my liking). Create, Edit, and Delete all function properly and the front-end uses Tags only - no php.

Update: As this post is nearing 2 years old I removed the old download link and replaced it with the links below. Download the appropriate version for your installation.