---
title: BolNavItemViewModel
summary: API reference for BolNavItemViewModel.
status: draft
owner: SAIF IT Core Services
last_reviewed: 2026-10-12
library: BolMiddleware
reference_type: package
---

# BolNavItemViewModel

View model for one menu entry, passed to `_BolMenuItemPartial`. It pairs a menu item with the current page so the partial can mark the active entry and its favorite state.

## Purpose
- Carry one menu item and the page context to the menu item partial.

## Context
- Namespace: `BolMiddleware.Models.MenuModels`
- Assembly/package: `BolMiddleware`

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| Constructor | `BolNavItemViewModel(string pageName)` | Sets the current page the item is compared with. |
| `MenuItem` | `MenuItem MenuItem` | Menu entry to render. |
| `CurrentPage` | `string CurrentPage { get; }` | Page id used to decide whether the item is active. |
| `Favorite` | `bool Favorite` | Whether the item is shown in the favorites list. |

## Behavioral notes
- `CurrentPage` can only be set through the constructor.

## Constraints and usage notes
- Created by the menu views.

## Sources
- src/BolMiddleware/Models/MenuModels/BolNavItemViewModel.cs
