Developer forum

Forum » Development » Custom Editor for Items - One that opens in a new window

Custom Editor for Items - One that opens in a new window

Martin Nielsen
Reply

Hi Guys,

Have any of you created you own Editor for Items yet?

I'm looking for inspiration/sample code for creating a new EditorField that works much like the standard File selector, eg.:

- you click a button
- you browse aroud a new window
- you click an element
- the selected elements value is moved to your item editor field.

Are there any built-in helpers for this that we can use?

// Martin


Replies

 
Nicolai Høeg Pedersen
Reply

Hi Martin

I can give you any source code from Dynamicweb if you would like that. You can use our filemanager or reuse (parts of) the filemanager control.

BR Nicolai

 
Mikkel Ricky
Reply

Take a look at "Implementing your own field editor" on http://developer.dynamicweb-cms.com/documentation/for-developers/item-based-structure/using-field-editors.aspx. Basically you just have to implement the BeginEdit and EndEdit methods. In Dynamicweb 8.5 it will also be possible to implement a custom RenderValue method that will control how the field value is actually rendered in the frontend.

Best regards,
Mikkel

 
Martin Nielsen
Reply

Hi Nicolai,

I'd like to see some code for the FileManagerEditor,

Is the filemanager editor created via the public EditorField API aswell?

// Martin

 

 
Nicolai Høeg Pedersen
Reply

Hi Martin

Attached the code that we use. It uses Gui.Filemanager internally. Let me know if you need that code as well.

Nicolai

 

You must be logged in to post in the forum