Jump to:

5542 Posts in 1739 Topics by 1225 members

Customising the CMS

SilverStripe Forums » Customising the CMS » possible doc pages correction

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

Page: 1
Go to End
Author Topic: 503 Views
  • bit99
    Avatar
    Community Member
    24 Posts

    possible doc pages correction Link to this post

    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,

  • Willr
    Avatar
    Forum Moderator
    5508 Posts

    Re: possible doc pages correction Link to this post

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

    503 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.