我正在 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 文档:
"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 文件。