Creating a simple component

In addition to the installation XML file, there are quite a few files you need to create to make a simple component. We'll start out by creating all the folders for the backend. In the /administrator/components/com_folio folder, create the following folders:

  • controllers
  • helpers
  • models
  • sql
  • tables
  • views

For now, just put an index.html file in each folder:

<!DOCTYPE html><title></title>

Creating the entry point

Now create a file in /administrator/components/com_folio called folio.php. This is the first file that is executed when Joomla! loads your component, and should have the same name as your component.

<?php defined('_JEXEC') or die; if (!JFactory::getUser()->authorise('core.manage', 'com_folio')) { return JError::raiseWarning(404, ...

Get Learning Joomla! 3 Extension Development - Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.