Skip to main content

Reusable Query Sets

dramatically speeds up complex UI development while keeping your codebase clean and consistent

What It Does
In Joomla Component Builder (JCB), every Dynamic GET you create becomes a standalone, reusable entity that can be attached to multiple Site Views or Custom Admin Views. These Query Sets allow you to define complex joins, filters, ordering, and logic onceโ€”and reuse them wherever needed.

Instead of duplicating query logic across views, you simply assign the same Dynamic GET to multiple contexts. This promotes DRY (Don't Repeat Yourself) development and simplifies long-term maintenance.

Key Capabilities

  • โ™ป๏ธ Define Dynamic GETs once and reuse them across multiple views
  • ๐Ÿ” Version control each GET like any other JCB entity
  • ๐Ÿ“ฆ Export, import, fork, or reset GETs across projects
  • ๐Ÿ” Standardize complex filter/join logic site-wide
  • ๐Ÿงฉ Attach GETs via GUI to Site Views, Custom Admin Views, or Templates

Where to Configure

  1. Go to Dynamic GETs under the JCB entity list.
  2. Create or select a Dynamic GET.
  3. Assign it to any view by selecting it as the Main GET or Additional GET.
  4. In layouts/templates, reference its results using its assigned alias or variable name.

Example Use Cases

  • A unified โ€œPublished Itemsโ€ GET used in:
    • Dashboard view
    • Frontend listing
    • Admin export tool
  • A reusable GET to fetch โ€œRecently Modified Itemsโ€ applied to:
    • Sidebar widgets
    • Audit logs
    • User activity streams

Benefits

  • โœ… Faster development through query reuse
  • ๐Ÿง  Centralized updatesโ€”change logic in one GET and reflect it everywhere
  • ๐Ÿงฐ No redundant field selection or filter re-entry
  • ๐Ÿ” Compatible with round-trip builds and compiler logs
  • ๐Ÿš€ Maintainable, scalable component design

Conclusion

Reusable Query Sets give you the power of modular database logic. Define once, use anywhere. Combined with JCBโ€™s version control and visual builder, this dramatically speeds up complex UI development while keeping your codebase clean and consistent.