Drupal 7 のモジュールに取り組んでいます。コンテンツ タイプのテンプレートを node--[content type].tpl.php として定義し、「themes/[selected theme]/template」ディレクトリに配置しました。代わりに、このテンプレートを「モジュール」ディレクトリに保持したいと思います。そのため、モジュールをインストールするときに、選択したテーマ フォルダーに毎回ファイルを配置する必要はありません。これを行う方法はありますか?
よろしくお願いします。
担当者が 10 人未満なので、自分の質問に答えることができないので、質問を変更します
以下は私のために何らかの方法で働いています。ケースノード編集フォームビューとノードビューの両方
function [content type]_theme() {
return array(
'[content type]_node_form' => array(
'arguments' => array(
'form' => NULL,
),
'template' => 'node--[content type]--edit',
'render element' => 'form',
),
'node__[content type]' => array (
'variables' => array(),
'template' => 'node--[content type]' ,
'base hook' => 'node',
'path' => "sites/all/modules/[content type]_update/[content type]_update/[content type]/",
),
);
}
これは完全には理解できませんが、機能しています。