EditorDescriptors

Vote:
 

Hello,

I am new in the EPiServer world. I would like to have a custome editor for my images. This editot should contain a picture of course but also all the meta data like the alternate text, the width, height, ...

For of all If you have an example of this kind of editor with more than one field in it it will be great :) But if not, if I understand the documentation correctly I need to implement a custom EditorDescriptors. Correct? Then I need to change the ClientEditingClass to a custom one. And after that I will need to wrte my own dojo plugin?

If you have some documentation or example for this it will be great.

REgards,

Benjamin

#70868
May 02, 2013 15:33
Vote:
 

Hi,

There are some blogs created by Linus Ekstrom about this.
This one for example: http://world.episerver.com/Blogs/Linus-Ekstrom/Dates/2012/11/Creating-a-more-advanced-property-editor/

However, are you sure that what you are trying to accomplish can't be achieved by using Blocks?

Greetings,

Martijn

#70873
May 02, 2013 17:44
Vote:
 

Hi Martijin

I think most people who asked this question are actually looking for a multi property control, as far as I know, current EPiServer 7 doesn't support  the collection of blocks, which cause a big pain for us, the way to build the custom property and UI is very hard and deep learning curve. I asked few times in the forum, seems EPiServer team doesn't really care this and no clear future indication so far. 

#70882
May 03, 2013 4:51
Vote:
 

As Martin pointed out above, blocks is the way to accomplish this. Just add a block with whatever properties you like (URL to image, alternate text etc.) and add a property with the block type to your model and the UI should auto-assemble based on the properties in the block.

Regarding lists of blocks, that's another feature that we are well aware of. If you are interested in knowing more about that I suggest joining the TAP (technology adaptaion program) for the next release.

#70886
May 03, 2013 7:53
Vote:
 

Sorry I did had the access right on this portal to edit my own post :-)

I am use to use some other CMS like Sitecore, Tridion or Umbraco and all of them have the possibility to create relativelly easilly some custom fields types so I am surprised to see that it is not the case here.

Ok for the block it is a way to bypass this but it is not the same as a custom field because:

  • it is not really reusable as is
  • the end user doesn't see that all this set of field are some meta data related to the image field
  • you doesn't have an editor for it when you select the picture

Anyway, thank you very much for your answer,

Benjamin

#71119
May 10, 2013 9:00
Vote:
 

Hi again Kapoue!


I think that you have probably missed something with the usage of blocks as page properties. Using blocks as page properties is a simple ways of creating complex properties with several settings without having to spend much time. Check out this blog post and specifically the part "Using our new block type as a property on a page type":

http://world.episerver.com/Blogs/Alexander-Haneng/Dates/2012/8/How-to-create-a-simple-Block-Type-in-EPiServer-CMS-7/

#71121
May 10, 2013 9:33
Vote:
 

I have understand this but for example in my case I will have a block who is supposed to contain: 

  • 3 pictures
  • 1 richtext field
  • 1 link

Every image shoud have the following properties:

  • Width
  • Height
  • Alternate Text
  • Rounded corner
  • ...

So, If I doesn't have my custom field, I will need to repeat all those properties repeated for image field so I will have image 1 width, image 2 width, ... for me all those meta properties should be stored into the image 1 field. But ok I can understand that it is a cms limitation.

Thank you for your help on it.

#71128
May 10, 2013 11:06
Vote:
 

Are you aware that you can nest blocks? For instance having the outer model class like:

public class ModelClass

{

public virtual ImageBlock Image1{get;set;}

public virtual ImageBlock Image2{get;set;}

public virtual ImageBlock Image3{get;set;}

public virtual XhtmlString Description{get;set;}

}

public class ImageBlock

{

public virtual Url ImageUrl{get;set;}

public virtual int Width{get;set;}

public virtual int Height{get;set;}

}

The only thing that there is no built in support for at the moment is to have Lists/Collections of a dynamic number of blocks.

#71143
May 10, 2013 16:38
Vote:
 

Oh no I wasn't aware of this point it could response to my problem then I will investigate it. Thank you very much.

 

#71144
May 10, 2013 16:40
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* 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.