21278 Posts in 5728 Topics by 2599 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 381 Views |
-
SilverStripe 3 ..Tabs!

7 June 2012 at 4:25pm
Hi:
How does the new tabs in the CMS work? Can we have sub-tabs anymore ?
For example, If i have Gallerypage i will need the following tabs:
Content->
Gallery->Images
Gallery->Settings
Gallery->AdvancedSettings (With access limited to a member or group )
Settings -> ... & so onDoes sub-tabs work anymore ? if so, how do i get them working.
Thanks -
Re: SilverStripe 3 ..Tabs!

10 November 2012 at 1:33am
I'd like some example also.
I'd like to know how to do a "drop tab" just like the metadata has! that way it could save space.
I have figured out how to add a tab
eg Info panel
extract$fields->addFieldToTab("Root.IntroPanel",
new HTMLEditorField('IntroPanelOne',
_t('Page.ColumnOne','Panel1')
)
);full
<?php
class Page extends SiteTree {public static $db = array(
'topnav' => 'Boolean',//menu
'IntroPanelOne' => 'HTMLText',
'IntroPanelTwo' => 'HTMLText',
'IntroPanelThree' => 'HTMLText'
);public static $has_one = array(
//'Page' => 'SiteTree'
);
static $defaults = array(
'topnav' => 1
);
function getCMSFields() {
$fields = parent::getCMSFields();
//menu
$fields->addFieldToTab("Root.Main",
new CheckboxField(
'topnav',
_t('Page.topnav', 'Tick to show on top nav')
),
'Content'
);
$fields->addFieldToTab("Root.IntroPanel",
new HTMLEditorField('IntroPanelOne',
_t('Page.ColumnOne','Panel1')
)
);
$fields->addFieldToTab("Root.IntroPanel",
new HTMLEditorField('IntroPanelTwo',
_t('Page.ColumnOne','Panel2')
)
);
$fields->addFieldToTab("Root.IntroPanel",
new HTMLEditorField('IntroPanelThree',
_t('Page.ColumnOne','Panel3')
)
);
//Main
return $fields;
} //endgetCMSFields
| 381 Views | ||
|
Page:
1
|
Go to Top |


