How to build a Custom Joomla Extension in 5 minutes

Create and Download a custom Joomla extension installer using our simple Joomla extension builder tool

We take you through a quick introduction to the new Extension Builder tool which can help you build a custom Joomla extension for your website.

 

Starting the Process

On the Extension Builder page, click the New button to start creating a new extension:

How to build a Custom Joomla Extension in 5 minutes image 1

 

Choose the Title & Description

On the New page, enter the Extension Title which will be used in Joomla along with the Extension description you need

How to build a Custom Joomla Extension in 5 minutes image 2

The Extension Name can be left empty, this is auto generated and is used internally in the Joomla system

We now want to include data from specific Joomla database tables in one or many of the new extension pages, each table should be defined as a 

 

Define the Database Tables

For simplicity we will use the default Joomla assets table, but you can use any table, including any custom database table you have in your Joomla database

How to build a Custom Joomla Extension in 5 minutes image 3

Click the Add Data Model button to add a new model, then enter the Database table name, Model Title and Primary key

Please note that the Extension Builder will include a SQL script to create all defined tables at installation time, the SQL code will be "CREATE TABLE IF NOT EXISTS", so it's not a problem if your table already exists, but any table to be used in the extension pages should be fined here.

Similarly, any table columns which will be used should also be defined here, in the #__assets table we are going to list data from 2 columns: name & title, so we are going to add them here:

How to build a Custom Joomla Extension in 5 minutes image 4

Use the Add Column button to add 2 columns then set the columns names

 

Create the Extension Home Page

We should now create a page to list entries in the Assets table, let's do this by adding a new Listing page

How to build a Custom Joomla Extension in 5 minutes image 5

Click the Add Listing Page button then expand the new page container

Let's customize our new page

How to build a Custom Joomla Extension in 5 minutes image 6

We changed the Page Title to My Assets, this will appear at the top of the page when viewed.

,We set the Page Name to "index", this is important because an extension should have at least 1 page named "index" which is the extension's home page.

Pages are identified by their names when we need to create links or redirects later.

We set the Database Table which will be used to list data to the #_assets table we defined in the model earlier, that should work fine now, but if the table was not in any model then this will cause errors.

We also set the Default Order of the list to be sorted by "name asc" which is an ascending order of the "name" column.

Finally we choose to include a Selector column and assign the value of the "id" column to it, this is optional and only useful if we need to do row operations in our list.

Now we need to define the table columns

How to build a Custom Joomla Extension in 5 minutes image 7

Under List Columns click the Add Column button twice to add 2 columns

We can now add the name & title columns we decided to use earlier as defined in our model

The Column Title is the header text of the column, while the Data Path is the column name

 

Save & Download

For now this is enough to have a functional extension, let's save our progress by clicking Apply at the top of the page

How to build a Custom Joomla Extension in 5 minutes image 8

The extension name has been generated successfully.

Close the editor and go to the Extensions list to download the extension installer.

How to build a Custom Joomla Extension in 5 minutes image 9

Our extension is now ready for download, click the Download link to get the installer file which can be installed using the Joomla Extensions Manager page.

 

Install the new Extension

Head to your Joomla admin area > System > Extensions:

How to build a Custom Joomla Extension in 5 minutes image 10

Choose Upload Package File then choose the file you have downloaded

How to build a Custom Joomla Extension in 5 minutes image 11

Once you upload the file you get the installation confirmation and you are redirected to the new extension's "index" page which is the Listing page we have created earlier

How to build a Custom Joomla Extension in 5 minutes image 12

Category: Extension Builder

Comments:

You need to login to be able to post a comment.