7912 Posts in 1355 Topics by 930 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » DataObjectManager Code Examples
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
| Go to End | Next > | |
| Author | Topic: | 17790 Views |
-
DataObjectManager Code Examples

21 May 2009 at 2:40am Last edited: 21 May 2009 2:40am
I have had a lot of requests for the code examples from the original DOM tutorial. These have since been removed from the SVN channel because people were complaining, rightfully so, about all of the extra page types it was creating. For reference, the original code and templates are here:
<br >
<br >http://www.carlinowebdesign.com/assets/dataobjectmanager_examples.zip -
Re: DataObjectManager Code Examples

11 June 2009 at 9:51pm
and add this to ResourcePage.php to get it working:
class ResourcePage_Controller extends Page_Controller {
} -
Re: DataObjectManager Code Examples

12 June 2009 at 2:29am
Actually, I just had a look and it's already there. Am I missing something?
-
Re: DataObjectManager Code Examples

30 June 2009 at 6:29am
DataObjectManager Video/Audio Code Examples
http://www.carlinowebdesign.com/assets/DataObjectManager_media_examples.zip
-
Re: DataObjectManager Code Examples

18 August 2009 at 9:01pm
Hi Uncle Cheese thanks for the great work done on Gallery and DataObjectManager. I am currently using both which are fine. I have a request. I am using the resourcepage example which is working fine. I have put catergories in CMS and want to split the PDF datasheets into these categories on the site itself. How would I go about doing this?
Steve
-
Re: DataObjectManager Code Examples

19 August 2009 at 1:40am
I've explained this a number of times. I think it definitely belongs in a sticky.
Try this..
MyResourceHolder_Controller extends Page_Controller
{
function category()
{
$resources = DataObject::get("MyResourceObject","Category='".$this->urlParams['ID']."'");
if($resources) {
return $this->customise(array(
'Resources' => $resources,
'CategoryTitle' => $this->urlParams['ID']
));
}
return false;
}
}/my-resource-holder/category/foo
MyResourceHolder_category.ss
$CategoryTitle
<% control Resources %><% end_control %>
-
Re: DataObjectManager Code Examples

20 August 2009 at 4:31am
Thank you my good man. Will get this up and running in no time.
| 17790 Views | ||
| Go to Top | Next > |

