Skip to content
docs Explore the platform

ANTSAND · GUIDE

HMVC routes and sections

> Production API availability: use /api/v1/help?view=guides and the resource operations catalog before following a recipe. Some localhost capabilities are not deployed yet; an absent operation is unavailable.

Start from a URL

For /guide, identify the module, controller and action that should receive the request. The page then selects the view and its sections. A folder name alone does not define this behavior: routing, ACL and controller generation must agree.

Examplejson
{
  "op": "ensure_hmvc_action",
  "module": "home",
  "controller": "Guides",
  "action": "overview",
  "action_type": "default",
  "view_enable": "enable",
  "acl": ["Guest", "Member", "Admin"]
}

This is an operation fragment for a public page, not a complete patch. Do not reuse its public ACL for a member account or protected course route.

Examplejson
{
  "op": "set_route",
  "route": "/guide",
  "module": "home",
  "controller": "guides",
  "action": "overview"
}

set_route replaces the contract for that exact URL. Inspect an existing route before replacing it. Add the matching visual page with ensure_page, preserving Frontend as its type and frontend as its component.

Compose one section

Use a stable section_id, the registered template identifier, parameters_file, CSS configuration and data_mapping. Keep the native header/body/footer structure required by that template.

The reusable renderer decides how those fields become markup. Databoard decides which content fills them. Site design settings decide the typography and spacing. An agent should not recreate these three responsibilities inside a single HTML string.

Read the board's existing menu and shared section references. Change the shared source when the change is meant for every page. Change a page-owned section when the change applies only there.

A shared navigation change deserves a multi-page check: it can alter every generated page even when the patch is small.

Forms need an action contract

A form's rendered position and its submit endpoint are different connections. Trace the page and section that render it, then inspect the action handling the request, method, validation, session/CSRF rules, storage and response.

See Forms and workflows. A working public article is not proof that a member password-reset endpoint is correctly configured.