Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ben 19 posts 109 karma points
    5 days ago
    Ben
    0

    Conditional property editors

    Hi All,

    Im trying to create a doc type which allows the user to create a block of different call to action style content snippets. There are 3 different types of snippets, an image, video and content. Each type of snippet has different property editors.

    The way id like it work is have one doc type which has a conditional property editor which allows the user to select from a drop down which snippet they are going to use and it shows them the relevant property editors associated. This would then be bundled inside nested content which would allow them to add as many as they like.

    I have tried the Conditional Displayers package which works perfectly (other than being able to select a default value) however it doesn't work when used inside nested content.

    Can anyone offer any advice?

  • Lars Heesakkers 15 posts 106 karma points
    5 days ago
    Lars Heesakkers
    0

    Will "Nested Content" not suffice? If you create a Nested Content with three different doctypes and set de max and min to 1. You can then check in code which doctype is selected and act on that. https://our.umbraco.com/documentation/getting-started/backoffice/property-editors/built-in-property-editors/Nested-Content/

  • Ben 19 posts 109 karma points
    3 days ago
    Ben
    0

    It probably would, think im probably trying to over complicate it.

  • Mario 89 posts 653 karma points c-trib
    3 days ago
    Mario
    100

    Hi Ben,

    The problem is that Conditional Displayers uses an element selector that is not available in Nested Content. you have more info here:

    https://github.com/KOBENDigital/ConditionalDisplayers/issues/7

    bgunnarsson has created a PR and as per his comments this should be resolve in Umbraco versions 7.15.3 and 8.1.4

  • Ben 19 posts 109 karma points
    3 days ago
    Ben
    0

    Thanks for the comment Mario, I did have a quick look through the issues list but must have missed it.

Please Sign in or register to post replies

Write your reply to:

Draft