【问题标题】:Moodle standard_end_of_body function location?Moodle standard_end_of_body 函数位置?
【发布时间】:2016-02-12 23:19:55
【问题描述】:

我正在尝试自定义 standard_end_of_body() 的渲染,但我似乎找不到合适的功能。

我在/lib/outputrenderers.php 中找到了抽象函数,但没有找到实际的主题实现。在代码中提到它应该在主题渲染器中,所以我检查了每个渲染器,以及我所基于的主题(引导和优雅),但到目前为止,nada。

所以我非常愿意接受任何建议!

谢谢

【问题讨论】:

    标签: php moodle


    【解决方案1】:

    /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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多