Skip to main content

Custom Documentation Sections

Add rich, version-aware documentation to any part of your component โ€” directly from the GUI.

What Are Custom Documentation Sections?

JCB's Custom Documentation Sections allow you to write and manage embedded documentation content directly inside your component structure. These sections are linked to individual entities (like Admin Views, Fields, or Dynamic GETs) and compiled into the source code or exported documentation.

This ensures that your documentation:

  • Travels with your component (not externalized)
  • Updates when the component is compiled
  • Can be automatically converted into markdown or PHPDoc
  • Is version-controlled and sharable like any other JCB entity

Key Features

  • ๐Ÿ“Žโ€‚Attach Documentation Anywhere
    Add custom documentation blocks to views, fields, models, templates, and more โ€” giving developers and maintainers clear insight.
  • ๐Ÿงพโ€‚Markdown and PHPDoc Support
    Write documentation in markdown or comment-based syntax that gets injected into README files or source code blocks.
  • ๐Ÿ”โ€‚Compile-Time Injection
    Your documentation is automatically added to generated files at compile-time โ€” as inline comments, docblocks, or markdown files.
  • ๐Ÿ“ฆโ€‚Reusable Sections
    Create reusable documentation blocks that can be attached to multiple entities (e.g., standard usage guides, update instructions, licensing info).
  • ๐Ÿง โ€‚Blueprint-Scoped
    Documentation can be exported/imported along with blueprints, making it ideal for sharing between projects or repositories.

Use Cases

  • Include detailed usage notes for Admin Views or GETs
  • Explain field-level logic for advanced developers
  • Document expected output structure of templates/layouts
  • Track updates, compatibility notes, or gotchas
  • Auto-generate README content for components

How It Works in JCB

  • Navigate to the Entity that needs documentation
  • In the readme area and give it a title, optional summary, and body content
  • Define whether the output goes into:
    • Markdown documentation (README.md)
    • PHP source docblocks (/** */)
    • Inline code comments (// style)
  • Save, compile โ€” and JCB injects the content into the output

Round-Trip Friendly

Just like other JCB entities, documentation can use insert/replace tags. This lets you modify your README or PHP file directly and push the changes back into JCB using the round-trip sync.

Perfect for multi-developer workflows or when editing documentation in IDEs.

Related Tools

  • Snippets โ€” for reusable HTML/JS fragments
  • Templates & Layouts โ€” documentation attached per view/UI
  • Blueprints โ€” include versioned docs in exported packages
  • Compiler Summary โ€” inject compile-specific info via doc sections

Summary

Define structured, maintainable documentation inside JCB and link it to specific entities like views, fields, or blueprints.