在Drupal 7中更改主题的drush命令是什么?
drush theme disable theme_name
drush theme enable theme_name
Run Code Online (Sandbox Code Playgroud)
不起作用.
sil*_*ilo 59
请查看http://drupal.org/node/530780#comment-2513534上的评论,其中包含与主题相关的最新命令(实际上,从3.0开始,但它们似乎也适用于Drush 4.x) .
drush -l http://example.com/ pm-disable theme_namedrush -l http://example.com/ pm-enable theme_namedrush -l http://example.com/ vset theme_default theme_namedrush -l http://example.com/ vset admin_theme theme_name小智 23
您可以使用:
例如:
drush vset theme_default bluemarine
drush vset admin_theme shiny
Run Code Online (Sandbox Code Playgroud)
这些将分别设置网站的默认和管理主题.
当然,它们必须都是预先启用的,最好是预先启用.
检查事情是否按照您想要的方式设置:
drush status - 列出当前的默认和管理主题
在Drupal 6中 - drush pml | fgrep -e主题 - 检查每个主题的状态(启用,禁用等)
在Drupal 7中 - drush pml | fgrep -e主题
小智 6
drush dl theme_name
Run Code Online (Sandbox Code Playgroud)
以上命令下载主题.
drush en theme_name
Run Code Online (Sandbox Code Playgroud)
上面的命令启用主题.
现在,要将启用的主题设置为默认主题,请使用以下命令.
drush vset theme_default theme_name
Run Code Online (Sandbox Code Playgroud)
该variables表已被configDrupal 8中的表替换,因此drush命令vset将不再起作用.对于Drupal8/Drush8,使用以下命令设置默认主题:
drush config-set system.theme default THEME_NAME
Run Code Online (Sandbox Code Playgroud)
以及以下设置管理主题:
drush config-set system.theme admin THEME_NAME
Run Code Online (Sandbox Code Playgroud)