Our.Umbraco.ConditionalDisplayers 1.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Our.Umbraco.ConditionalDisplayers --version 1.0.1
NuGet\Install-Package Our.Umbraco.ConditionalDisplayers -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="Our.Umbraco.ConditionalDisplayers" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Our.Umbraco.ConditionalDisplayers --version 1.0.1
#r "nuget: Our.Umbraco.ConditionalDisplayers, 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.
// Install Our.Umbraco.ConditionalDisplayers as a Cake Addin
#addin nuget:?package=Our.Umbraco.ConditionalDisplayers&version=1.0.1

// Install Our.Umbraco.ConditionalDisplayers as a Cake Tool
#tool nuget:?package=Our.Umbraco.ConditionalDisplayers&version=1.0.1

Conditional Displayers

This is an Umbraco package. It implements a checkbox and dropdown datatype editors that work like the core ones (in fact they are based in the same code), but allows to hide or display other properties in the same Document Type.

Installation

Nuget

NuGet

Run this form your Package Manager Console in Visual Studio:

PM> Install-Package Our.Umbraco.ConditionalDisplayers

Umbraco Package

Manually

Download the code and copy it into you App_Plugin folder.

Configuration

Checkbox

Create a new DataType and select 'Checkbox Conditional Displayer' as the Property Editor.

-Default value: select the value that the checkbox will have by default: checked/unchecked.

-Show if checked: enter the aliases of those properties you want to show when the checkbox is checked. Note: these properties <b>will be hidden</b> if it's unchecked.

-Show if unchecked: enter the aliases of those properties you want to show when the checkbox is unchecked. Note: these properties <b>will be hidden</b> if it's checked.

Create a new DataType and select 'Dropdown Conditional Displayer' as the Property Editor.

You'll have to create a list of options that the dropdown will display. In addition to the value you have two other inputs used to show or hide one or more properties.

-Show if selected: enter the aliases of those properties you want to show when the checkbox is selected. Note: these properties <b>won't be hidden</b> when this value unselected. -Hide if selected: enter the aliases of those properties you want to show when the checkbox is selected. Note: these properties <b>won't be hidden</b> when this value unselected.

<strong>Note:</strong> the difference of behaviour between the checkbox and the dropdown input logic can be a bit confusing, but after a lot of testing it seems the most flexible way to combine the different possibilities when configuring them. I'm open to other behaviour suggestions.

Getting the properties values

The Conditional Displayers are normal property editors so you can access their values as with any other property (strongly typed model, GetPropertyValue,...)

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

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
3.4.0 30,532 5/8/2023
3.3.0-beta3 109 4/28/2023
3.3.0-beta1 107 4/20/2023
3.2.4 5,370 3/7/2023
3.2.3 222 3/7/2023
3.2.2 222 3/7/2023
3.2.1 5,748 12/5/2022
3.2.0 322 12/5/2022
3.1.0 24,951 7/23/2022
3.0.3 602 7/13/2022
3.0.2 10,274 1/18/2022
3.0.1-pre002 189 12/31/2021
3.0.1-pre001 163 12/30/2021
3.0.0 2,816 11/27/2021
3.0.0-beta001 262 5/3/2021
2.3.4 38,750 9/19/2020
2.3.2 5,803 6/20/2020
2.3.1 4,032 3/11/2020
2.3.0 7,019 11/9/2019
2.2.1 718 10/1/2019
2.2.0 592 8/12/2019
1.4.0 6,201 11/9/2019
1.3.1 3,071 9/13/2019
1.3.0 3,155 2/1/2019
1.2.0 731 2/1/2019
1.1.0 930 1/20/2019
1.0.1 1,166 1/1/2019
1.0.0 825 1/1/2019

Includes a checkbox and a dropdown property editors.