---
title: Menu item click
summary: Handles a menu link post and navigates to the chosen application page.
status: draft
owner: SAIF IT Core Services
last_reviewed: 2026-10-12
library: BolMiddleware
reference_type: package
operation_id: OP-09
trigger: POST to the MenuItemClick handler
---

# Menu item click

Each menu link in the side and top menus posts to the `MenuItemClick` page handler with the target application and page. The handler turns the post into a navigation.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-09 |
| **Trigger** | POST to the `MenuItemClick` handler |
| **Inputs** | `targetApp`, `targetPage` |
| **Outputs** | Redirect result |
| **Primary components** | `BolMenuModel.OnPostMenuItemClick`, `BolMenuModel.OnNavigate` |
| **Entry point** | `src/BolMiddleware/Models/BolMenuModel.cs` |

## Steps

1. Build `NavigationOptions` from the posted `targetApp` and `targetPage`.
2. Call the virtual `OnNavigate` hook so the consumer can adjust the options.
3. Run [Navigate](navigate.md), which saves the context ([BR-BOLMIDDLEWARE-002](../business-rules.md#br-bolmiddleware-002-context-save-condition)) and returns the redirect.

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
	Start([POST MenuItemClick]) --> S1[Build NavigationOptions]
	S1 --> S2[OnNavigate hook]
	S2 --> S3[Navigate]
	S3 --> EndOk([Redirect])
```

## Failure and edge-case behavior

- The redirect target is built from posted values with no allow-list, so a crafted post can redirect to an arbitrary application and page.
- Anti-forgery validation is disabled on the page class, so the post can be forged cross-site.

## Related documentation
- [Index](../index.md)
- [Overview](../overview.md)
- [Architecture](../architecture.md)
- [Dependencies](../dependencies.md)
- [Configuration](../configuration.md)
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [Security and authorization](../security-authorization.md)
- [Service registration](../service-registration.md)
- [API reference](../api/index.md)

## Sources
- src/BolMiddleware/Models/BolMenuModel.cs
- src/BolMiddleware/Contracts/NavigationOptions.cs
- src/BolMiddleware/Pages/Shared/_BolMenuItemPartial.cshtml
