Files
ipal-kit/docs/agent/skills/iapl-nav/SKILL.md
T
Radosław SmolińskiandClaude Fable 5.2 b91984fbcd IAPL rename: docs, agent guide, skills, reference site and starter on the new names; changelog draft
- docs, AGENT.md, the 16 skills, PROGRAMISTA and README use the preferred names (scripted, same list of forms);
  past CHANGELOG entries and the proposals in docs/dev are not rewritten
- AGENT.md: 'Names: IAPL and ipal-kit' — old name, new name, state in 1.x; what is not renamed; storageNames
- iapl-upgrade '→ 1.17.0', PROGRAMISTA §6 item 72, CHANGELOG 1.17.0 (draft): nothing required
- env.md, doctor.md (legacy-names, storage-names), stats.md, security.md, project-starter.md, iapl-reference, iapl-setup
- skill scripts read ipal-audit-skip and IPAL_IP_HEADER too; audit rule ids stay what they were
- reference site: iapl(), iapl-doctor.json, iapl-* skills, storageNames: 'iapl'; INDEX.md regenerated

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-25 17:36:09 +01:00

2.4 KiB

name, description
name description
iapl-nav Builds the site header, footer, mobile menu and company data in an IAPL project — Header/Footer/Company globals with buildLinkField from the plugin, server-side link resolution (resolveNav from the plugin), a small client MobileNav, legal links from System pages, revalidation on change. Use when creating or changing navigation, menu, header, footer, contact details, social links or the company global.

iapl-nav

Ready code: resources/nav-code.md (this skill). Rules: AGENT.md §6.8. Requires the UI primitives from ../iapl-block/resources/section-code.md (like the iapl-block skill, step 0).

Plan (write it down, then go straight to code — AGENT.md §0a)

  • menu items (one submenu level, no deeper), CTA in the header (links),
  • footer columns, note,
  • Company model for the market in AGENTS.md (PL: NIP/REGON, AU: ABN, US: EIN…),
  • a11y labels (menu button etc.) — fields in the admin panel.

Code

  1. src/globals/Header.ts, Footer.ts — from §6.8; Company.ts — company data (localized texts), access.read: () => true.
  2. On every global: hooks: { afterChange: [buildGlobalRevalidateHook({ revalidatePath })] } (revalidatePath from next/cache, hooks.md) — it calls revalidatePath('/', 'layout') and already skips the call outside the Next server (seed, migration) and with context.disableRevalidate. buildRevalidateHook is for collections. The plugin's own globals refresh themselves with iapl({ revalidatePath }).
  3. Menu: await resolveNav(header.navItems, locale) from lib/content (plugin) — links resolved on the server to { href, label, internal, newTab, targetProps, children }. Do not create lib/navigation.ts.
  4. src/components/layout/Header.tsx, Footer.tsx (server), MobileNav.tsx ('use client', open state only, data via props, import type { NavItem } from '@intecion/ipal-kit').
  5. Legal links in the footer from the System pages roles: getSystemLinks(locale) (href + page title) — not as manual items. Copyright year from code, name from Company.
  6. Logo from Site settings via <Media> — do not duplicate the field in Header.
  7. Wire it in src/app/(frontend)/[locale]/layout.tsx (fetch the globals through cached getters in lib/, pass them as props).

Verification

The iapl-audit skill. By hand: a menu item added in the panel is visible right after saving; the mobile menu works with the keyboard (Tab, Enter, Esc).