Jump to content

uncheck Settings/Status/System


Spica
 Share

Recommended Posts

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!

  • Like 2
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...