Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Dynamic Data in edit mode

Vote:
 

Hi all, i am looking for a way to give editors the ability to add/update hierarchical lookup data in EditMode, that will be used throught the site. For example, i want the editor to be able to go into edit mode and add a car make and its related models.

|-Nissan
|    |-Almera
|    |-Primera
|-Honda
|    |-Accord

This data will then be used in the site and populate dropdownlists. So if a visitor selects a make, a second dropdownlist will populate with the appropriate models.

I was thinking of trying to achieve this via a custom property but i'm not sure how to do this. It would be nice for it to render like the linkCollection property in edit mode.

Any help would be much appreciated.

#41067
Jun 30, 2010 16:13
Vote:
 

We've used LinkCollections for this in the past, but this is a really flawed method, because they can pick ANY page (not just related car models), or they could add links to random hyperlinks, which won't help you either.

EPiServer has the Page property, but that only allows one link, and it doesn't allow you to limit what they link to.

To do this, we generally write a custom property.  This allows us to:

  1. Limit the PageType they can pick
  2. Limit the locations they can pick from
  3. Allow them to pick multiple other pages

EPiServer really needs a built-in property like this.  You should be able to have a "Multiple Page" property, from which you can limit selections as I noted above.

Intergen released a Multi-page Property, but I didn't see how that was much different than the LinkCollection (very good chance I was using it wrong).

Itera released a Multi-Property, which allows you to roll-up multiple EPiServer properties in a single "container" property, which would likely work for you, but it still doesn't solve the problems of limiting selections.

#41162
Jul 02, 2010 15:23
Vote:
 

Like you say, a custom property is the way to go with this one. I'd consider storing the car brands and models as categories, and using the properties settings for choosing a root category and listing its children in the drop down control (see http://www.frederikvig.com/2010/05/episerver-custom-property-with-custom-settings/). You then need to write a little JavaScript code that listens to the select elements change event and populates the model drop down (you can also use the OnSelectedIndexChange event on the server for this).

Hope this helps.

Frederik

#41170
Jul 04, 2010 19:25
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.