您可以访问当前主题对象通过 this.theme 并且它返回对象 Cms\Classes\Theme,一个对 主题定制对象 的引用。
this.theme 将提供对表单字段值的直接访问,这些值由任何主题自定义定义。它本身还具有以下属性。
将主题目录名转换为一个对 CSS 友好的标识符。
<body class="theme-{{ this.theme.id }}">如果主题目录是 website 这将生成一个类名 theme-website。
一个包含所有在 theme.yaml 文件中找到的主题配置值的数组。
<meta name="description" content="{{ this.theme.config.description }}">