November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
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
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.
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.
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:
Anyway, thank you very much for your answer,
Benjamin
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":
I have understand this but for example in my case I will have a block who is supposed to contain:
Every image shoud have the following properties:
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.
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.
Oh no I wasn't aware of this point it could response to my problem then I will investigate it. Thank you very much.
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