我正在为 Drupal 9+ 编写 Drupal 安装配置文件。我注意到在 9.5 之前的 Drupal 版本中,Drupal 在安装过程中使用“七”主题。 Drupal 9.5之后,它使用“Claro”。
在安装过程中,我想使用 Seven 或 Claro 子主题,但它具有自定义徽标和配色方案。有办法做到这一点吗?
是的!对此的支持早在早期的 Drupal 8 版本中就已实现,作为 #1351352 的一部分。
在安装配置文件的
.info
文件中,添加 distribution.install.theme
键。
例如:
name: 'My Distribution'
type: profile
core_version_requirement: ^9 || ^10
package: 'My Package'
distribution:
name: 'My Distribution'
install:
theme: claro
您可以将
distribution.install.theme
设置更改为发行版附带的任何主题。它会自动加载。