๐งฉ 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
Insert/Replace Tags
Preserve your custom code across compiles โ safely, cleanly, and predictably
What Are Insert/Replace Tags?
Insert/Replace Tags are special comment-based markers that JCB uses to identify and preserve your custom PHP, HTML, or JS code inside generated files. These tags allow you to inject logic, override behavior, or add UI without losing your changes when recompiling your component.
They are one of the foundational features of JCBโs round-trip development philosophy, enabling you to safely edit compiled code while maintaining upgradeability.
Key Features
- ๐ Comment-Based Code Anchors: Use easy-to-read tag formats like
/***[INSERT<>$$$$]***/
to mark where your code should appear. - ๐ Round-Trip Persistence: Custom code inside these tags survives every recompile โ even if other parts of the file are regenerated.
- ๐ง Replace vs. Insert: Insert adds your code into a generated area. Replace completely overrides a section of generated code with your own.
- ๐ Multi-Language Support: Works in PHP, HTML, XML, INI, and JavaScript files with appropriate comment syntax.
- ๐ฆ Compiler Integration: During compile, JCB scans your existing files, extracts tagged blocks, and reinserts them in the correct locations.
- ๐ Compiler Debug Logs: Logs include which tags were found, skipped, or updated โ making troubleshooting easy.
- ๐งพ Visual Markers in Code: Makes your logic clearly visible and easily editable in any IDE or text editor.
- ๐งฌ Used Across Views, Models, Templates: Insert/Replace works throughout JCBโs MVC structure, in site/admin views, helper files, forms, and more.
Use Cases
- Add extra buttons to a toolbar in a custom admin view
- Inject a helper method into a model or controller
- Override default output of a template block
- Add JavaScript to the document head only if needed
- Replace a generated fieldโs HTML with a custom layout
- Persist database manipulation logic in a modelโs save method
How to Use Insert/Replace Tags
- Open the compiled file where you want to insert logic.
- Add a tag in the appropriate comment format:
- Insert:
/***[INSERT<>$$$$]***/
and/***[/INSERT<>$$$$]***/
- Replace:
/***[REPLACE<>$$$$]***/
and/***[/REPLACE<>$$$$]***/
- Insert:
- Place your custom code inside the opening and closing tags:
/***[INSERT<>$$$$]***/
if ($this->item->price > 1000) {
$this->item->priority = 'high';
}
/***[/INSERT<>$$$$]***/
- Save the file.
- On next compile, JCB will preserve or reinsert that code.
๐ง Pro Tip: Keep tag names descriptive and unique per file. Avoid duplicating tags with the same name in a single file.
Conclusion
Insert/Replace Tags are a cornerstone of JCBโs developer flexibility. They empower you to extend and personalize your componentโs logic without fear of losing changes on rebuild. Whether you're injecting simple markup or overriding core controller logic, this system gives you safe, controlled customization with full round-trip support.