[ENHANCEMENT]: Allow Users to Build Custom Toolbars in JCB Custom Buttons Area #1268

Closed
opened 2025-11-02 12:37:28 +00:00 by Lemuel · 1 comment
Owner

Enhancement Details

This enhancement proposes adding support in Joomla Component Builder (JCB) for custom toolbar overrides in Joomla 5 and later. It will allow users to create their own fully customized toolbars for both List Views and Edit Views in the Admin View and Site Admin View area of their components.

Current Limitation

Currently, JCB automatically generates toolbar code for list and edit views based on internal configurations. While effective for standard workflows, it limits developers who need:

  • Complete control over toolbar logic and layout.
  • The ability to inject custom PHP code directly into the view's toolbar.
  • The freedom to design unique toolbars that better fit complex administrative workflows.

At present, users cannot modify the generated addToolbar() method directly, as it is managed internally by JCB's compiler.

Proposed Enhancement

Introduce a new option in the Custom Buttons area of JCB called PHP (addToolbar - Edit View) and PHP (addToolbar - List View), which allows users to replace JCB's default toolbar generation logic.

When enabled:

  1. JCB will bypass the default toolbar creation process for the selected view.
  2. It will inject the user's custom PHP code into the addToolbar(): function of the generated view class.
  3. Users can define all toolbar behavior, buttons, permissions, and layout through their own code.

This gives developers full flexibility to design and control toolbars directly from within JCB, eliminating the need for post-compilation modifications.

Implementation Details

  • Add a toggle or dropdown labeled “Custom Toolbar Override” in the Custom Buttons configuration area.
  • When enabled, display a code editor field that allows users to write their custom PHP logic for the addToolbar() method.
  • During compilation, JCB will detect this override and insert the user's code in place of the standard toolbar logic.

Expected Benefits

  • Provides complete developer control over toolbar functionality and design.
  • Enables custom toolbar logic directly within JCB without manual code edits.
  • Simplifies complex administrative workflows by allowing fully bespoke toolbar structures.
  • Supports modern Joomla 5+ conventions, aligning with current and future framework design.

Which part of the extension will be affected by this enhancement?

Admin Views(admin_views)

Additional Context

No response

### Enhancement Details This enhancement proposes adding support in Joomla Component Builder (JCB) for **custom toolbar overrides** in **Joomla 5 and later**. It will allow users to create their own fully customized toolbars for both **List Views** and **Edit Views** in the **Admin View** and **Site Admin View** area of their components. #### **Current Limitation** Currently, JCB automatically generates toolbar code for list and edit views based on internal configurations. While effective for standard workflows, it limits developers who need: * Complete control over toolbar logic and layout. * The ability to inject custom PHP code directly into the view's toolbar. * The freedom to design unique toolbars that better fit complex administrative workflows. At present, users cannot modify the generated `addToolbar()` method directly, as it is managed internally by JCB's compiler. #### **Proposed Enhancement** Introduce a new option in the **Custom Buttons** area of JCB called **PHP (addToolbar - Edit View)** and **PHP (addToolbar - List View)**, which allows users to replace JCB's default toolbar generation logic. When enabled: 1. JCB will **bypass the default toolbar creation process** for the selected view. 2. It will **inject the user's custom PHP code** into the `addToolbar():` function of the generated view class. 3. Users can define all toolbar behavior, buttons, permissions, and layout through their own code. This gives developers full flexibility to design and control toolbars directly from within JCB, eliminating the need for post-compilation modifications. #### **Implementation Details** * Add a **toggle or dropdown** labeled **“Custom Toolbar Override”** in the **Custom Buttons** configuration area. * When enabled, display a **code editor field** that allows users to write their custom PHP logic for the `addToolbar()` method. * During compilation, JCB will detect this override and insert the user's code in place of the standard toolbar logic. #### **Expected Benefits** * Provides **complete developer control** over toolbar functionality and design. * Enables **custom toolbar logic** directly within JCB without manual code edits. * Simplifies **complex administrative workflows** by allowing fully bespoke toolbar structures. * Supports **modern Joomla 5+ conventions**, aligning with current and future framework design. ### Which part of the extension will be affected by this enhancement? Admin Views(admin_views) ### Additional Context _No response_
Lemuel added the enhancement label 2025-11-02 12:37:28 +00:00
Robot referenced this issue from a commit 2025-11-05 07:09:36 +00:00
Author
Owner

We've implemented this enhancement in the latest JCB release.

The Custom Buttons tab in the Site View, Admin View, and Custom Admin View have been renamed to Toolbar for better clarity and consistency.

Additionally, we introduced new options that allow overriding the default Joomla toolbar in both the List View and Single View.
These overrides do not affect any custom buttons you've defined - they will continue to function as expected - but they will replace the default toolbar behavior where desired.

This update provides more flexibility for developers who want full control over the toolbar configuration in their views.

We've implemented this enhancement in the [latest JCB release](https://git.vdm.dev/joomla/Component-Builder/tags). The **Custom Buttons** tab in the Site View, Admin View, and Custom Admin View have been renamed to **Toolbar** for better clarity and consistency. Additionally, we introduced new options that allow overriding the **default Joomla toolbar** in both the **List View** and **Single View**. These overrides do not affect any custom buttons you've defined - they will continue to function as expected - but they will replace the default toolbar behavior where desired. This update provides more flexibility for developers who want full control over the toolbar configuration in their views.
Robot referenced this issue from a commit 2026-02-18 14:57:04 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: joomla/Component-Builder#1268