7911 Posts in 1354 Topics by 930 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » Two DataObject within one Page
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 682 Views |
-
Two DataObject within one Page

16 June 2011 at 9:15pm
Hi,
I would like to know is it possible to use two DataObject within one page
I have the following code within my module- ResourceItem.php ---> DataObject
- ActivityItem.php ---> DataObject
- LocationPage.php ---> PageI really appreciated for your kindness advice and tutorials.
Bunheng
-
Re: Two DataObject within one Page

17 June 2011 at 5:24am
static $has_many = array (
'ResourceItems' => 'ResourceItem',
'ActivityItems' => 'ActivityItem'
);--------------------
SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com -
Re: Two DataObject within one Page

17 June 2011 at 9:50pm
Hi,
How can we put in function GetCMSField() with two different DataObjects.
Regards,
Bunheng -
Re: Two DataObject within one Page

18 June 2011 at 8:23am
new DataObjectManager($this,'FirstDataObjects','FirstDataObject')
new DataObjectManager($this,'SecondDataObjects','SecondDataObject');
| 682 Views | ||
|
Page:
1
|
Go to Top |
