can anyone give me some direction on how to make a regular horizontal tabset? Do you just leave the vertical off?
We've moved the forum!
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
- Previous 10 entries
- 1
- 2
- 3
- Page 44(current)
In the CMS? should do it automatically.
$fields->addFieldToTab("Root.Content.Main.Foo", new TextField('Bar'));
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...
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!
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
---------------------------------------
<?php
class 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.php
FieldSet->findOrMakeTab(Root.Content.Main.Profile)
line 55 of FieldSet.php
FieldSet->addFieldToTab(Root.Content.Main.Profile,TextField)
line 24 of test.php
test->getCMSFields(CMSMain)
line 363 of CMSMain.php
CMSMain->getEditForm(18)
line 752 of LeftAndMain.php
LeftAndMain->EditForm()
line 227 of LeftAndMain.php
LeftAndMain->getitem(Array)
line 261 of Controller.php
Controller->run(Array)
line 104 of Director.php
Director::direct(/admin/getitem)
line 158 of main.php
- Previous 10 entries
- 1
- 2
- 3
- Page 44(current)