- Drupal 8 Theming with Twig
- Chaz Chumley
- 306字
- 2021-07-16 12:41:26
Installing and uninstalling themes
The act of installing or uninstalling a theme is a common practice when administering a Drupal website. Let's try installing Stark and making it our default theme in place of Bartik.
Step one – installing a theme
Currently, the only uninstalled theme is Stark, and we can easily move this into the installed state by following these two steps:
- Click on the Install and set as default link.
- Scroll back to the top of Appearance admin.
- If we now look at the Installed themes section, we should see that we now have three themes installed: Stark, Bartik, and Seven. We can also tell that Stark is now our default theme by looking to the right of the themes name, which will be marked as (default theme) as shown in the following image:
We can also see what the Stark theme looks like by clicking on the Back to site link in the Admin menu, which will take us back to the frontend of our website. We are now presented with an unstyled page, which is to help demonstrate the clean markup of Drupal.
Step two – uninstalling a theme
It is just as easy to uninstall a theme, and one nice feature of Drupal 8 is that it ensures that we have at least one installed theme set as default. Otherwise, we won't even have the option of uninstalling the theme.
Let's navigate back to the Appearance admin located at /admin/appearance
and uninstall the Stark theme by following these two steps:
- Locate the Bartik theme and click on Set as default.
- Locate the Stark theme and click on Uninstall.
We saw how simple it is to install and uninstall themes within Drupal 8. Another common task we will find ourselves completing within the Appearance admin is adjusting the settings of a theme.
- .NET Core 2.0 應用程序高級調試:完全掌握Linux、macOS和Windows跨平臺調試技術
- Solaris 10系統管理
- 黑客大曝光:Web應用程序安全(原書第3版)
- 矛與盾:黑客就這幾招
- Bootstrap從入門到項目實戰
- 巧學巧用Dreamweaver CS6、Flash CS6、Fireworks CS6網站制作
- 計算機網絡基礎:基于案例與實訓 第2版
- 云原生模式
- 計算機網絡技術及應用
- 深度學習:主流框架和編程實戰
- 云原生:運用容器、函數計算和數據構建下一代應用
- 兼攻之道:思科當前贏利和長遠發展的秘訣
- ASP.NET框架應用程序實戰:軟件開發工程師崗前必備
- 開源云計算平臺CloudStack實戰
- 私有云存儲系統搭建與應用