Jump to content

Release: Page Edit Fold Status


Rob
 Share

Recommended Posts

Hi fellow forum friends.

I've released (on github at least) my new module - Page Edit Fold Status. May not yet be live in modules section of the site.

https://github.com/robphilp/PageEditFoldStatus

What this does is use a combo of JQuery, Ajax and the session to remember the state of each field when you edit and then save a page, so that when you return to the page after the save (or later) it will recall that state and fold/unfold all the fields so the edit page is how you last left it.

We have pages with a LOT of fields on, and we found it irritating to have them all default to open. That said, if they default to closed and you have to drill down to edit some specific bit of data, it's annoying to have to drill-down again each time when you are making many incremental edits, so I made this module to store the state on a per-page and per-user basis.

e.g. some users will need to focus on certain fields, so if they have these open and all others closed, it will retain this state each time they edit a page.  No need to open/close these fields each time so you can focus on what's important to you.  Because of the use of the session, this behaviour SHOULD last for the lifetime of your login.

I hope it is helpful!



Just realised I've put this in the wrong forum, can someone move it for me?!

Thanks!

  • Like 7
Link to comment
Share on other sites

Great idea, will definitely try it out!

One minor thing I noticed after taking a quick look at your code: you should make sure that $_SERVER['REQUEST_URI'] actually exists before doing that strpos() at init. When bootstrapping ProcessWire for local use (shell scripts etc.) it won't be there and you'll get a PHP notice for that. Not fatal, but annoying in the long run :)

  • Like 1
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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...