self.append(register)
+HEAD_CONTENT = 'HEAD_CONTENT'
HEADER_LINKS = 'HEADER_LINKS'
PAGE_TOP_TABS = 'PAGE_TOP_TABS'
FOOTER_LINKS = 'FOOTER_LINKS'
__CONTAINER = {
+ HEAD_CONTENT: Registry(),
HEADER_LINKS: Registry(),
PAGE_TOP_TABS: Registry(),
FOOTER_LINKS: Registry(),
from django.core.urlresolvers import reverse
from django.template.defaultfilters import slugify
+from django import template
from forum.utils import html
class Visibility(object):
html.hyperlink(self.url(context), self.text(context), **self.attrs(context)),
self.post_code(context))
+class Include(ObjectBase):
+ def __init__(self, tpl, visibility=None, weight=500):
+ super(Include, self).__init__(visibility, weight)
+ self.template = template.loader.get_template(tpl)
+
+ def render(self, context):
+ return self.template.render(context)
+
class LoopContext(LoopBase):
def __init__(self, loop_context, visibility=None, weight=500):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- base_content.html -->
-{% load i18n extra_tags extra_filters markup %}
+{% load i18n extra_tags extra_filters markup ui_registry %}
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{% block fulltitle %}{% block title %}{% endblock %} - {{ settings.APP_SHORT_NAME }}{% endblock %}</title>
{% endif %}
{% block forejs %}{% endblock %}
<link rel="search" type="application/opensearchdescription+xml" href="{% url opensearch %}" title="{{ settings.APP_SHORT_NAME }} Search" />
+ {% loadregistry head_content %}{% endloadregistry %}
</head>
<body>
<div class="notify" style="display:none">