Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9287473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T19:40:46+00:00 2026-06-18T19:40:46+00:00

I was wondering if it is possible to add a Tab via a DataExtension?

  • 0

I was wondering if it is possible to add a Tab via a DataExtension? The FieldList argument passed to updateCMSFields appears to output a DataExtensions new fields onto the Details Tab. So my first attempt was to push my Fields there:

public function updateCMSFields(FieldList $fields)  {  
    $secureFilesTab = $fields;
    $secureFilesTab->push(new HeaderField(_t('SecureFiles.GROUPACCESSTITLE', 'Group Access')));
    $secureFilesTab->push(new TreeMultiselectField('GroupPermissions', _t('SecureFiles.GROUPACCESSFIELD', 'Group Access Permissions')));
}    

This works fine, but when I save a value, the CMS loads the data from the Tree_View and List_View tabs onto the Details Tab. Mentioned in comments below is the fact that this is a DataExtension for Folder.

I then tried using code from the FormScaffolder to add a new Tab:

public function UpdateCMSFields(FieldList $fields) {
    $fields->push(new TabSet('Root', $secureFilesTab = new Tab('Security')));
$secureFilesTab->setTitle(_t('SiteTree.TABSECURITY', 'Security'));
}

This changes the tab icons all to the Tree_View icons and places my new DataExtension fields on all tabs.

What is the proper way to add tabs via a DataExtension?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T19:40:48+00:00Added an answer on June 18, 2026 at 7:40 pm

    You can use addFieldsToTab() to add new fields to an existing tab or a new one, as you would when using getCMSFields() on DataObjects.

    public function updateCMSFields(FieldList $fields)  {  
        if ($this->owner->ClassName != 'Folder' ){
            $fields->addFieldsToTab('Root.Security', array(
                new HeaderField(_t('SecureFiles.GROUPACCESSTITLE', 'Group Access')),
                new TreeMultiselectField('GroupPermissions', _t('SecureFiles.GROUPACCESSFIELD', 'Group Access Permissions'))
            ));     
        }
        if ($this->owner->ClassName == 'Folder' ){
            $fields->push(new HeaderField(_t('IMAFOLDER', 'I am a folder')));       
        }
    }  
    

    The Security tab, if not found, will be created by passing ‘Root.Security’ as the first argument. The dot notation is used to create the nested structure of tabset and tabs. It is not possible to simple push a new tabset with the same name (“Root”), as there’s already such a tabset. If you need to do further manipulations on your tabs, you can access their instance using $fields->findOrMakeTab(‘TabSet.Tab’), ie $fields->findOrMakeTab(‘Root.Content’);

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am wondering whether it is possible to add fields to objects dynamically. For
I am wondering if it is possible to add a new property as an
I'm wondering if its possible to add new class data members at run-time in
I was wondering if its possible to add custom header with classic asp. In
I was wondering if it is possible to add an icon to the iPhone
I'm wondering if it is possible to add cell content to a uitableview based
I was wondering if it possible to add constants to php before any scripts
I was wondering if it is possible to add an custom parameter to the
EDITED: Just wondering if is it possible to add a function (or static script)
i was just wondering wether it is possible to add an uiimageview as a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.