Copied to clipboard

Flag this post as spam?

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


  • djscorch 67 posts 106 karma points
    Jan 31, 2012 @ 22:20
    djscorch
    0

    Managing DDL values via the CMS.

    I have a form with a drop down list on it. The client wants to manage the values in the DDL via the CMS. Which is the best approach, I was thinking a CSV list on the form doctype, or create a custom DDL datatype and use the values from that?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jan 31, 2012 @ 23:34
    Jan Skovgaard
    0

    Hi djscorch

    You should be able to define a datatype based on the "ultimate picker" where you can set a root node on the content section and then create a branch, with the possible values in the drop down list instead.

    You should be able to fetch the possible values in your user control as well.

    Hope this helps.

    /Jan

  • djscorch 67 posts 106 karma points
    Feb 01, 2012 @ 11:20
    djscorch
    0

    So have a node in the content section called for example "DDL Values", then created nodes under this that are the DDL values? Why would I need a new datatype?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Feb 02, 2012 @ 19:36
    Jan Skovgaard
    0

    Hi djscorch

    I'm thinking about a structure like this

    DLL values (could be doctype: dllvalues)
         value (could be doctype: dllvalue)
         value
         value
         etc. 

    For each value you need you create a value document type, with or without any custom properties on it.

    If you do the above you need a datatype based on for instance MultiNodeTreePicker from uComponents or the Ultimate Picker datatype where you can specify a dropdownlist, which is fetching the content from the "DLL values" node.

    In this way you can place a picker on the rest of your normal pages, where you can select the from the values stored in the "DLL values" branch. This way you just need to add or remove values once the picker has been setup and configured on the pages where you need it. (In the forms documentype in your case).

    If you have a list of CSV files you can use CMSimport to import and map them to the value doctypes (if it's less than 500 it's free to use, if it exceeds this limit you'll need to pay 99€ if I remember correctly.)

    Hope this outlines my suggestion a little better - hope it makes sense to you.

    /Jan

  • djscorch 67 posts 106 karma points
    Feb 02, 2012 @ 20:19
    djscorch
    0

    Ah, I follow what you mean, however, I need the values on a form within a user control. From my understanding it's not possible to add a custom data type on a user control?

    I got round the issue by creating a [DLL Values] doctype then a DLL Value doctype as suggested and created

    DLL values (could be doctype: dllvalues)
         value (could be doctype: dllvalue)
         value
         value
         etc. 

    in the content tree. Then I used a foreach loop to add the values from each node to my DDL within the user control.

Please Sign in or register to post replies

Write your reply to:

Draft