Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
drupal 7 サイトにいくつかのカスタム ページがあります。各ページにコンテンツ タイプの名前を表示する必要があります。コンテンツ タイプの名前を表示するには、どの関数を使用すればよいですか?
テーマの node.tpl.php からコンテンツ タイプを出力できます。$node オブジェクトは node.tpl.php ファイルに渡され<?php echo $node->type; ?>ます。表示したい場所にエコーアウトするだけです。
<?php echo $node->type; ?>