以编程方式更改活动 Drupal 主题的正确方法是什么?
以编程方式更改活动 Drupal 主题的正确方法是什么?
What is the correct way to change the active Drupal theme programmatically?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
以编程方式更改活动 Drupal 主题的正确方法是什么?
What is the correct way to change the active Drupal theme programmatically?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
编辑:这是一个更简单的示例。
无论主题设置如何,它都会使用 Garland。请注意,这也会覆盖管理主题设置。
编辑:全局更改。
如果您的意思是更改数据库中的主题设置而不仅仅是当前页面上的主题设置,则操作方法如下:
Edit: here is a simpler example.
It uses Garland regardless of the theme setting. Note that this overrides the admin theme setting too.
Edit: changing globally.
And if you meant changing the theme setting in the database instead of just on the current page, here is how: