Try our conversational search powered by Generative AI!

Creating a dynamic "Persons control"

Vote:
 

Hi

I need to develop functionality to add info about persons (i.e. name, description, an image) and viewing them on a simple, single page. I would like the editors to be able to add/remove/edit these properties themselves in Edit-mode. What is really the best/simplest way to achieve this?

Some thoughts:

I could go with creating the page with a Repeater-control and fetch these properties (name, description, image) from subpages. This should be fairly easy, it just means that I need to create a separate pagetype for a "Person" holding these properties and create pages for each person I want to add. But I actually don't EPiServer to load a whole page just to get some properties (one should not be able to view a single "Person-page").

Another option would to add these properties directly to my pagetype but then I would need to have some "Number of Persons: X" to set how meny fields there should be to fill in, which I'm not sure if it is possible.

 

So, is it better to try to create a custom property holding a collection of controls (somewhat like the how the built-in LinkCollection property looks like in edit mode)? If so, can anyone point me into the right direction on how to start building such a custom collection property? I really have no clue where to start.

 

Thanks

 

#35850
Jan 01, 2010 18:49
Vote:
 

UPDATE:

I just came across this: http://epidave.blogspot.com/2009/08/storing-business-objects-in-episerver.html

I guess the "Using Pages"-approach is most suitable here as it will be about 10-20 items in the collection (e.g 10-20 subpages) and perhaps I can make a pagetype with holding rather empty "Person"-pages.

Any thoughts on this approach?

#35851
Jan 01, 2010 19:36
Vote:
 
#35852
Jan 02, 2010 11:46
Vote:
 

Thanks! That seems like a more intuitive way of doing it. I'll read through your blog posts and give it a try.

#35853
Jan 02, 2010 15:04
* 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.