Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

DataObjectManager Module

Discuss the DataObjectManager module, and the related ImageGallery module.

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

DataObjectManager Code Examples


Go to End
Reply

84 Posts   20998 Views

Avatar
UncleCheese

21 May 2009 at 2:40am (Last edited: 21 May 2009 2:40am), 4085 Posts

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

Avatar
lxer

11 June 2009 at 9:51pm Community Member, 16 Posts

and add this to ResourcePage.php to get it working:

class ResourcePage_Controller extends Page_Controller {
}

Avatar
UncleCheese

12 June 2009 at 2:27am 4085 Posts

Thank you! I'll add that in.

Avatar
UncleCheese

12 June 2009 at 2:29am 4085 Posts

Actually, I just had a look and it's already there. Am I missing something?

Avatar
UncleCheese

30 June 2009 at 6:29am 4085 Posts

DataObjectManager Video/Audio Code Examples

http://www.carlinowebdesign.com/assets/DataObjectManager_media_examples.zip

Avatar
stevanovich

18 August 2009 at 9:01pm Community Member, 60 Posts

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

Avatar
UncleCheese

19 August 2009 at 1:40am 4085 Posts

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 %>

Avatar
stevanovich

20 August 2009 at 4:31am Community Member, 60 Posts

Thank you my good man. Will get this up and running in no time.

Go to Top