Build Options
The `UmbNavBuildOptions` class controls how the Menu Builder Service processes menu items. Use build options to filter, transform, and limit the menu data at render time.
Class Definition
namespace Umbraco.Community.UmbNav.Core.Models;
public class UmbNavBuildOptions
{
public bool RemoveNoopener { get; set; }
public bool RemoveNoreferrer { get; set; }
public bool HideIncludeChildren { get; set; }
public bool RemoveDescription { get; set; }
public bool RemoveCustomClasses { get; set; }
public bool RemoveImages { get; set; }
public int MaxDepth { get; set; }
public static UmbNavBuildOptions Default => new();
}Options Reference
RemoveNoopener
RemoveNoreferrer
HideIncludeChildren
RemoveDescription
RemoveCustomClasses
RemoveImages
MaxDepth
Usage Examples
Basic Usage
Default Options
Header Navigation
Footer Navigation
Mega Menu
API Response
Security-Enforced Links
Configuration vs Build Options
Scenario
Data Type Config
Build Options
Example: Different Views, Same Data
Combining Options
Object Initializer Syntax
Immutability Note
Testing with Options
Last updated
Was this helpful?