17452 Posts in 4473 Topics by 1971 members
|Go to End|
23 September 2007 at 11:40pm
Ok I've found out that when I want to add fields to my member table, I should use DataObjectDecorator.
I also found out that
belongs in _config.php (please add this to http://doc.silverstripe.com/doku.php?id=dataobjectdecorator, wasn't obvious at all to me, but maybe I'm stupid)
Now I have:
class PhotoMemberRole extends DataObjectDecorator
'db' => array(
'Website' => 'Varchar',
'City' => 'Varchar',
'PostalCode' => 'Int'
Now how do I add those fields to my cms? Could I just use the regular function getCMSFields() for it?
Q2: why would I need augmentDatabase()? Does it do anything else than adding fields like extraDBFields()? It probably does, but then, why do I need to use them BOTH like the forum does?
24 September 2007 at 2:47am
Found part of my answer on:
|Go to Top|