I have a problem similar described on the silverstripe problem: [http://www.silverstripe.org/dataobjectmanager-module-forum/show/19853][1]
I have a working DataObject, wich mainly provides a Title, Caption and Image. This goes in an has_many, which should provide a slider in the template output.
The CMS part is all done, meaning I can add multiple 'slides' from a tab in the SiteConfig. Only the output in the template won't seem te happen.
For the codes I use:
SingleSlide extends DataObject:
public function getCMSFields_forPopup()
{
return new FieldSet(
new ImageUploadField('SlideImg', 'Afbeelding van slide'),
new TextField('SlideTitle'),
new TextField('SlideCaption'),
new SimpleSiteTree('SlideLinkID')
);
}
In SiteConfigOverride
$fields->addFieldToTab('Root.SliderA', new ComplexTableField(
$this->owner, 'SliderA', 'SingleASlide',
array('SlideImg' => 'Afbeelding van slide', 'SlideTitle' => 'Titel van Slide', 'SlideCaption' => 'Tekst bij slide', 'SlideLink.Title' => 'Link naar pagina'
)));
All left to do is be able to get the Output from here in the template. Any help would be great!
Regards,
Kay