This project is read-only.

Bucket "List" Content Field

Topics: Core, Customizing Orchard
Sep 20, 2013 at 1:24 AM
Edited Sep 20, 2013 at 1:28 AM
I was trying to manage how I could add a clean Dropdown List with hierarchies last night with Taxonomies in a contact form. But the problem with Taxonomies is that they don't have a field for describing each level ; though I could add one but did'nt liked the idea. Example : I have a Country wich have States wich have Towns. In a taxonomy I would have :
        etc ....
My dropdownlists would need to fill themselves according to their selected parents. This is where Buckets "List" would be really interesting since they are a great fit for this kind of use. I was asking myself if you already had a plan to do a "List" Content Field so that we could add this to a Content Type ? If not then I could look at it.

Sep 20, 2013 at 1:53 AM
I don't get it. Taxonomy terms for a given taxonomy have their own content type. Why don't you add fields to that?
Sep 20, 2013 at 2:27 AM
Edited Sep 20, 2013 at 2:29 AM
Maybe I can illustrate what I want to achieve.

Country (label)
---dropdownlist wich includes terms (first level of Region Taxonomy)

State / Province (label)
---dropdownlist wich includes terms (second level of Region Taxonomy)

Then I get a content type named Region Term on wich if I add a text field named Label I can set a label for each terms. (We both know that)

But I think it would just be cleaner if I could use Content Type Hierarchies to achieve this. I'm not sure if I want to enter Labels on each terms everytime. Also, since Content Fields are extensible I thought it could be an idea to just add some other ways to display those controls out of the box. But Bertrand, I'm not the architect so you can tell me if I'm wrong =D
Sep 20, 2013 at 3:13 AM
I don't see what's stopping you with taxonomies. You can already get the list of terms under a parent term (your labels). You can edit the term type to add your text field already. What am I missing?
Sep 20, 2013 at 3:18 AM
I can't define what each levels of terms are.

First level is Country
Second level is State
Third level is Town

We know by looking at terms what they are but I don't get a field to determine what each levels are.
Sep 20, 2013 at 3:19 AM
So then you can infer it from the depth of the term in the taxonomy.
Sep 20, 2013 at 3:49 AM
So then you suggest I add a field to Taxonomy Content Type to infer this ? Or you say that the level already infer it ?
Je me demande pourquoi j'écris en anglais =D
Sep 20, 2013 at 5:56 AM
I understand what you mean there Bertrand but what I mean is that it could be easier with a Content Field that would already have a display with Dropdown Lists that autofills. There just not only one road to get there. But as a lambda user that wants to create a custom form... I don't think I would even think about the Taxonomies. That's why I got this idea ; that can be right or wrong depending on the point of view. As a developper I can manage to do this in X different ways ...
Sep 20, 2013 at 6:16 AM
Autofills how? You'll have to write logic for that. If you're going to do that, you can just do away with the extra field. I'm sorry, I really don't see the point.
Sep 20, 2013 at 6:26 AM
Maybe we are just not seeing things the same way. It's plain simple to write JQuery that would handle Dropdownlist with hierarchies. But using an added field to a Content Type to manage it is not what a lambda user will want. If I want to let people create custom forms on a website they will want simple controls that works simply without writing JQuery that's why. That's the point.
Sep 20, 2013 at 6:41 AM
Of course it's simple to write such a script. That's not at all what I'm saying. And I agree that you shouldn't have to add a field. I've been trying to tell you that you don't need it, as you can already infer everything you need.
I think you're asking for the feature that you want to be implemented in core, right? Well, your feature is actually pretty specialized and would be much better implemented as a third-party module. If it happens, after that, to be super-helpful and we determine that we want it in core, then we would consider taking it in. Just trying to explain how things usually work ;)
Sep 20, 2013 at 7:02 AM
Edited Sep 20, 2013 at 7:03 AM
It written between the lines ;)
I'm not talking about making it in Core actually was just asking if it would be super-helpfull and how you would do it so that it be !
I like to do things not just for myself ... so I ask before I do. And you are the benevolent dictator (paradoxal) here so ... you have the right to say it's pointless even if I will have fun doing it. Yay ! I'm going to bed soon ;)

By the way ... you presumed I wanted it in core ;)
Sep 20, 2013 at 8:03 AM
If it's useful to you, then it's useful. Go for it.
Sep 20, 2013 at 4:07 PM
Yeah it will be usefull for my future clients ;)