Skip to content

Navigation mega branch partial

Recursive desktop navigation branch, invoked as a custom tag.

Output: HTML partial.

This partial receives the local inputs below. It does not define a separate page view model.

Attribute Type Default / purpose
items object[] Prepared navigation nodes; default empty array.
level number Nesting depth; default 2.
templatePath string Resolved path to this custom tag, passed recursively.

The reference package uses its bundled theme CSS, Bootstrap and theme JavaScript. Account and checkout controls use the bundled checkout script. Partials use their caller’s resolved assets.

<cfset branchPath = request.resolveStorefrontView("partials/navigation_mega_branch.cfm", viewModel.theme.key)>
<cfmodule template="#branchPath#" templatePath="#branchPath#" items="#viewModel.navigation#">

Each item uses the recursive navigation-node structure.

Use prepared URLs and labels. Encode plain text and HTML attributes; preserve only explicitly prepared HTML.