Jump to content
Noel Boss

Language (Tab) Order

Recommended Posts

Hi everyone 🙌

Is there a way to order the language tabs in the backend? Currently, they seem to be ordered based on the created date (or id?) …

( time passes … 🚶‍♂️)

Just answered my own question. One can reorder the languages in the page tree under admin » languages or directly in the DB » pages » template_id=54 » sord field.

Anyone knows if there are side effects when moving the default language from sort 0 to somewhere higher?

Share this post


Link to post
Share on other sites

Is the default language tab still initially active after you increase its sort value? Or does PW always focus/activate the first visible tab?

Share this post


Link to post
Share on other sites
On 10/29/2019 at 11:06 PM, d'Hinnisdaël said:

Is the default language tab still initially active after you increase its sort value? Or does PW always focus/activate the first visible tab?

Which tab is initially activated depends on the chosen user language. 

See \wire\modules\LanguageSupport\LanguageTabs.module line 69:

// determine the index of the tab for the user's language	
  $activeTab = 0;
  foreach($this->languages as $index => $lang) {
  if($lang->id == $language->id) $activeTab = $index;
}

 

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By gerritvanaaken
      Wouldn’t it be cool to have whole repeater items (or even repeater matrix items) language-specific. Some of my clients do have pages that are 90% identical in German and English, but there are some sections that should not appear in one or another language. I attached a concept screenshot.
      Would something like this be possible with some simple backend hooks and "hidden checkbox fields"? Or is it way more complicated?
       

    • By Peter Knight
      <?php $Cats=$pages->find("parent=1086, id!=$page, sort=sort"); foreach($Cats as $Cat) { echo " I have a selector that pulls in 4 child pages of a parent and the order is set to reflect the order of the tree.
      My client has asked that instead of
      Cat 1 | Cat 2 | Cat 3 | Cat 4
      we instead display
      Cat 4 | Cat 1 | Cat 2 | Cat 3 
      However, I can't change the sort order in the tree.
      Can anyone guide me on the correct approach here?
      Thanks
       
    • By nickngqs
      How do you guys sort according to the order of page listing?

      My template is sort order none, so I assume it would return according to order of page listing.
    • By dragan
      Is it possible to open a specific tab, when in page-edit mode?
      Let's say I have 5 tabs (more than just the default "content" tab - 4 more created with field-groups), and the user is in tab 3. How can I possibly manage to set tab 3 again to active/selected when the same user wants to edit the same page after x days?
      Are there any in-built methods I could use? And which hook(s) would be necessary?
    • By Sten
      Hello,
       
      This is not directly about language module but I think I can get information from you.
      Can I add a vendor module to have all languages written automatically into name?
      I used this vendor module which is good with any language (hebrew, arabic...). How could I add it, so admin interface can use it ?
      Thank you
×
×
  • Create New...