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.

Themes /

Discuss SilverStripe Themes.

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

Problem with customsiteconfig with woody theme


Reply


2 Posts   744 Views

Avatar
elusive

Community Member, 3 Posts

7 May 2013 at 6:09am

Guys, i need your help!
Error:
Strict Standards: Declaration of CustomSiteConfig::extraStatics() should be compatible with that of DataExtension::extraStatics() in /var/www/elusi489/data/www/mestocrimea.ru/mysite/CustomSiteConfig.php on line 59

File:

<?php

class CustomSiteConfig extends DataExtension {

function extraStatics() {
return array(
'db' => array(
                  
         'Tekst1' => 'HTMLText',
         'Tekst2' => 'HTMLText',
         'Tekst3' => 'HTMLText',
         'Tekst4' => 'HTMLText',
         'Tekst5' => 'HTMLText',
         'Tekst6' => 'HTMLText',
         'Facebook' => 'Text',
         'Youtube' => 'Text',
         'Twitter' => 'Text',
         'Google' => 'Text',

),
'has_one' => array(
'Ban1' => 'Image',
            'Ban2' => 'Image',
            'Ban3' => 'Image',
            'Ban4' => 'Image',
            'Ban5' => 'Image',
            'Ban6' => 'Image',
)
);
}

public function updateCMSFields(FieldList $fields) {

$fields->addFieldToTab('Root.Banners', new ImageField('Ban1', 'Banner 1'));
      $fields->addFieldToTab('Root.Banners', new ImageField('Ban2', 'Banner 2'));
      $fields->addFieldToTab('Root.Banners', new ImageField('Ban3', 'Banner 3'));
      $fields->addFieldToTab('Root.Banners', new ImageField('Ban4', 'Banner 4'));
      $fields->addFieldToTab('Root.Banners', new ImageField('Ban5', 'Banner 5'));
      $fields->addFieldToTab('Root.Banners', new ImageField('Ban6', 'Banner 6'));
      
      $fields->addFieldToTab('Root.Texts', new TextareaField('Tekst1', 'Text 1'));
      $fields->addFieldToTab('Root.Texts', new TextareaField('Tekst2', 'Text 2'));
      $fields->addFieldToTab('Root.Texts', new TextareaField('Tekst3', 'Text 3'));
      $fields->addFieldToTab('Root.Texts', new TextareaField('Tekst4', 'Text 4'));
      $fields->addFieldToTab('Root.Texts', new TextareaField('Tekst5', 'Text 5'));
      $fields->addFieldToTab('Root.Texts', new TextareaField('Tekst6', 'Text 6'));
      
      $fields->addFieldToTab('Root.SocialLinks', new TextareaField('Facebook', 'Facebook'));
      $fields->addFieldToTab('Root.SocialLinks', new TextareaField('Youtube', 'YouTube'));
      $fields->addFieldToTab('Root.SocialLinks', new TextareaField('Twitter', 'Twitter'));
      $fields->addFieldToTab('Root.SocialLinks', new TextareaField('Google', 'Google'));

      
}

}

Avatar
Webdoc

Community Member, 333 Posts

13 May 2013 at 10:42pm

What version on Silverstripe are u using?

Arvixe Web Hosting / SilverStripe Community Liaison | Looking for quality [url=http://www.arvixe.com/preloaded_silverstripe_hosting/]SilverStripe Web Hosting[/url]? Look no further than [url=http://www.arvixe.com/]Arvixe Web Hosting[/url]!