Jump to content

Remember open tab in page edit mode?


dragan
 Share

Recommended Posts

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?

Link to comment
Share on other sites

When saving the admin remembers which tab was open (only on non-ajax tabs unfortunately). You can link directly to one tab by appending the id like this:

.../page/edit/?id=123#ProcessPageEditSettings

 

  • Like 1
Link to comment
Share on other sites

I know, but if you leave the admin, logout or go somewhere else, e.g. edit another page or whatever, you'll find that you get the 1st tab again.

The general idea behind this question is: A relatively big page (lots of fields, lots of "show only if" conditions) should be split up into several "process steps" - hence the tabs approach. The user is supposed to be "guided" in the page-editing process that if he only has completed tab 1-3, the next time the page-edit screen is opened, tab 4 is shown. Think of multi-step forms, a shop checkout process or similar.

Link to comment
Share on other sites

you can also use ?field=yourtab to show only the fields of this tab. I'm using this sometimes combined with the pw side panel

edit: this only works with custom fieldsettabs, but maybe you can list the fields one by one, like ?fields=yourfield1,yourfield2

  • Like 1
Link to comment
Share on other sites

?field=yourtab

It's probably too late right now... approaching midnight here, but I am not sure where or how to use this. Do you have a simple example? You add that to your page-edit link as a param? If so, that's not an option, since I don't want to write a module, but still be in the "default" page-edit area. I don't want to mimick or refactor the whole page-editing somewhere else.

Link to comment
Share on other sites

The built-in WireJqueryTabs is configurable but doesn't offer the exact same thing you need.

I would add an extra hidden field and save the current tab name via hook on page save, then retrieve this value somehow on page load, with a hook or js, and set the tab accordingly.

Link to comment
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
 Share

×
×
  • Create New...