Moodle 主题选择器中未检测到新创建的父主题

问题描述 投票:0回答:1

我正在 Moodle 中开发一个新的家长主题。我的moodle构建版本是20231211。我已经创建了所有必要文件的准系统结构,如下所示:

oneui
├── README.md
├── classes
│   └── output
│       └── renderer.php
├── config.php
├── image.png
├── lang
│   └── en
│       └── theme_oneui.php
├── pix
│   ├── favicon.ico
│   └── screenshot.png
├── screenshots
│   ├── config.png
│   ├── folder.png
│   ├── lang.png
│   ├── output1.png
│   ├── output2.png
│   ├── output3.png
│   └── version.png
├── settings.php
├── styles
│   └── styles.css
├── theme_oneui.php
└── version.php

相同的源代码可以在https://github.com/SRRInternational/moodle-parent-theme.git

中找到

在moodle主题文件夹中添加主题后没有错误。

问题:
我新创建的主题未列在“外观”->“主题选择器”视图中。请告知我可以在哪里查看以及可能导致此问题的原因是什么?

php themes moodle moodle-theme
1个回答
0
投票

您需要创建主题的布局。

来自 Moodle 文档

"All themes are required to define the layouts they wish to be responsible for as well as create; however, many layout files are required by those layouts. If the theme is overriding another theme then it is a case of deciding which layouts this new theme should override. If the theme is a completely fresh start then you will need to define a layout for each of the different possibilities."

因此,您需要创建

layout
目录并在其中使用主题的布局设置创建 php 文件。

© www.soinside.com 2019 - 2024. All rights reserved.