[go: up one dir, main page]

Skip to content
This repository has been archived by the owner on May 9, 2023. It is now read-only.

[ARCHIVED] Custom Value Converter property-editor wrapper for Umbraco

License

Notifications You must be signed in to change notification settings

leekelleher/umbraco-custom-valueconverter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Custom Value Converter for Umbraco logo

Custom Value Converter for Umbraco

No Maintenance Intended

A wrapper property-editor (for Umbraco) that lets you pick a custom/alternative ValueConverter for a specified data-type.

What does that mean?

Let's say that you have a property that is using a Content Picker editor, when you come to use the property on the frontend of the website, say with ModelsBuilder, the value's object-type would be an IPublishedContent. However, if you wanted to only use the raw value, e.g. a string of the Content's UDI, then your options are to either make an additional call to value.GetUdi(), or use a Custom Value Converter - to swap the default Content Picker value converter with a plain-text value converter.

Configuration Editor for Custom Value Converter

In terms of ModelsBuilder, this would change the property's object-type from an IPublishedContent to a string.

This is just one example, many more advanced combinations could be achieved.

Installation

Please note, currently you can only install a package from the NuGet package repository.

dotnet add package Our.Umbraco.Community.CustomValueConverter

License

Copyright © Lee Kelleher.

All source code is licensed under the Mozilla Public License.

Logo

The package logo uses the Replace icon (by Arthur Shlain) icon from the Noun Project, licensed under CC BY 3.0 US.