๐งฉ Architecture & Core Logic
- Super Powers
- Joomla Powers
- Compile Native Components, Plugins & Modules
- Multi-Version Support
- Conditional Logic Injection
- Reusable Admin Views
- Dynamic GET Builder
- Round-Trip Code Integration
- Custom Admin Views
- Site Views
- Dynamic Dashboards
- Model Linking Between Views
- Shared Field Reuse Across Views
- Drag & Drop Field Mapping
- Dynamic Field Visibility
- Independent Packaging
๐ Joomla CMS Integration
๐งฑ Custom Code System (Powerful Dual Feature)
๐ Field Type System
๐ Snippets, Templates, Layouts, Libraries
- Snippets Reusable Html Blocks
- Layouts Reusable Php Render Templates
- Templates Page Level Views Linked To Custom Admin Site Views
- Libraries JS CSS Assets Linked To UI
- CDN Local Toggle For Library Delivery
- Media Folder Injection With Override Support
- Repository Push Pull Reset Workflow
- Init Snippets Layouts Templates Via Gui
๐ฆ Packages
๐งฉ Architecture & Core Logic
๐ File & Code Management
๐ง Code Reuse & Blueprints
๐ Joomla CMS Integration
๐จ Visual GUI & UX
๐ Internationalization
๐ฆ Packaging & Distribution
โ๏ธ Compiler Engine Features
๐งฑ Custom Code System
๐ Field Type System
๐ Dynamic GET (Visual SQL Engine)
๐ Snippets, Templates, Layouts, Libraries
๐ Documentation & Metadata
๐ Analytics & Insights
๐งฉ Architecture & Core Logic
- Super Powers
- Joomla Powers
- Compile Native Components, Plugins & Modules
- Multi-Version Support
- Conditional Logic Injection
- Reusable Admin Views
- Dynamic GET Builder
- Round-Trip Code Integration
- Custom Admin Views
- Site Views
- Dynamic Dashboards
- Model Linking Between Views
- Shared Field Reuse Across Views
- Drag & Drop Field Mapping
- Dynamic Field Visibility
- Independent Packaging
๐ Joomla CMS Integration
- Token Integration
- ACL Per View, Field, Item
- Field-Based Joomla Config Generation
- Support For Joomla Categories/Tags/Custom Fields
- CLI-Ready Components
- Joomla Update Server Integration
- Version-Aware Language String Compilation
- Remote Publishing to Custom Repo Update Streams
๐ Field Type System
- Field Types Define Templates And Data Types
- Gui Defined Rules Required Unique Nullable
- Save Get Hooks Per Field
- Database Schema Auto Generated From Field Settings
- Per Display Field Rendering Config List Edit
- Create Dynamic Models With Modals Selectors
- Conditional Js And Css Per Field
๐ Snippets, Templates, Layouts, Libraries
- Snippets Reusable Html Blocks
- Layouts Reusable Php Render Templates
- Templates Page Level Views Linked To Custom Admin Site Views
- Libraries JS CSS Assets Linked To UI
- CDN Local Toggle For Library Delivery
- Media Folder Injection With Override Support
- Repository Push Pull Reset Workflow
- Init Snippets Layouts Templates Via Gui
Conditional Logic Injection in Models, Views & Controllers
gives developers precise control over the behavior of generated components โ such as permissions, filtering, workflow rules, or dynamic form manipulation โ while still benefiting from full GUI-driven reusability
Joomla! Component Builder (JCB) enables you to inject custom logic conditionally into your compiled extension's MVC architecture โ without directly editing the core files. You can define conditions and corresponding PHP logic at the field, view, or component level, and JCB will integrate the code during compilation exactly where it's needed.
This feature gives developers precise control over the behavior of generated components โ such as permissions, filtering, workflow rules, or dynamic form manipulation โ while still benefiting from full GUI-driven reusability.
---๐ง Where You Can Inject
- ๐งฉ Models โ Add logic to queries, prepare data, apply filters
- ๐๏ธ Views โ Control layout decisions, prepare view variables, set document properties
- ๐ฎ Controllers โ Override save logic, access control, redirects, input sanitation
JCB provides pre-defined insertion points (โcode areasโ) where logic can be injected via the Custom Code system โ and those areas vary depending on the view or controller type.
---๐ง How It Works
- Navigate to your view, model, or controller in the JCB GUI.
- Find the Custom Code section or designated code area.
- Choose the context (e.g., beforeSave, afterGetItem, display, allowDelete).
- Define your logic directly in the GUI.
- (Optional) Wrap your logic in a condition, using PHP or JCB placeholders.
- JCB will insert that logic at the corresponding point when compiling the component.
You can include placeholders like:
input->get('layout') === 'edit') : ?>
// Your logic here
Or use dynamic placeholders such as:
if ({user:isSuperUser}) {
// Special behavior for super users
}
JCB will resolve those at build time to native PHP or Joomla API calls.
---๐ Example Use Case
Letโs say you want to prevent saving a record if a field value doesnโt meet a specific rule, but only in Joomla 4:
- Open the Controller โ beforeSave code area
- Insert your conditional logic like:
if (JVERSION >= 4 && !$data['my_field']) {
throw new \Exception('This field is required in J4.');
}
JCB will compile this only in the Joomla 4 version of the component.
Or you want to conditionally load a helper class in a model:
if ($user->authorise('core.manage', 'com_example')) {
\JLoader::register('ExampleHelper', JPATH_COMPONENT_ADMINISTRATOR . '/helpers/example.php');
}
Again, injected where needed without touching the compiled files.
---๐งฐ Related Features
- ๐ง Custom Code System โ reusable logic blocks with injection points
- ๐ Joomla Version Targeting โ resolve conditionals differently per version
- ๐ง Field Event Logic โ define JS/PHP logic per field
- ๐ก Joomla Powers โ use JPKs for clean version-agnostic code
โ Why It Matters
- Maintain control over behavior without hacking generated files
- Implement ACL, filtering, or data integrity logic at the right place
- Apply version-specific conditions when needed
- Keep your logic organized, reusable, and tracked