Skip to content

Navigation mobile branch partial

Recursive mobile 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 1.
parentId string Parent collapse element ID; default storefrontMobileNavList.
templatePath string Resolved path to this custom tag, passed recursively.
expanded boolean false.

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_mobile_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.