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.

Customising the CMS /

possible doc pages correction


Reply


2 Posts   517 Views

Avatar
bit99

Community Member, 24 Posts

14 April 2011 at 7:30pm

Hi,

Just noticed something that seems odd at:
http://silverstripe.org/sapphire-code-samples/

states that to add an image field:
static $db = array( 'Role' => 'text', 'StaffPhoto' => 'image' );
.....

But, shouldnt it be:

static $db = array(
      "Role" => "Text"
   );

static $has_one= array(
      "StaffPhoto" => "Image"
   );

or?
seems to work for me this way anyways.
Thanks,

Avatar
Willr

Forum Moderator, 5513 Posts

14 April 2011 at 8:33pm

Thanks, updated. Looks like the writers got a little over confident in their abilities!