Template events allow extensions to insert template code into event locations found throughout the template structure. Template events found inside phpBB’s template files look like:
โค้ด: เลือกทั้งหมด
<!-- EVENT overall_header_head_append -->
For example, the above template event could be used to add some CSS style script to the header. The template file would be located at:
acme/demo/styles/prosilver/template/event/overall_header_head_append.html
A special case for including CSS files and JS files exists. These use the <!-- INCLUDECSS --> and <!-- INCLUDEJS --> syntax, respectively.
For example, to add a new custom.css file in prosilver, a template event would need to be created at:
acme/demo/styles/prosilver/template/event/overall_header_head_append.html
It would contain the following line of code:
โค้ด: เลือกทั้งหมด
<!-- INCLUDECSS ../theme/custom.css -->
A template event would be created at:
acme/demo/styles/all/template/event/overall_footer_after.html
It would contain the following line of code:
โค้ด: เลือกทั้งหมด
<!-- INCLUDEJS @acme_demo/js/scripts.js -->