Hello
I'm trying to use dataobjectmanager so I tried to folow the example provided in :
http://doc.silverstripe.org/modules:dataobjectmanager
It works ok as far as creating page type (I get the user interface page as shown).
Now it seems that I don't get something regarding the template and my question is what should be its name (Testimonials or TestimonialPage ?) and what is the the variable(s) I should put in it:
$Testimonials or $Testimonial .
Everytime I try to see it on the draft site I get :
ModelAsController::getNestedController() returned bad object type 'TestimonialPage'
& also this :
Source
61 }
62
63 try {
64 $result = $this->getNestedController();
65
66 if($result instanceof RequestHandler) {
67 $result = $result->handleRequest($this->request);
68 } else if(!($result instanceof SS_HTTPResponse)) {
69 user_error("ModelAsController::getNestedController() returned bad object type '" .
70 get_class($result)."'", E_USER_WARNING);
71 }
72 } catch(SS_HTTPResponse_Exception $responseException) {
73 $result = $responseException->getResponse();
74 }
75
76 $this->popCurrent();
Trace
* ModelAsController::getNestedController() returned bad object type 'TestimonialPage'
Line 70 of ModelAsController.php
* ModelAsController->handleRequest(SS_HTTPRequest)
Line 283 of Director.php
* Director::handleRequest(SS_HTTPRequest,Session)
Line 127 of Director.php
* Director::direct(/new-testimonialpage-2/)
Line 127 of main.php
I have to say I'm lost as I'm not a 'pro' develloper
(if someone can provide me the Testimonial template it would be a great help for me to understand)
Thanks a lot if someone can help me finish the example
T