Bloxby Support Portal
  • Home
  • Knowledge Base
  • Forums
  • Register
  • Live Chat

Knowledge Base

  1. Home
  2. Knowledge Base
  3. Developer Manual
  4. Extending Bloxby
  5. Extending the front-end

Extending the front-end

  • Created July 20, 2018
  • Author Andrew Ozols
  • Category Extending Bloxby
  • Comments 1

You might find yourself in a situation where you need to add custom Javascript to the Bloxby page builder or one or more of the other pages within the application.

As of version 1.1.0, this process has been simplified by the introduction of customization modules. In the /assets/js folder, you’ll find a folder named “custom”. Within this folder, you’ll find a Javascript file for each section of the Bloxby application. To include your custom code, simply edit the correct file, add your code and run Webpack. By default, the file contents will look something like this:

/*
	Use this module to load custom JS in the block_editor page
*/

(function () {
    "use strict";

}());

You would add your custom Javascript code inside the function statement, something like this:

/*
	Use this module to load custom JS in the block_editor page
*/

(function () {
    "use strict";

    console.log('Hello world!');

}());

This would result in the console output “Hello world!” being shown in the block editor page.

Please note that after making changes to the Javascript files, you will need to run Webpack for the changes to be included in your application’s front-end bundles.

The custom module files

Below we’ll go through the available files and specify to which section of Bloxby they belong:

  • block_editor.js – this file belongs to the block source code editor
  • builder.js – this file belongs to the Bloxby page builder
  • elements_blocks.js – this file belongs to the Blocks panel
  • elements_browser.js – this file belongs to the Elements File Browser
  • elements_components.js – this file belongs to the Components panel
  • images.js – this file belongs to the Images panel
  • inblock.js – this file gets loaded inside each block iframe on the canvas
  • login.js – this file belongs to the login page
  • packages.js – this file belongs to the Packages panel
  • register.js – this file belongs to the Registration page
  • sent.js – this file belongs to the confirmation page shown after a form has been submitted
  • settings.js – this file belongs to the Settings panel
  • sites.js – this file belongs to the Sites panel
  • templates.js – this file belongs to the Templates section
  • users.js – this file belongs to the Users panel

Was this article helpful?

Yes No

Related Articles

  • Extending controllers with hooks
    • 0
    • 2568
  • Extending views
    • 1
    • 2350
  • Extending Bloxby
    • 0
    • 2633

1 Comment

  1. Avatar [email protected]
    7 years ago

    I changed the builder.js file but i don’t see the changes affected in the front-end. What are the steps to run webpack (Both in live and local)?

    Log in to Reply

Leave A Comment? Cancel Reply

You must be logged in to post a comment.

Knowledge Base Categories

  • User Manual
  • General
    • Frequently Asked Questions
  • Developer Manual
    • Updates
    • Integration
    • Extending Bloxby
  • Admin Manual
    • Managing Blocks & Components

Popular Articles

  • Server Requirements
  • Installation Guide
  • Terms and Definitions
  • How to modify or develop Bloxby
  • How to configure Bloxby page builder

Knowledge Base Authors

  • Andrew Ozols
    Andrew Ozols
    Articles Authored: 138
  • Herbert
    Herbert
    Articles Authored: 4

Knowledge Base Authors

  • Andrew Ozols
    Andrew Ozols
    Articles Authored: 138
  • Herbert
    Herbert
    Articles Authored: 4

Forum Statistics

Forums
11
Topics
1,086
Replies
6,211
Topic Tags
250
© Bloxby 2019, All rights reserved