๐งฉ 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
Advanced Compiler Hooks Per Code Block
Youโre no longer just writing reusable code โ youโre architecting logic workflows into the Joomla compile lifecycle.
What Are Compiler Hooks?
In Joomla Component Builder (JCB), Compiler Hooks refer to pre-defined injection points inside the component's generated structure. When you create a Custom Code entity, you can assign it to one or more of these hook types:
- ๐งฉ BeforeModelSave
- ๐งฉ AfterModelGetItem
- ๐งฉ BeforeControllerExecute
- ๐งฉ AfterFormLoad
- ๐งฉ OnLayoutRender
- ๐งฉ InFieldSetter
- ๐งฉ InHelperMethod
- ๐งฉ InViewDisplay
Each hook represents a specific place in the compiled Joomla code where logic can be inserted safely and deterministically.
๐ ๏ธ Unlike simple insert tags, compiler hooks are assigned via the GUI dropdown during Custom Code creation and are then auto-bound to the corresponding compile logic area.
Why Is This Powerful?
- โ Full control over logic location: Instead of relying on manual placement or tags, your code is injected into the exact lifecycle phase of a Joomla component's execution.
- โ Works across all entities: Hooks can be used in Models, Controllers, Views, Fields, Helpers, Admin Views, Custom Admin Views, Site Views, etc.
- โ Secure and isolated: Hook-bound code runs only when that part of the component is executed โ avoiding logic bleeding into unintended parts.
- โ Debug-friendly: Each compiler log includes a map of which Custom Code blocks were injected at which hook point, with UUIDs for tracing.
Common Use Cases
- ๐ Validation logic (BeforeSave or Validate hooks)
- ๐ฆ Field manipulation or transformation (InSetter hooks)
- ๐ Templating conditionals or pre-render filters (OnLayoutRender)
- ๐ REST API response prep (AfterGetItem or AfterListFetch)
- ๐งช Testing hooks in preview-mode only builds
- ๐ Auto-documentation or changelog insertion during compile
Bonus
You can define multiple compiler hooks per block (e.g., BeforeSave + OnHelperCall), allowing your logic to span contexts while still being DRY.
Best Practices
- Keep hook logic context-aware โ donโt rely on global state.
- Use hook-specific placeholders when possible (e.g., [[[model.name]]], [[[field.name]]]).
- Leverage compiler logs to audit injected blocks.
- Combine with nesting for modular pre/post logic chains.
Conclusion
Compiler Hooks elevate Custom Code from simple text injection to a fully structured, event-based code placement system. Youโre no longer just writing reusable code โ youโre architecting logic workflows into the Joomla compile lifecycle. Itโs declarative, deterministic, and incredibly powerful.
Summary
JCB allows each Custom Code block to define specific compiler "hook points" โ giving you precise control over where and how your logic is injected during compilation. These hooks enable conditional, contextual, and event-based code placement across your Joomla componentโs lifecycle.