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.
It's probably a good idea. I can see that Conditional Displayer works well outside Nested Content in Umbraco 8 (at least the checkbox alternative) but not within, as said. And that's a pity for such a useful plugin.
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?
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/
It probably would, think im probably trying to over complicate it.
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
Thanks for the comment Mario, I did have a quick look through the issues list but must have missed it.
Mario,
I'm not able to get Conditional Displayers to work with Nested Content in Umbraco 8.1.5. Do you know if this issue was actually fixed in 8.1.4?
/Jan
This can be related: https://github.com/KOBENDigital/ConditionalDisplayers/issues/7
There are data-elements for each property editor within my Nested Content. E.g.:
But still not working - both content types referenced in my Conditional Displayer are displayed as default.
Hmmm, I'll take a look but I think the plugin will need a different approach with v8, the current one is too hacky using jQuery.
It's probably a good idea. I can see that Conditional Displayer works well outside Nested Content in Umbraco 8 (at least the checkbox alternative) but not within, as said. And that's a pity for such a useful plugin.
/Jan
is working on a reply...