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   513 Views

Avatar
bit99

14 April 2011 at 7:30pm Community Member, 24 Posts

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

14 April 2011 at 8:33pm Forum Moderator, 5511 Posts

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