To develop custom blocks like About, Services, Projects, or Portfolio in SP Page Builder (Joomla), you need to create custom addons. SP Page Builder allows you to build these custom addons that appear in the editor just like built-in ones. write the code ;
SP Page Builder is a powerful drag-and-drop page builder for Joomla that allows you to create custom blocks (addons) to extend its functionality. I'll guide you through creating custom addons for About, Services, Projects, and Portfolio sections.
Each addon requires:
Let's create these custom addons step by step.
First, create the following directory structure in your Joomla installation:
plugins/
└── sppagebuilder/
└── your_extension/
├── addons/
│ ├── about/
│ │ ├── admin.php
│ │ ├── site.php
│ │ └── assets/
│ ├── services/
│ │ ├── admin.php
│ │ ├── site.php
│ │ └── assets/
│ ├── projects/
│ │ ├── admin.php
│ │ ├── site.php
│ │ └── assets/
│ └── portfolio/
│ ├── admin.php
│ ├── site.php
│ └── assets/
├── your_extension.php
├── your_extension.xml
└── language/
└── en-GB/
└── en-GB.plg_sppagebuilder_your_extension.ini
Create the XML manifest file for your plugin:
your_extension.xml
Create the main PHP file for your plugin:
your_extension.php
Create the language file for your plugin:
language/en-GB/en-GB.plg_sppagebuilder_your_extension.ini
Now, let's create the About addon files:
addons/about/admin.php
addons/about/site.php
Now, let's create the Services addon files:
addons/services/admin.php
addons/services/site.php
Now, let's create the Projects addon files:
addons/projects/admin.php
addons/projects/site.php
Finally, let's create the Portfolio addon files:
addons/portfolio/admin.php
addons/portfolio/site.php
You've now created four custom addons for SP Page Builder:
These addons will appear in the SP Page Builder editor just like built-in ones, allowing you to easily create custom blocks for your Joomla website.
You can further customize these addons by:
Remember to follow SP Page Builder's documentation for any updates or changes to the addon structure in newer versions.
Enhance the addons with additional configuration options
Let's enhance our custom addons with more configuration options to make them more flexible and powerful. I'll add new options to each addon to give you more control over their appearance and functionality.
Let's add more configuration options to the About addon:
addons/about/admin.php
addons/about/site.php
Let's add more configuration options to the Services addon:
addons/services/admin.php
addons/services/site.php
Let's add more configuration options to the Projects addon:
addons/projects/admin.php
addons/projects/site.php