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 65,149 5/8/2023
3.3.0-beta3 134 4/28/2023
3.3.0-beta1 131 4/20/2023
3.2.4 6,087 3/7/2023
3.2.3 249 3/7/2023
3.2.2 238 3/7/2023
3.2.1 6,837 12/5/2022
3.2.0 354 12/5/2022
3.1.0 27,363 7/23/2022
3.0.3 652 7/13/2022
3.0.2 10,490 1/18/2022
3.0.1-pre002 227 12/31/2021
3.0.1-pre001 196 12/30/2021
3.0.0 2,876 11/27/2021
3.0.0-beta001 296 5/3/2021
2.3.4 42,408 9/19/2020
2.3.2 6,262 6/20/2020
2.3.1 4,651 3/11/2020
2.3.0 7,250 11/9/2019
2.2.1 752 10/1/2019
2.2.0 607 8/12/2019
1.4.0 6,733 11/9/2019
1.3.1 3,267 9/13/2019
1.3.0 3,200 2/1/2019
1.2.0 771 2/1/2019
1.1.0 1,025 1/20/2019
1.0.1 1,200 1/1/2019
1.0.0 859 1/1/2019

Includes a checkbox and a dropdown property editors.