cubicweb/web/views/basetemplates.py
changeset 11301 a76feec0a861
parent 11296 5153f6fd478e
parent 11280 eb1d74ce6b61
child 11374 0e50215016f3
--- a/cubicweb/web/views/basetemplates.py	Tue Jun 21 14:13:54 2016 +0200
+++ b/cubicweb/web/views/basetemplates.py	Tue Jun 21 16:35:21 2016 +0200
@@ -46,6 +46,8 @@
         w(u'</body>')
 
     def template_header(self, content_type, view=None, page_title='', additional_headers=()):
+        self._cw.html_headers.define_var('BASE_URL', self._cw.base_url())
+        self._cw.html_headers.define_var('DATA_URL', self._cw.datadir_url)
         w = self.whead
         # explictly close the <base> tag to avoid IE 6 bugs while browsing DOM
         w(u'<base href="%s"></base>' % xml_escape(self._cw.base_url()))