-
|
In earlier discussion it was suggested that we try to remove all custom codes inserted via the JCB Custom Codes area - so that it's easier to migrate to JCB-J4. However, I've not found a way to make changes to the toolbar of a form - to speifically hide the 'save2copy' option (which we need to not be available on several forms). The only way I've been able to get rid of those is to add a custom code snippet where I comment-out the 'JToolBarHelper::custom(..." line Is there another way to remove the save2copy button from a toolbar within JCB? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
|
Good evening, I have the same target to remove specific toolbar buttons. As I also didn't found another way to edit the "HtmlView.php" file I tried Custom Codes.
The 1) didn't worked because I assumed the blocs were to close to each other creating overlapping code Are there any changes since custom codes in JCB 3 (and the video tutorial) ? Cheers |
Beta Was this translation helpful? Give feedback.
-
|
Hi Where to Manage the ToolbarIn your Admin View, you'll find a dedicated Toolbar tab. This is the central place where all toolbar behavior is configured.
Each of these areas allows you to insert custom PHP code that will fully replace the default toolbar logic. Important: Full Override BehaviorWhen you add code to override the toolbar, the entire default toolbar is replaced.
So, that in turn give you the power to explicitly add back only the buttons you need to your custom toolbar code. Re-using Custom Buttons via PlaceholdersIf you've already defined custom buttons in JCB, you don't need to recreate them manually when overriding the toolbar. You can re-insert them using the following placeholders:
What each Placeholder Does:
By placing these placeholders inside your toolbar override code, JCB will automatically inject the relevant buttons back into your custom toolbar. This is especially useful for navigation buttons (e.g. jumping to another view) or batch-style actions. About Custom Code ReplacementRegarding your issue with custom code replacement:
Taking the time to fully understand this mechanism will help avoid subtle issues and make your implementation much smoother. Hopefully this clarifies how toolbar overrides and custom buttons work in JCB. |
Beta Was this translation helpful? Give feedback.
-
|
Hi @dormasta, I would recommend upgrading to this beta version if you'd like access to the latest features and fixes.
We are actively working toward the next stable release, and additional beta testing from the Joomla community would be incredibly valuable in helping us deliver an even more robust and polished release. I have also attached a screenshot of this feature. And yes it is availabe for J5 and J6 but not J4. Thanks again for your interest and feedback - it's greatly appreciated. |
Beta Was this translation helpful? Give feedback.

Hi
Overriding the default Joomla toolbar in Joomla Component Builder (JCB) has become quite straightforward.
Where to Manage the Toolbar
In your Admin View, you'll find a dedicated Toolbar tab. This is the central place where all toolbar behavior is configured.
At the top of this tab, you can add custom buttons that extend the default toolbar.
At the bottom, you'll find options to override the entire default toolbar, separately for:
Each of these areas allows you to insert custom PHP code that will fully replace the default toolbar logic.
Important: Full Override Behavior
When you add code to override the toolbar, the entire default toolbar is replaced.
…