Jump to:

3450 Posts in 1063 Topics by 738 members

Data Model Questions

SilverStripe Forums » Data Model Questions » Current page Treemultiselectfield?

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

Page: 1
Go to End
Author Topic: 1061 Views
  • Mo
    Avatar
    Community Member
    508 Posts

    Current page Treemultiselectfield? Link to this post

    I am not quite sure how to describe what I am trying to do (which doesn't help), but I will try my best.

    My first level page has two sets of available navigation, generated from two TreeMultiselectFields in the CMS. I need a way of dynamically discovering if the current sub page is in one list of the other, and then generate the required list as navigation ont hat page too.

    I was thinking I need to use Dataobject::get() and then run a comparison in the Controller class, but I am not really sure the best way to do this??

    Any help is greatly appreciated!!

    Mo

  • Mo
    Avatar
    Community Member
    508 Posts

    Re: Current page Treemultiselectfield? Link to this post

    Right, maybe I can refine this a bit:

    How can I retrieve the results of a TreeMultiselectField from a parent?

    The TreeMultiselectField is Called 'Box1Options'.

    I have tried:

    - $Results = $this->Parent()->Box1Options;
    - $Results = Dataobject::get($this->Parent())
    $Results->Box1Options

    And a couple of other things too. I cant seem to get the results.

    Mo

    1061 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.