5102 Posts in 1520 Topics by 1116 members
| Go to End | ||
| Author | Topic: | 3613 Views |
-
Re: Multi Column layouts

23 January 2009 at 8:36pm
Your getCMSFields() method needs to be INSIDE your Page class - not outside the braces as you currently have it
-
Re: Multi Column layouts

23 January 2009 at 10:40pm
jfusco - This tread expalins how to seperate a dynamic list into two colums: http://www.silverstripe.org/data-model-questions/show/252268
DudhaSource- As ajshort said you need to keep you getCMSFields() function inside the {} of your Page class as this function is part of the 'model' (i.e. your Page class) which makes up your page. I would recommend going through the turorials to get an idea of how it all works. Also make sure your file is called Page.php not Page.css.
-
Re: Multi Column layouts

24 January 2009 at 1:54am
Thanks guys,
After some intense work I was finally able to get things to work. But still I m not sure why it din't work before and yes I did consider getCMSFields() function inside the {} . I reinstalled everything from scratch and copied my code and it worked.
I am still referring back to tutorials to get hang of it.
-
Re: Multi Column layouts

20 October 2009 at 5:35am
Hi!
Im very noob with silverstripe and currently trying to learn it. Could someone please help meRealy cant understand why this dosnt work for me. Im getting Database error from sapphire\core\model\MySQLDatabase.php line 401. Table 'ss_firstsite.page' doesn't exist. And it dosnt exist.
This comes after ?flush=1
Here is mysite/code/Page.php
class Page extends SiteTree {
public static $db = array(
'ColumnOne' => 'HTMLText',
'ColumnTwo' => 'HTMLText'
);
public static $has_one = array(
);
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab("Root.Content.ColumnOne", new HTMLEditorField('ColumnOne','Column One Content'));
$fields->addFieldToTab("Root.Content.ColumnTwo", new HTMLEditorField('ColumnTwo','Column Two Content'));
return $fields;
}
} -
Re: Multi Column layouts

20 October 2009 at 9:07am
Antti - have you rebuilt the database by going to yoursite.com/dev/build?
-
Re: Multi Column layouts

30 October 2009 at 4:09am
Thank you willr.
Dont know how i missed that. I realy should consentrate more while reading...
| 3613 Views | ||
| Go to Top |





