5098 Posts in 1518 Topics by 1115 members
| Go to End | ||
| Author | Topic: | 5819 Views |
-
Re: new tab on tab in system

16 January 2009 at 1:19pm
can anyone give me some direction on how to make a regular horizontal tabset? Do you just leave the vertical off?
-
Re: new tab on tab in system

16 January 2009 at 1:43pm
In the CMS? should do it automatically.
$fields->addFieldToTab("Root.Content.Main.Foo", new TextField('Bar'));
-
Re: new tab on tab in system

16 January 2009 at 2:26pm
very nice
can I add an addiitonal level?
$fields->addFieldToTab("Root.Content.Main.Foo.Bar", new TextField('Bar'));
I really appreciate the help... about 10 days in and I feel like I found the most amazing thing ever...
-
Re: new tab on tab in system

16 January 2009 at 3:37pm
Haha.. I know the feeling. It's like.. finally, a CMS that doesn't get in my way! It does whatever I need it to do!
-
Re: new tab on tab in system

17 January 2009 at 4:03am
I tried what you sggested. The build went fine, but when I tried to create the page type in the CMS I got a pop-up window an error... any thoughts???
MY .php File
---------------------------------------
<?phpclass test extends Page {
static $db = array(
'1' => 'Text',
'2' => 'Text',
'3' => 'Text',
'4' => 'Text',
'5' => 'Text',
);
static $has_one = array(
);static $defaults = array(
'ProvideComments' => true
);function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab('Root.Content.Main.Profile', new TextField('1'));
$fields->addFieldToTab('Root.Content.Main.Subject1', new TextField('2'));
$fields->addFieldToTab('Root.Content.Main.Subject2', new TextField('3'));
$fields->addFieldToTab('Root.Content.Main.subject3', new TextField('4'));
$fields->addFieldToTab('Root.Content.Main.Subject4', new TextField('5'));
return $fields;}}
class test_Controller extends Page_Controller {
}?>
-------------------
The Error
---------------------------------------
ERROR:Error 256: FieldSet::addFieldToTab() Tried to add a tab to a Tab object - 'Profile' didn't exist.
At l142 in C:\wamp\www\ss\sapphire\forms\FieldSet.php
user_error(FieldSet::addFieldToTab() Tried to add a tab to a Tab object - 'Profile' didn't exist.,256)
line 142 of FieldSet.phpFieldSet->findOrMakeTab(Root.Content.Main.Profile)
line 55 of FieldSet.phpFieldSet->addFieldToTab(Root.Content.Main.Profile,TextField)
line 24 of test.phptest->getCMSFields(CMSMain)
line 363 of CMSMain.phpCMSMain->getEditForm(18)
line 752 of LeftAndMain.phpLeftAndMain->EditForm()
line 227 of LeftAndMain.phpLeftAndMain->getitem(Array)
line 261 of Controller.phpController->run(Array)
line 104 of Director.phpDirector::direct(/admin/getitem)
line 158 of main.php
| 5819 Views | ||
| Go to Top |

