【发布时间】:2016-02-12 23:19:55
【问题描述】:
我正在尝试自定义 standard_end_of_body() 的渲染,但我似乎找不到合适的功能。
我在/lib/outputrenderers.php 中找到了抽象函数,但没有找到实际的主题实现。在代码中提到它应该在主题渲染器中,所以我检查了每个渲染器,以及我所基于的主题(引导和优雅),但到目前为止,nada。
所以我非常愿意接受任何建议!
谢谢
【问题讨论】:
我正在尝试自定义 standard_end_of_body() 的渲染,但我似乎找不到合适的功能。
我在/lib/outputrenderers.php 中找到了抽象函数,但没有找到实际的主题实现。在代码中提到它应该在主题渲染器中,所以我检查了每个渲染器,以及我所基于的主题(引导和优雅),但到目前为止,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
【讨论】: