root: add links as a substitution variable, to make it available on all pages
This commit is contained in:
parent
8c6e929c49
commit
6084fafcfb
|
@ -740,6 +740,13 @@ class AlternateRootDirectory(OldRootDirectory):
|
|||
payment = PublicPaymentDirectory()
|
||||
invoices = InvoicesDirectory()
|
||||
|
||||
def get_substitution_variables(self):
|
||||
d = {}
|
||||
def print_links(fd):
|
||||
fd.write(str(self.links()))
|
||||
d['links'] = print_links
|
||||
return d
|
||||
|
||||
def _q_traverse(self, path):
|
||||
if get_publisher().has_site_option('drupal'):
|
||||
drupal.try_auth()
|
||||
|
@ -757,8 +764,11 @@ class AlternateRootDirectory(OldRootDirectory):
|
|||
response = get_response()
|
||||
if not hasattr(response, 'filter'):
|
||||
response.filter = {}
|
||||
|
||||
response.filter['gauche'] = self.box_side(path)
|
||||
response.filter['keywords'] = template.get_current_theme().get('keywords')
|
||||
get_publisher().substitutions.feed(self)
|
||||
|
||||
response.breadcrumb = [ ('', _('Home')) ]
|
||||
|
||||
if not self.admin:
|
||||
|
|
Reference in New Issue