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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

CustomSiteConfig content from tabs --> to html content

Go to End

3 Posts   739 Views


Community Member, 3 Posts

23 November 2011 at 10:23pm

I have a sidebar in my site where should be a logo list.
Logos would be editable from backend.

I think I have done my backend stuff, CustomSiteConfig and datamodel correctly,
but I don't know how to pull this information into html content.



class CustomSiteConfig extends Extension {
   function extraStatics() {
      return array(
         'has_many' => array(
            'Logos' => 'Logo'

   public function updateCMSFields(FieldSet &$fields) {
      $manager = new DataObjectManager(
      $fields->addFieldToTab("Root.Logot", $manager);




class Logo extends DataObject
static $db = array (
	'Name' => 'Text',
	'AltText' => 'Text',
	'Link' => 'Text'	
static $has_one = array (
	'SiteConfig' => 'SiteConfig',
	'LogoImage' => 'Image',
	'LogoPage' => 'SiteTree'
public function getCMSFields_forPopup()
		return new FieldSet(
			new TextField('Name'),
			new TextField('Link'),
			new TextField('AltText'),
			new ImageField('LogoImage')


Forum Moderator, 4102 Posts

24 November 2011 at 4:17pm

<% control SiteConfig.Logos %>

Silverstripe tips, tutorials, screencasts, and more.


Community Member, 3 Posts

24 November 2011 at 8:52pm

<% control SiteConfig.Logos %>
<% end_control %>

Like this?
It just doesn't work.. Maybe there's something from with my files after all :(