探していたものが見つかりました。
コードでページマネージャーを使用してビルドされたページのバリアントを提供するには、モジュールファイルでhook_ctools_plugin_api()を呼び出して、ページマネージャーにモジュールをリッスンする必要があることを通知します。
/**
* Implement hook_ctools_plugin_api().
*
* Tells ctools, page manager and panels, that we have a template ready
*/
function mtvideo_ctools_plugin_api($module, $api) {
// @todo -- this example should explain how to put it in a different file.
if ($module == 'panels_mini' && $api == 'panels_default') {
return array('version' => 1);
}
if ($module == 'page_manager' && $api == 'pages_default') {
return array('version' => 1);
}
}
次に、モジュールのルートフォルダにMODULE_NAME.pages_default.incという名前の新しいファイルを作成します。このファイルには、次の関数を含めることができます。
hook_default_page_manager_pages()
/**
* If you want to put an entire page including its variants in code.
* With the export module from ctools, you can export your whole page to code.
* Paste that into this function.
* (Be aware that the export gives you $page, but you need to return an array,
* So let the function return array('page name' => $page);
*/
および/または
hook_default_page_manager_handlers()
/**
* This will provide a variant of an existing page, e.g. a variant of the system
* page node/%node
* Again, use the export function in Page Manager to export the needed code,
* and paste that into the body of this function.
* The export gives you $handler, but again you want to return an array, so use:
* return array('handler name' => $handler);
*
* Notice, that if you export a complete page, it will include your variants.
* So this function is only to provide variants of e.g. system pages or pages
* added by other modules.
*/
これがいつか困っている別の人に役立つことを願っています:o)私が発見しなければならないのは、モジュールがプログラムでページマネージャーのノード/%ノードページを有効にする方法だけです。手がかりがあれば、遠慮なく私と共有してください:)