Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Fire up your webapp with PyroCMS

DZone's Guide to

Fire up your webapp with PyroCMS

· Web Dev Zone
Free Resource

Learn how to build modern digital experience apps with Crafter CMS. Download this eBook now. Brought to you in partnership with Crafter Software

Lightweight MVC Frameworks like Codeigniter, CakePHP, and Symfony help speed up the process of building your web applications.  However, many times you want to get up and running with your websites even faster than these core frameworks can afford.  Often times, we find that content management systems can offer developers a simple and robust system for creating pages, themes, and layouts for your web applications.  It's not going to write the intricate logic of your web app for you, but using an extended CMS can send developers off in the right direction.  Let's talk about an extended CMS that I recently ran into that certainly seems to fit the bill, PyroCMS.

What is PyroCMS?

PyroCMS is a lightweight, themable, and dynamic modular content management system built as an extension to the CodeIgniter framework.  PyroCMS offers extended security features, customizable themes, web integrations for sites like Twitter, and a simple administration interface for managing your web application's content.

Requirements

To get started with PyroCMS, it's important to have the following software/services installed and ready to go:

  • An HTTP Server (i.e. Apache 2.x)
  • MySQL 5.x or higher
  • PHP 5.2.x or higher
  • PHP GD 2
  • cURL
PyroCMS comes packaged with CodeIgniter, jQuery, and the DWoo Template Engine, so there is no need to worry about downloading and installing those.

Installation

The installation of PyroCMS is fairly straightfoward:

1 - First, download PyroCMS and extract the files to your web-server.

2 - Apply the following file permissions to your files:

cd /home/pyrocms/public_html/
chmod 777 codeigniter/cache
chmod 777 codeigniter/logs
chmod -R 777 application/cache
chmod 666 application/config/config.php
chmod 666 application/config/database.php
chmod -R 777 application/uploads
chmod -R 777 application/assets/img/photos

3 - Run the installer, this can be done by navigating to the /installer page. This will ask you to set up the database and create your config files.

4- Lastly, get rid of the installer directory.

5 - Your installation is complete at this point.  Hit your web root, login as "demo@example.com" with the password "password" and make an admin user account.

6- Login with this new account, and then delete demo@example.com from the accounts database.

 

Creating a Module

For development, there are two kinds of modules that can be created: core modules, and third_party.  For each module directory, they can contain these directories: config, controllers, helpers, libraries, models, views, js, css, img. 

Every module contains an XML file called details.xml.  It is used to contain the metadata about the module, and whether it belongs to the frontend or the backend of the application.

With PyroCMS you have a total of four controller types: Controller, MY_Controller, Admin_Controller, and Public_Controller.  Each of these controllers can be used depending on whether or not the page is public, or requires a user to be logged in.  You can of course bypass the use of these controllers and use the normal CodeIgniter controller class, or find use for these extended controller types for added flexibility.

Creating a Theme

PyroCMS uses themes so that you can easily change the look and feel of your website. Strikingly similar to the RubyOnRails framework, PyroCMS has a master layout file and multiple partials that share its presentation logic between different views. Most of the information on creating views can be located in the Designer's Guide documentation. Themes in PyroCMS use the Template library, which aids in building complex views with the CodeIgniter framework.

Take a look at PyroCMS and determine if its extensions and added functions can help you to 'fire up' your web development.

Crafter is a modern CMS platform for building modern websites and content-rich digital experiences. Download this eBook now. Brought to you in partnership with Crafter Software.

Topics:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}