cubicweb/web/views/basetemplates.py
changeset 11301 a76feec0a861
parent 11296 5153f6fd478e
parent 11280 eb1d74ce6b61
child 11374 0e50215016f3
equal deleted inserted replaced
11300:01c04bbbe7b8 11301:a76feec0a861
    44         w(u'<body>\n')
    44         w(u'<body>\n')
    45         self.content(w)
    45         self.content(w)
    46         w(u'</body>')
    46         w(u'</body>')
    47 
    47 
    48     def template_header(self, content_type, view=None, page_title='', additional_headers=()):
    48     def template_header(self, content_type, view=None, page_title='', additional_headers=()):
       
    49         self._cw.html_headers.define_var('BASE_URL', self._cw.base_url())
       
    50         self._cw.html_headers.define_var('DATA_URL', self._cw.datadir_url)
    49         w = self.whead
    51         w = self.whead
    50         # explictly close the <base> tag to avoid IE 6 bugs while browsing DOM
    52         # explictly close the <base> tag to avoid IE 6 bugs while browsing DOM
    51         w(u'<base href="%s"></base>' % xml_escape(self._cw.base_url()))
    53         w(u'<base href="%s"></base>' % xml_escape(self._cw.base_url()))
    52         w(u'<meta http-equiv="content-type" content="%s; charset=%s"/>\n'
    54         w(u'<meta http-equiv="content-type" content="%s; charset=%s"/>\n'
    53           % (content_type, self._cw.encoding))
    55           % (content_type, self._cw.encoding))