Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Angelo 17 posts 38 karma points
    Sep 05, 2012 @ 21:43
    Angelo
    0

    DataTypes / Dataeditors of dropdown

    I have a multilingual website and want to create a Datatype which can be a dropdown and I want to list the values there.

    I know that I can create a custom datatype using the usercontrol wrapper (which will be dropdownlist populated via sql database SELECT clause.)

    I want to fill the dropdown list from the dictionary items so the editors in the backend can edit the text of the dropdown in the dictionary.

    I then want to have this available as multilingual also. so the dropdown gets populated by the language specific dictionary items.

    Could you please help?

    eg. I want to create a dropdown list of "Secret questions". The translators will translate the list in their language.

    So, in English website's backend, the dropdown datatype shows "Secret Questions" list in English. In German website, the dropdown datatype should show in German.

    I assume that the value of the Secret questions dropdown will store the ID as the value.

    Please help and help.

    Thanks.

  • Hendy Racher 863 posts 3847 karma points MVP 2x admin c-trib
    Sep 05, 2012 @ 22:06
    Hendy Racher
    1

    Hi Angelo,

    If you want to populate a dropdownlist from a SELECT clause, have you seen the uComponents SQL DropDownList data-type ? 

    You can pass in the @CurrentId, so from there figure out the language ?  (is that too much logic in the SQL layer ?)

     

  • Angelo 17 posts 38 karma points
    Sep 06, 2012 @ 07:10
    Angelo
    1

    Thanks so much Hendy.

    But I want to allow from the backend for the editor/translator able to edit the items of the dropdown.

    Any thoughts?

  • Tom Fulton 2030 posts 4996 karma points c-trib
    Sep 06, 2012 @ 16:57
    Tom Fulton
    0

    Hi Angelo,

    If you want editors to manage the items, without having to give them access to the Developer section, I think there are only 2 options:

    1 - Create the items as content nodes outside of your site's tree, and use XPath Dropdownlist to read them

    2 - Use a normal dropdownlist datatype and check out this package:  Dashboard Prevalue Editor  -  not used it myself but it may do the trick.

    -Tom

  • Angelo 17 posts 38 karma points
    Sep 06, 2012 @ 17:37
    Angelo
    0

    Thanks Tom. Your suggestion is nice. :)

    This is what I have done till now.

    I created a dictionary item and defined the list of secret questions like this:

    1,My first pet
    2,My first teacher
    3,My Passport number

    This gets translated in different language dictionary section. this 1,2,3 numbers remain fix.

    I created a usercontrol to read this dictionary variable and create the dropdown. Then I  added the wrapper around it and made it a datatype.

    Now, this is working fine and showing the translated dropdown in the backend. Also, the translators can translated the items easily.

    The only thing here is that the following structure need to be maintained for it to work.

    KEY,VALUE 
    KEY,VALUE

    Another work around is that I create two dictionary items. One containing only the KEY and another only the VALUE. This can also work. Here we need to be sure that if a new value is added, the key also has to be added.

     

Please Sign in or register to post replies

Write your reply to:

Draft