aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2013-02-24 12:33:39 -0600
committerChristopher Allan Webber <cwebber@dustycloud.org>2013-02-24 12:33:54 -0600
commitf6d1d28d455d4cd84e55f7979667f57f64481b0b (patch)
tree2ea5411576425e9d2e5b97fa63de4cb112c5427b
parent5a0501689625176b712f3da5711fed325e9033f9 (diff)
downloadmediagoblin-f6d1d28d455d4cd84e55f7979667f57f64481b0b.tar.lz
mediagoblin-f6d1d28d455d4cd84e55f7979667f57f64481b0b.tar.xz
mediagoblin-f6d1d28d455d4cd84e55f7979667f57f64481b0b.zip
extra_head template hook. This will allow plugins to add extra js/css more easily.
This commit sponsored by Moritz Berberich. Thank you!
-rw-r--r--mediagoblin/templates/mediagoblin/base.html7
1 files changed, 7 insertions, 0 deletions
diff --git a/mediagoblin/templates/mediagoblin/base.html b/mediagoblin/templates/mediagoblin/base.html
index 3c8a26bc..36bb4c62 100644
--- a/mediagoblin/templates/mediagoblin/base.html
+++ b/mediagoblin/templates/mediagoblin/base.html
@@ -36,7 +36,14 @@
<script src="{{ request.staticdirect('/js/extlib/html5shiv.js') }}"></script>
<![endif]-->
+ {# For clarification, the difference between the extra_head.html template
+ # and the extra_head template hook is that the former should be used by
+ # themes and the latter should be used by plugins.
+ # The reason is that only one thing can override extra_head.html...
+ # but multiple plugins can hook into the template hook.
+ #}
{% include "mediagoblin/extra_head.html" %}
+ {% template_hook("extra_head") %}
{% block mediagoblin_head %}
{% endblock mediagoblin_head %}