Git Product home page Git Product logo

conditionaldisplayers's Introduction

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

https://our.umbraco.com/packages/backoffice-extensions/conditional-displayers/

Manually

Download the code and copy it into you App_Plugin folder.

Test Website Credentials:

Username: [email protected]
Password: Password123

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 will be hidden 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 will be hidden if it's checked.

Dropdown

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 won't be hidden 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 won't be hidden when this value unselected.

Note: 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,...)

Donate

This package is maintaned by Mario Lopez. If you want to say thank you:

Buy Me A Coffee

conditionaldisplayers's People

Contributors

skartknet avatar lumimario avatar jezmaghuyop avatar robertjf avatar richardvandermeer avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.