AndrewK.Umbraco.RadioButtonList
1.0.1
dotnet add package AndrewK.Umbraco.RadioButtonList --version 1.0.1
NuGet\Install-Package AndrewK.Umbraco.RadioButtonList -Version 1.0.1
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.RadioButtonList" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AndrewK.Umbraco.RadioButtonList" Version="1.0.1" />
<PackageReference Include="AndrewK.Umbraco.RadioButtonList" />
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.RadioButtonList --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: AndrewK.Umbraco.RadioButtonList, 1.0.1"
#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.RadioButtonList@1.0.1
#: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.RadioButtonList&version=1.0.1
#tool nuget:?package=AndrewK.Umbraco.RadioButtonList&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
AndrewK.Umbraco.RadioButtonList
A custom RadioButtonList property editor for Umbraco that provides enhanced functionality for dealing with keys on the backend and labels in the backoffice.
Features
- Integration with AndrewK.Umbraco.Dictionary for options management
- Default value specification
- Full validation support
- Seamless integration with Umbraco backoffice
- Labels localization via backoffice localization files
Installation
You can install the package via NuGet:
dotnet add package AndrewK.Umbraco.RadioButtonList
Usage
Creating a RadioButtonList Property
- Create a new Data Type in the Umbraco backoffice
- Select "AndrewK RadioButtonList" as the property editor
- Configure options (and default value if needed)
- Add the data type to your document type
Configuration Options
- Items: Define the radio-button-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()
{
IPublishedContent content = // ... get your content
var values = content.Value<string>("myRadioButtonListProperty");
return View();
}
}
Example Of Setting CheckBoxList Data in Controllers/Services
public class MyController : Controller
{
public IActionResult Index()
{
IContent content = // ... get your content
content.SetValue(PropertyAlias, "myOptionKey");
return View();
}
}
Using backoffice localization files
Let's say your localization file looks like the following
export default {
dataLabels: {
one: 'One EN',
two: 'Two EN'
}
}
In this case here's what your configuration should look like
[
{
"alias": "items",
"value": [
{
"key": "1",
"value": "#dataLabels_one" // "#{section}_{key}"
},
{
"key": "2",
"value": "#dataLabels_two" // "#{section}_{key}"
}
]
}
]
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.0.1:
- Labels localization via backoffice localization files