Actually, there is a cleaner way - in the sense that it removes the wrapper from the rendering pipeline: remove it in the hook hook_element_info_alter.
The wrapper is added by the system module invokation of this hook. To be sure that it is removed by our custom module, we need to make sure that this hook is invoked in our module after the system module invokation. The simplest way is to set our module hook as the latest one invoked - but one who need more granular control could just put it after the system hook.
/**
* Implements hook_module_implements_alter().
*/
function my_module_module_implements_alter(&$implementations, $hook) {
$moduleIdentifier = 'my_module';
if ($hook == 'element_info_alter') {
$implementation = $implementations[$moduleIdentifier];
unset($implementations[$moduleIdentifier]);
$implementations[$moduleIdentifier] = $implementation;
}
}
/**
* Implements hook_element_info_alter().
*/
function my_module_element_info_alter(&$type) {
unset($type['page']['#theme_wrappers']['off_canvas_page_wrapper']);
}
It is explicitely written:
> URL (must be hosted on Drupal.org, upload with βAdd a new fileβ)
Your solution is to do exactly the opposite:
* Hosted not on drupal.org
* Not uploaded using "Add a new file"
Eric MORAND β created an issue. See original summary β .