Jump to:

5514 Posts in 1733 Topics by 1219 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Renaming and sort order of tabs (like main)

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 777 Views
  • Pipifix
    Avatar
    Community Member
    54 Posts

    Renaming and sort order of tabs (like main) Link to this post

    Hello again.

    I want to rename and sort the given structure of the dataobject tabs.
    The dataobject got several tabs (main, adress, metadata, contactperson, usage,house). I used this code to rename(translate).

    //Overide the tab labels in ModellAdmin
       static $field_labels = array(
          'Main' => 'Objektdaten',
          'Adress' => 'Adresse',
          'Usage' => 'Nutzung',
          'House' => 'Hausdaten',
          'Contactperson' => 'Ansprechpartner',
          'Metadata' => 'System'
       );


    But I'm not able to rename 'Main' and 'Metadata' and the order of the tabs is not affected. How to get this done?

    Thanks for you help. Pipifix.

  • swaiba
    Avatar
    Forum Moderator
    1784 Posts

    Re: Renaming and sort order of tabs (like main) Link to this post

    I'm going to disagree with moving the main tab - but that is my preference I guess.

    The simplest way to re-order tabs that are scafollded is to change the order they are defined in the has_one/has_many/many_many.
    Other than that I'd remove the tab and then add it again in the order I'd like.

    I think I have tried the re-order and it didn't work out for me.

  • Pipifix
    Avatar
    Community Member
    54 Posts

    Re: Renaming and sort order of tabs (like main) Link to this post

    Oh, thats what i call a fast reply. Thanks.

    But i can actually not change the order they are defined. Main and metadata are populated by the databjects-as-pages-module, adress is populated by the the adressable-module. The rest is by my own scaffolding.
    It was a wish of my client (a little bit oldfashioned guy) to rename the main tab. i guess have to 'advice' him to leave it well alone.

    For the order I'll give the remove/add-thing a try.

    Greetings from germany. Pipifix

    777 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.