我创建了一个新的 Moodle 主题,正如 Moodle 文档所建议的那样。
在 config.php 文件中,我定义了如下布局:
$THEME->layouts = array(
// Most pages - if we encounter an unknown or a missing page type, this one is used.
'base' => array(
'theme' => 'nop',
'file' => 'general.php',
'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-post'
),
'standard' => array(
'theme' => 'nop',
'file' => 'general.php',
'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-post'
)
);
创建后,我在 Moodle 的管理区域中选择了它,并清理了缓存。在管理主题选择页面中,我可以看到该主题的颜色、样式和新界面,但是,在 Moodle 的其他区域(每隔一个页面)我看不到它。
有人知道为什么会发生这种奇怪的事情吗?
谢谢
最佳答案
我可以通过在 config.php 文件中添加此代码来解决这个问题。
$THEME->layouts = array( // Most pages - if we encounter an unknown or a missing page type, this one is used.
'base' => array(
'theme' => 'nop',
'file' => 'general.php',
'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-post'
),
'standard' => array(
'theme' => 'nop',
'file' => 'general.php',
'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-post'
),
'frontpage' => array(
'theme' => 'nop',
'file' => 'general.php',
'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-post'
) );
关于php - 创建 Moodle 2 主题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10719794/