Drupal:模块输出未出现在前端

Drupal: Module output not appearing on front end

我正在尝试创建一个 Drupal 模块。我已经能够在管理部分设置配置表单 - 它运行良好:我可以添加组件并设置配置并保存。

但是,网站前端没有显示任何内容。没有错误。我不确定为什么,因为我是 Drupal 的新手,所以我不确定去哪里找。

我的 .module 文件中的 hook_theme 看起来像:

function gallery_grid_theme($existing, $type, $theme, $path) {
  return array(
    'gallery_grid' => array(
      'template' => 'gallery-grid',
      'path' => 'plugins/content_types/gallery_grid/templates',
      'type' => 'theme',
      'variables' => [],
    )
  );
}

.tpl 文件完好无损,没有标记错误。

有人知道我应该查看什么文件吗?

编辑:

我试过清除缓存和重建注册表以及禁用和重新启用该模块,没有任何影响。

模块作为组件添加到页面面板(齿轮图标,添加内容)。

出于某些原因,这需要一个绝对路径:

'path' => drupal_get_path('module', 'gallery_grid') . '/plugins/content_types/gallery_grid/templates',