Moodle standard_end_of_body 函数位置?
Moodle standard_end_of_body function location?
我正在尝试自定义 standard_end_of_body()
的渲染,但我似乎找不到合适的函数。
我在/lib/outputrenderers.php
中找到了抽象函数,但没有找到实际的主题实现。在代码中提到它应该在主题渲染器中,所以我检查了每个渲染器,以及我基于的主题(bootstrap 和优雅),但到目前为止,nada.
所以我非常愿意接受任何建议!
谢谢
在/theme/yourtheme/renderers/php
添加这个
class theme_yourtheme_core_renderer extends core_renderer {
public function standard_end_of_body_html() {
// Optionally add the parent html.
$output = parent::standard_end_of_body_html();
$output .= 'my stuff';
return ($output);
}
或者,您也可以将页脚 html 添加到设置 additionalhtmlfooter
通过站点管理 -> 外观 -> 附加 html
或直接到 /admin/settings.php?section=additionalhtml
我正在尝试自定义 standard_end_of_body()
的渲染,但我似乎找不到合适的函数。
我在/lib/outputrenderers.php
中找到了抽象函数,但没有找到实际的主题实现。在代码中提到它应该在主题渲染器中,所以我检查了每个渲染器,以及我基于的主题(bootstrap 和优雅),但到目前为止,nada.
所以我非常愿意接受任何建议!
谢谢
在/theme/yourtheme/renderers/php
添加这个
class theme_yourtheme_core_renderer extends core_renderer {
public function standard_end_of_body_html() {
// Optionally add the parent html.
$output = parent::standard_end_of_body_html();
$output .= 'my stuff';
return ($output);
}
或者,您也可以将页脚 html 添加到设置 additionalhtmlfooter
通过站点管理 -> 外观 -> 附加 html
或直接到 /admin/settings.php?section=additionalhtml