5099 Posts in 1519 Topics by 1116 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1644 Views |
-
[Solved] Adding field to CMS tab - SilverStripe 2.4.0

6 July 2010 at 3:00am Last edited: 7 July 2010 5:18am
Hi. I was trying to add special field like this:
public static $db = array(
'VideoURL' => 'Text'
);function getCMSFields() {
$fields = parent::getCMSFields();$fields->addFieldToTab('Root.Content.Main', new DateField('VideoURL'), 'Content');
return $fields;
}but this gave me no result (I don't see field in CMS). I'm using SilverStripe 2.4.0
-
Re: [Solved] Adding field to CMS tab - SilverStripe 2.4.0

6 July 2010 at 5:38am
Did you flushed the database, with www.mysite.com/dev/build
???? -
Re: [Solved] Adding field to CMS tab - SilverStripe 2.4.0

6 July 2010 at 5:41am
Of course I did. It created necessasy records.
-
Re: [Solved] Adding field to CMS tab - SilverStripe 2.4.0

6 July 2010 at 6:13am
Hi!
How do you expect to store a Text field in the database by using a DateField field in the CMS?
-
Re: [Solved] Adding field to CMS tab - SilverStripe 2.4.0

6 July 2010 at 6:58am
Oh, sorry. Anyway it doesn't work.
-
Re: [Solved] Adding field to CMS tab - SilverStripe 2.4.0

7 July 2010 at 3:38am Last edited: 7 July 2010 3:39am
Here: http://pastie.org/1032801 is full code of VideoPage.php
-
Re: [Solved] Adding field to CMS tab - SilverStripe 2.4.0

7 July 2010 at 4:10am
The function getCMSFields() should be in the model (VideoPage class), not in the controller.
-
Re: [Solved] Adding field to CMS tab - SilverStripe 2.4.0

7 July 2010 at 5:18am
Thanks. Stupid mistake.
Solved.
| 1644 Views | ||
|
Page:
1
|
Go to Top |


