AndrewK.Umbraco.CheckBoxList
1.1.0
dotnet add package AndrewK.Umbraco.CheckBoxList --version 1.1.0
NuGet\Install-Package AndrewK.Umbraco.CheckBoxList -Version 1.1.0
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="AndrewK.Umbraco.CheckBoxList" Version="1.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AndrewK.Umbraco.CheckBoxList" Version="1.1.0" />
<PackageReference Include="AndrewK.Umbraco.CheckBoxList" />
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 AndrewK.Umbraco.CheckBoxList --version 1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: AndrewK.Umbraco.CheckBoxList, 1.1.0"
#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.
#:package AndrewK.Umbraco.CheckBoxList@1.1.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AndrewK.Umbraco.CheckBoxList&version=1.1.0
#tool nuget:?package=AndrewK.Umbraco.CheckBoxList&version=1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
AndrewK.Umbraco.CheckBoxList
A custom CheckBoxList property editor for Umbraco that provides enhanced functionality for dealing with keys on the backend and labels in the backoffice.
Features
- Multiple item selection support
- Integration with AndrewK.Umbraco.Dictionary for options management
- Default value specification (multiple default values possible)
- Server-side value conversion to
ICollection<string>
- Full validation support
- Seamless integration with Umbraco backoffice
Installation
You can install the package via NuGet:
dotnet add package AndrewK.Umbraco.CheckBoxList
Usage
Creating a Dropdown Property
- Create a new Data Type in the Umbraco backoffice
- Select "AndrewK CheckBoxList" as the property editor
- Configure options (and default value if needed)
- Add the data type to your document type
Configuration Options
- Items: Define the checkbox-list options as key-value pairs
- Default: Set a default value for new content items
Accessing CheckBoxList Data in Controllers/Services/Templates
public class MyController : Controller
{
public IActionResult Index()
{
var content = // ... get your content
var values = content.Value<ICollection<string>>("myCheckBoxListProperty");
foreach (var value in values)
{
// Process your values
}
return View();
}
}
Example Of Setting CheckBoxList Data in Controllers/Services
public class MyController : Controller
{
public IActionResult Index()
{
var collection = // ... your collection, serializable to a list of strings
// set serialized object
content.SetValue(PropertyAlias, JsonConvert.SerializeObject(collection));
return View();
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net9.0
- AndrewK.Umbraco.Dictionary (>= 1.1.0)
- Microsoft.AspNetCore.Components.Web (>= 9.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version 1.1.0:
- Implemented labels localization via backoffice localization files
- Bugfixes and improvements