Skip to main content

Field Reference Mapping Table Output

JCB automatically generates a structured mapping table that documents where each field is used โ€” across views, templates, layout files, code snippets, and even access logic

๐Ÿ” What Is the Field Reference Mapping Table?

The Field Reference Mapping Table is a documentation feature within Joomla Component Builder (JCB) that catalogs how each field is used across your component. It creates an internal (and optionally exportable) table of relationships between:

  • Field definitions (Admin View fields, Config Fields, etc.)
  • Views and templates that use those fields
  • Places where the field appears in layout, code snippets, or templates
  • Whether the field is used for ACL checks, hidden logic, or dynamic visibility
  • Field rendering types (e.g., modal, subform, list-only, config-only)

It serves as a diagnostic and planning tool โ€” especially useful in large, schema-rich components.

๐Ÿง  Why Itโ€™s Useful

  • โœ… Instantly know where a field appears and how it behaves
  • โœ… Trace dynamic behavior: visibility, conditional display, subform bindings
  • โœ… Discover accidental orphan fields (defined but unused)
  • โœ… Audit for performance optimizations or view simplification
  • โœ… Understand reusability across multiple components

๐Ÿ“‚ How to Access It

The Field Reference Mapping Table is:

  • Auto-generated internally by the compiler
  • Displayed in component-wide documentation views (like Component Metadata or Build Summary)
  • Optionally exported in the per-entity README or Markdown output
  • Accessible via the debug view (if enabled during compilation)

Note: This feature activates automatically โ€” no setup required.

๐Ÿ“Š Whatโ€™s Included in the Table

Example Field Reference Mapping Table:

Field Name View(s) Used In Templates / Layouts Config-only? Access Logic Notes
greeting_message admin: Greetings edit.php No Yes (ACL:view) Used in modal + list view
user_role config config.xml Yes No Static config field
look_id admin: Looks, Site: LookView layout_look.php No Yes (dynamic) Subform / modal selector

You may see these tables in the compilerโ€™s output area or in structured Markdown files if README auto-gen is enabled.

๐Ÿ“Œ Optional Uses

  • Integrate it into a changelog to track field usage changes over time
  • Use it to drive automated tests (e.g., โ€œfield X must appear in view Yโ€)
  • Export to Excel or JSON via custom compiler hook
  • Provide your team with cross-referenced schema documentation

๐Ÿ’ก Tips

  • Enable detailed build logging to get additional insight into field usage during compilation
  • Combine this with line tracking and custom code mapping for full introspection

โœ… Benefits

  • โœ… Improves schema documentation and developer understanding
  • โœ… Helps debug missing or misbehaving fields in UI
  • โœ… Supports safe component refactoring and optimization
  • โœ… Enhances component onboarding for new developers

๐Ÿ”— Related Features

  • ๐Ÿ“„ Auto-generated per-entity README
  • ๐Ÿงฉ Admin View & Field Type metadata
  • ๐Ÿ” Field reuse and shared field types
  • ๐Ÿง  Conditional Field Visibility

๐Ÿ“ Conclusion

The Field Reference Mapping Table is one of JCBโ€™s quietly powerful features โ€” giving you a centralized, transparent view into how your fields are used across your component. Especially in complex applications, this audit trail becomes indispensable for maintaining structure, clarity, and scalability.