Inline Editor based on Page Type

Matt Larrabee asked on June 8, 2020 18:19

Does anyone have any examples of an inline editor that uses information from a page type? An example would be an Employee inline editor that has a dropdown of all Employee page type objects and when you select one it displays bio information for that Employee? Thanks for the help!

Recent Answers


Trevor Fayas answered on June 8, 2020 19:44

I'm not sure if you are using "Inline editor" properly, or at least i'm not fully grasping what you are going for.

You can have all the fields across all the different page types, then use the "Has Depending Field" checkbox on your drop down, and "Field Depends on" for the differnet fields to show or hide based on the page type you select. In essence you have all possible fields, and just showing/hiding some in the UI. Is that kind of what you are looking for?

0 votesVote for this answer Mark as a Correct answer

Matt Larrabee answered on June 8, 2020 20:37

Hi Trevor, thanks for the response. Here's the use case of what I was planing.

In Kentico 12sp MVC, I have a page that uses page builder and a set of widgets that can be used on a page. Many of these widgets can show an employee. Instead of having an employee dropdown field in each widget where they select an employee, I was going to make an inline editor that allowed selecting the employee but also allowed choosing features of the employee to show. I was hoping to avoid redundant code in all my widgets and give a little more flexibility to the user in how an employee is displayed.

I might be over-complicating this and the best solution may be to have an employee dropdown in the widget settings but I thought I'd query the developers here to see if this is a model that they use

0 votesVote for this answer Mark as a Correct answer

Trevor Fayas answered on June 8, 2020 21:07

I think i get what you're going for now, and indeed it may be tricky, there isn't much for 'easy' dynamic widget property dialogues, I think Sean wrote a recent blog article on developing custom widget property dialogues (it's also in documentation) but from what i've seen it's pretty in depth. You would have to make your own custom UI so when you select an employee, it can do a lookup and present the right UI to select the features.

Another option you could possibly do, is just select the employee itself, and then your widget could show certain fields based on the employee type (user wouldn't select it though), or you could try to create some sort of "Display profile" that the user selects on the widget and that display profile grabs and displays differently depending on type type of employee selected...

1 votesVote for this answer Mark as a Correct answer

Matt Larrabee answered on June 8, 2020 22:18

Thanks for your suggestions Trevor. I probably will go with something similar to the additional option you described. If I do get an inline editor of this type working I will post it back here as an example.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.