Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

Creating a block, selectively showing only certain inputs


In our site right now we currently have 4 block types to create different styles of buttons.

Each block is basically the same, it just requires a few different things: Image block needs an image. Icon button needs an icon to be chosen, etc.

I was thinking about creating one button block to handle all 4 (and potentially more) styles. I'm just not sure how possible it would be without getting confusing. For instance, if you create a new button block and choose Image button from a dropdown, could the block editor then show extra fields that were hidden before. And if you chose Icon button would it hide those fields and present other fields?

I mocked up this idea to hopefully help illustrate what I'm hoping to achieve. Is this something EpiServer can do? 

Edited, Apr 16, 2019 20:23

not OTHB as far as I know. you would need to go dojo-mojo path to implement this in proper way (on client-side). Grzegorz extends a bit "All Properties" view in his blog post ( which might give you some hints on how it might look.

Edited, Apr 16, 2019 21:55

This looks very promising, thank you!

Apr 17, 2019 15:12

Another awesome blog from Greg shows how to show/hide properties depending on value thats been selected:

Best bit if that it appears to pure C# so no Dojo... 

Apr 17, 2019 16:27
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.