Jump to:

5541 Posts in 1738 Topics by 1224 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Customizing the TreeMultiselectField in the CMS

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

Page: 1
Go to End
Author Topic: 599 Views
  • copernicus
    Avatar
    Community Member
    4 Posts

    Customizing the TreeMultiselectField in the CMS Link to this post

    In the admin I have as an option when you create a new item to let you choose which categories it belongs to through a TreeMultiselectField.

    $treeMenu = new TreeMultiselectField('Categories', 'What categories does this belong in?', 'PortfolioCategory');

    PortfolioCategory is a class that extends Page.

    Now, when you click on the drop down to select a category, it just shows the entire site tree. Is there a way to customize it to say, only show Pages of type "PortfolioCategory"?

    Also, is there a way to have an option in the drop down automatically selected by default? Ideally, when you click "Add New Item", the drop down is there and one of the options is already selected and cannot be unselected.

    599 Views
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.