Our.Umbraco.SimpleTreeMenu 4.0.6

dotnet add package Our.Umbraco.SimpleTreeMenu --version 4.0.6
                    
NuGet\Install-Package Our.Umbraco.SimpleTreeMenu -Version 4.0.6
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Our.Umbraco.SimpleTreeMenu" Version="4.0.6" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Our.Umbraco.SimpleTreeMenu" Version="4.0.6" />
                    
Directory.Packages.props
<PackageReference Include="Our.Umbraco.SimpleTreeMenu" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Our.Umbraco.SimpleTreeMenu --version 4.0.6
                    
#r "nuget: Our.Umbraco.SimpleTreeMenu, 4.0.6"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=Our.Umbraco.SimpleTreeMenu&version=4.0.6
                    
Install as a Cake Addin
#tool nuget:?package=Our.Umbraco.SimpleTreeMenu&version=4.0.6
                    
Install as a Cake Tool

Our.Umbraco.SimpleTreeMenu

A simple treemenu propertyeditor that uses a doc-type (element) for menu items.

With a valueconverter that utilize the built in nestedcontent for type conversion of menu items. Every item can be cast to an IPublishedElement for propertyaccess through Umbracos extension-methods.

It will work without the valueconverter, just remove the binary and use JObject instead of IEnumerable<ISimpleTreeItem>

Example:

@{

  var navigationModel = Model.Value<IEnumerable<ISimpleTreeItem>>("navigation", defaultValue: new List<ISimpleTreeItem>());
  
   @:<ul>


    foreach (var item in navigationModel)
    {

        var element = (IPublishedElement)item;
        var url = element.Value<IPublishedContent>("linkedContent")?.Url ?? element.Value<string>("linkedUrl") ?? "#";

        @:<li><a class="nav-link" href="@url">@(element.Value<string>("title"))</a></li>

        if (item.Children.Any())
        {
            @:<ul>
                foreach (var child in item.Children)
                {
                    var cElement = (IPublishedElement)child;
                    var cUrl = cElement.Value<IPublishedContent>("linkedContent")?.Url ?? cElement.Value<string>("linkedUrl") ?? "#";
                    @:<li><a class="nav-link" href="@cUrl">@(cElement.Value<string>("title"))</a></li>
                }
            @:</ul>
        }
    }

    @:</ul>
}
Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Framework net472 is compatible.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.6 1,382 7/10/2024
4.0.5 2,389 11/2/2023
4.0.4 409 10/2/2023
4.0.3 277 8/9/2023
4.0.2 2,624 4/3/2023
4.0.1 1,324 3/18/2023
4.0.0 473 12/2/2022
3.0.3 1,406 11/19/2022
3.0.2 2,090 10/12/2022
3.0.1 1,179 9/20/2022
3.0.0 1,192 8/4/2022
2.0.1 1,752 5/25/2022
2.0.0 1,177 12/6/2021
2.0.0-beta3 1,622 11/26/2021
2.0.0-beta2 3,375 10/4/2021
2.0.0-beta 356 10/4/2021
1.1.0 5,811 11/19/2020
1.0.0 2,303 8/21/2020
0.2.2 1,592 4/29/2020
0.2.0 859 12/12/2019
0.1.3 552 12/4/2019
0.1.1 561 11/14/2019