Jump to:

5540 Posts in 1738 Topics by 1224 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Populating The TreeDropdownField or TreeMultiselectField With Categories

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 904 Views
  • davede
    Community Member
    24 Posts

    Populating The TreeDropdownField or TreeMultiselectField With Categories Link to this post

    Hi all,

    Still very new to SS. Any help would be much appreciated in getting our categories ability functioning for all pages.

    We'd like to present a hierarchical list of checkboxes in the CMS so that multiple categories can be selected for a page. Categories would have sub-categories and maybe sub-sub-categories. Pages can have many categories/subcategories/sub-sub-categoires and vice versa.

    Say we created a database table by creating a class to extend dataobject that held all the categories, sub categories etc. Would we be able to populate the TreeMultiSelectField or TreeDropdownField using the table we created?

    It seems like TreeDropdownField or TreeMultiselectField would be the most appropriate choice for a hierarchical checkbox. However I'm not quite sure whether it has to work off the SiteTree only.

    I've considered the ComplexTableField field but that would seem utterly repetitive if it were presented like so:

    select category

    Checkbox | Category (Country) | Sub-Category (City )
    | Australia | Sydney
    x | Australia | Melbourne
    | Australia | Brisbane
    x | New Zealand | Wellington
    | New Zealand | Auckland

    (seems like the editor here messed up my table - oh well you get the idea hopefully).

    As I said still very new to SS so maybe there is something I'm missing about how we can tackle this challenge. Any suggestions/ help at all would be very much appreciated.

    Other threads i've found related to the problem include this one: http://silverstripe.org/general-questions/show/7470

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.