Jul31

CMS Spotlight: PyroCMS

About the project
PyroCMS was started by Phil Sturgeon as an in-house CMS in 2008 and was released to the open source community in 2009. It soon picked up momentum and as I’m writing this it has received contributions from 100 different developers and designers and has been translated into 23 languages.

In 2011 we created 2 slightly different versions: Community and Professional. Community is free and always will be while Professional appeals to those of you who need features such as Multi-Site (create additional websites from the interface) and Rebranding (replace our logo and copyright information in the admin interface with your own). There is currently a team of 5 of us responsible for the project and business management:

  • Phil Sturgeon – Developer
  • Jerel Unruh – Developer
  • Adam Fairholm – Developer
  • Scott Parry – Designer
  • Mike Wilding – Support

Our Philosophy
The philosophy of the PyroCMS project is simple: a CMS doesn’t have to do everything out of the box but everything it does should be intuitive to the user. You can quickly add additional functionality by installing or creating add-ons such as Modules (MVC packages), Widgets, Plugins, or Themes. PyroCMS is built from the ground up as a modular system and consequently extending it comes naturally for developers. Built with the MVC architecture it is used by many developers as a starting platform when creating custom applications.

Themes
Usually themes are the first thing you will encounter when working with a CMS. Creating a theme for PyroCMS couldn’t get much easier. If you know HTML and CSS you are well on your way. A theme folder will typically contain the following items:

  • theme.php – This is a simple file that gives PyroCMS information such as the author’s name
  • screenshot.png – A preview thumbnail to display in the theme switcher interface
  • img – A folder where all theme images are stored
  • js – A folder for all the necessary JavaScript
  • css – The folder for storing cascading stylesheets
  • views/layouts – The folder where you place your default.html template file
  • views/partials – Optionally break the default.html file into smaller chunks (such as header.html)

Not all of these items are required… you could create a theme with only theme.php and views/layouts/default.html!

Once you have the files in place you just inject the CMS output into your html file using the {{ template:body }} tag. Similarly you would use the {{ template:title }} and {{ template:metadata }} to let PyroCMS place the relevant meta data in your theme. That’s it! You now have a working theme!

Modules
The PyroCMS core itself is built from modules: Pages, Blog, Files, etc are each a module. Modules are the only type of add-on that is accessible via the url. For example: site.com/your-module. Since modules are MVC packages you can create applications as simple or as complex as needed. They can collect data from users via forms, display all sorts of things, or even act as an API to communicate with other websites.

Widgets
Widgets are simple chunks of logic that you can embed anywhere. Suppose you wanted to embed a map on your site and have a non-technical user change the address once a week. This would be a good job for a widget. Widgets can be embedded anywhere on the front-end of your website using a tag that looks like this: {{ widgets:instance id=”1″ }} Once that is embedded the client can go to the Widgets interface in the admin panel and select that map widget. A form will open and they can edit the address details.

Plugins
Last but definitely not least let’s talk about Plugins. Plugins are somewhat similar to Widgets except that they have no user interface. Plugins are intended for designers and others who want precise control over how data is output. They are called by embedding their tags in theme files or in Page content. Here is a quick example of using the File plugin to output a list of uploaded files:

{{ files:listing folder=”our-vacation” }}
<img src=”{{ url:site }}files/thumb/{{ id }}” alt=”{{ description }}”/>
{{ /files:listing }}

The example will loop through all files in the “our-vacation” folder and for each one it will output an image tag.

Summary
Hopefully you’ve enjoyed this quick flyover of PyroCMS. We think you will like PyroCMS for the same reasons many others tell us they do:

  • Search engine friendly by default
  • An admin interface that users just “get” without training
  • A full featured free version with a paid version available if needed
  • Developer friendly due to its clear MVC and modular architecture
  • Installable on nearly any server supporting PHP 5.2 or greater and MySQL. (we have a hosted product too if you prefer)
  • Simple and concise tag system for outputting data

Drop by our site at PyroCMS.com for more information. You are also welcome to talk with @pyrocms or myself @jerelunruh anytime.

Jerel Unruh started using PyroCMS v0.9.x in 2010 and soon began contributing to the project. He stuck around for the long haul and now heads up the US office and is credited with writing some very popular features in PyroCMS! When not wielding his web development tools he works with virtualization and server administration and spends his offline time on various automotive and mechanical projects.

This article was brought to you by VPS.net, for dedicated server hosting, cloud servers and 24/7 support visit our site here vps.net

No Comments

over 200,000 servers launched

and counting worldwide...