7935 Posts in 1536 Topics by 943 members
|Go to End|
30 July 2009 at 5:01am
I am working with the DOM and I have to say works pretty well. I have one issue though. How do I get the data from the CMS to display on the front end?
I followed the sample code form the DOM tutorial page. But once the data is placed and I view the page on the front end it does not display the template or any of the data.
I would appreciate the help thanks.
31 July 2009 at 1:14am
31 July 2009 at 12:40pm Last edited: 31 July 2009 12:49pm
Here is my code. I am assuming that i have too make a template for the testimonials page, But since i am a noob I am not sure how.
I guess my question is how do I get the data to appear on the page?
class Testimonial extends DataObject
static $db = array (
'Date' => 'Date',
'Author' => 'Text',
'Quote' => 'HTMLText'
static $has_one = array (
'TestimonialPage' => 'TestimonialPage'
public function getCMSFields_forPopup()
return new FieldSet(
class TestimonialPage extends Page
static $has_many = array (
'Testimonials' => 'Testimonial'
public function getCMSFields()
$f = parent::getCMSFields();
$f->addFieldToTab("Root.Content.Testimonials", new DataObjectManager(
array('Date' => 'Date','Author'=>'Author','Quote' => 'Quote'),
31 July 2009 at 2:19pm
I would encourage you to download the example code or read the tutorials on DOM to get a good introduction.
|Go to Top|