Sitecore page editor dropdown

619 Views Asked by At

I would kindly ask for your help :) From couple of days I am trying to achieve "linked" custom field in content editor and dropdown in page editor. Basically I want to have dropdown in page editor and content editor which are responsible for a same thing.

In my c# code i have enums which represent directions. I created custom field which accepts assembly and class with overridden onload method and successfully populate dropdown values in the content editor. So far so good but i have no idea how to create dropdown which will represent the same functionality inside page editor. So please give me any ideas...

1

There are 1 best solutions below

0
On

Judging from your reply to my comment you need to think of the following: How is my field value being rendered onto a page?

If you are always using 1 control to do this then you just need to ensure that this control has 2 different rendering modes depending on the Context.PageMode

But as I understand it you want this dropdown to also appear when someone renders your custom field using a <sc:FieldRenderer>. In this case you'll need to look into the RenderField pipeline of Sitecore. There you find a processor called RenderWebEditing. Possibly through some manipulation here you can get your dropdown appear as you wish.