Jump to content

Stability of $config->advanced?


bmacnaughton
 Share

Recommended Posts

Do any experts have experience with the level of stability and/or support for turning on $config->advanced? I ask because of the warning at the bottom of the System tab "Please note that all of these system settings are intended for ProcessWire system development (not site development). Use them at your own risk."

It provides two facilities that are invaluable to me (maybe because I don't know how to do them any other way).

1) Disable Settings Tab on a per template basis

2) Page Class Name - this makes it tweak a page while relying on the underlying Page class for the majority of functions.

Are others using this setting in production? Have you used it over an extended time and seen that it is not changed often or at all?

Link to comment
Share on other sites

1 hour ago, bmacnaughton said:

1) Disable Settings Tab on a per template basis

You can use this hook to remove Settings tab from page edit pages

<?php
wire()->addHook('ProcessPageEdit::buildFormSettings', function (HookEvent $e) {
	// get the page currently being edited
	$page = $e->object->getPage();
	// check its template
	if($page->template->name !== 'some-template') return;

	// remove settings tab
	$e->object->removeTab('ProcessPageEditSettings')
})

 

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