Spica Posted March 14, 2015 Share Posted March 14, 2015 with $config->advanced = true, how to uncheck Settings/Status/System (there are two) in a page settings tab. In my system it always gets reset on save. Link to comment Share on other sites More sharing options...
ESRCH Posted March 14, 2015 Share Posted March 14, 2015 You should normally not do this, but I'm assuming that you set System on a page that you created, and that you want to remove this setting. The way to do this with the API is to do as follows: // Assuming that $page refers to the page for which you want to remove the status // Enable overriding the system status flags $page->status = $page->status | Page::statusSystemOverride; $page->save(); // Change the system status flags $page->status = $page->status & ~Page::statusSystemID; // If you want to uncheck the first system checkbox $page->status = $page->statux & ~Page::statusSystem; // If you want to uncheck the second system checkbox $page->save(); // Disable overriding the system status flags $page->status = $page->status & ~Page::statusSystemOverride; $page->save(); If it's just to correct a mistake, the more straightforward way to do the change is by modifying the database directly: In the database, find the right page in the pages table (you can find it easily by name or by id, which is indicated in the url when you edit the page). If you want to remove the first system flag, subtract 8 from the value in the status column (so if it's 9, it should become 1). If you want to remove the second system flag, subtract 16 from the value in the status column (so if it's 17, it should become 1). If you want to remove both, simply combine the operations by subracting 24. I hope this helps! 2 Link to comment Share on other sites More sharing options...
Spica Posted March 14, 2015 Author Share Posted March 14, 2015 Thanks. Did it by the db way, had already found the status entries but was not shure, how the entries are working and did also not find anything about it. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now