Skip to content

Stable anchors are small infrastructure

Page Jump looks simple on screen, but stable anchors connect modular sections, patterns and future theme navigation without a client-side router.

A link to the next section seems trivial until the page is multilingual, installed in a subdirectory, reordered by an editor or rendered by a different theme. Modularis treats anchors as a small piece of infrastructure because several features depend on them behaving predictably.

Anchors belong to content structure

An Modularis section can expose an explicit anchor instead of relying on a generated DOM id that changes with presentation details. Page Jump can then link to a specific section, the next section or the top of the page. Patterns can remap anchors when reused so copied compositions do not create collisions.

This is deliberately simpler than introducing a client-side router. Grav already owns routes. Modularis only needs a stable way to address meaningful regions inside those routes.

A bridge to theme navigation

The public contract lets a compatible theme point to a modular section while normal menu items point to other Grav routes. The theme owns its navigation behavior; stable anchors avoid private knowledge of component markup.

Small infrastructure rarely looks exciting in a screenshot, but it removes a large class of brittle assumptions. That makes Page Jump useful beyond the visible arrow the visitor eventually clicks.