Our.Umbraco.SuperValueConverters
4.1.1
dotnet add package Our.Umbraco.SuperValueConverters --version 4.1.1
NuGet\Install-Package Our.Umbraco.SuperValueConverters -Version 4.1.1
<PackageReference Include="Our.Umbraco.SuperValueConverters" Version="4.1.1" />
paket add Our.Umbraco.SuperValueConverters --version 4.1.1
#r "nuget: Our.Umbraco.SuperValueConverters, 4.1.1"
// Install Our.Umbraco.SuperValueConverters as a Cake Addin #addin nuget:?package=Our.Umbraco.SuperValueConverters&version=4.1.1 // Install Our.Umbraco.SuperValueConverters as a Cake Tool #tool nuget:?package=Our.Umbraco.SuperValueConverters&version=4.1.1
Umbraco SuperValueConverters
<img src="docs/img/logo.png?raw=true" alt="Umbraco SuperValueConverters" width="250" align="right" />
Looking for SuperValueConverters for Umbraco 8? Check the v8/dev branch.
SuperValueConverters is a collection of powerful property value converters for Umbraco, eliminating the need for casting and null checks on Umbraco picker values in views or controllers and helping to keep code cleaner.
Getting started
This package is supported on Umbraco v10-v12 and v13
Once installed you don't need to do anything to activate SuperValueConverters.
Installation
SuperValueConverters is available via NuGet.
To install with the .NET CLI, run the following command:
$ dotnet add package Our.Umbraco.SuperValueConverters
To install from within Visual Studio, use the NuGet Package Manager UI or run the following command:
PM> Install-Package Our.Umbraco.SuperValueConverters
Usage
Where a picker that returns multiple items (such as MNTP or Nested Content) has been configured to only allow a single item to be selected (via it's "maxItems" setting), the returned value will now be a single IPublishedContent
rather than IEnumerable<IPublishedContent>
.
Supported value converters will no longer return null
if no value has been picked - an empty collection will be returned instead, preventing the need for null checks.
Currently the following datatypes are supported:
- Multi-Node Tree Picker
- Nested Content
Models Builder
SuperValueConverters works seamlessly with Models Builder (if you're using it) to return the correct model types from pickers rather than IPublishedContent
.
Where a picker has been configured to only allow items of a specific doctype, the returned value will be already cast to the relevant Models Builder generated model.
In cases where an allowed doctype uses compositions Models Builder will generate an interface for that model. If more than one allowed doctype on a given picker implements the same interface, the returned value will be cast to the shared interface rather than the default IPublishedContent
.
Contribution guidelines
To raise a new bug, create an issue on the GitHub repository. To fix a bug or add new features, fork the repository and send a pull request with your changes. Feel free to add ideas to the repository's issues list if you would to discuss anything related to the library.
Who do I talk to?
This project is maintained by Callum Whyte and contributors. If you have any questions about the project please get in touch on Twitter, or by raising an issue on GitHub.
Credits
The logo uses the Energy icon from the Noun Project by Scarlett McKay, licensed under CC BY 3.0 US.
A special #h5yr to our contributors
License
Copyright © 2024 Callum Whyte, and other contributors
Licensed under the MIT License.
Product | Versions 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. |
-
net5.0
- Umbraco.Cms.Infrastructure (>= 9.0.0 && < 10.0.0)
-
net6.0
- Umbraco.Cms.Infrastructure (>= 10.0.0 && < 11.0.0)
-
net7.0
- Umbraco.Cms.Infrastructure (>= 11.0.0 && < 13.0.0)
-
net8.0
- Umbraco.Cms.Infrastructure (>= 13.0.0 && < 14.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 | Downloads | Last updated |
---|---|---|
4.1.1 | 715 | 5/30/2024 |
4.1.0 | 639 | 2/18/2024 |
4.0.1 | 3,880 | 1/20/2023 |
4.0.0 | 1,371 | 11/28/2022 |
3.1.0 | 1,004 | 5/29/2022 |
3.0.1 | 713 | 3/15/2022 |
3.0.0 | 735 | 3/4/2022 |
2.2.1 | 661 | 1/20/2023 |
2.2.0 | 480 | 5/29/2022 |
2.1.0 | 9,049 | 1/22/2021 |
2.0.1 | 4,404 | 7/25/2019 |
2.0.0 | 501 | 7/22/2019 |
1.3.0 | 740 | 1/22/2021 |
1.2.0 | 3,104 | 7/22/2019 |
1.1.0 | 870 | 4/13/2019 |
1.0.1 | 928 | 3/26/2019 |
1.0.0 | 720 | 2/6/2019 |