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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Customising the CMS /

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

possible doc pages correction


Go to End


2 Posts   930 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, 5523 Posts

14 April 2011 at 8:33pm

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