3066 Posts in 866 Topics by 648 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 576 Views |
-
want many_many relation maintained on both ends

10 August 2010 at 1:36am
Hello,
i need an many_many relation between all Pages that is maintained on both ends
for now my code looks like this:
class Page extends SiteTree {
static $many_many = array(
'Pages' => 'Page'
);$pagesList = DataObject::get('Page');
$fields->addFieldToTab('Root.Content.Relations', new CheckboxSetField('Pages', '', $pagesList));....
but i want also the Checkboxes 'checked' that are related.
So I need a way to ask about the PageID that is related to the ChildID to get both ends of the Relation. Also for the Controller-Class
Cheers,
Mat
| 576 Views | ||
|
Page:
1
|
Go to Top |

