code: def add_variables_to_context(generator):
      '''Adds useful iterable variables to template context'''
      context = generator.context             # minimize attr lookup
      context['relpath_to_site'] = relpath_to_site
      context['main_siteurl'] = _MAIN_SITEURL
      context['main_lang'] = _MAIN_LANG
      context['lang_siteurls'] = _SITE_DB
      current_lang = generator.settings['DEFAULT_LANG']
      extra_siteurls = _SITE_DB.copy()
      extra_siteurls.pop(current_lang)
      context['extra_siteurls'] = extra_siteurlf add_variables_to_context(generator):
      '''Adds useful iterable variables to template context'''
      context = generator.context             # minimize attr lookup
      context['relpath_to_site'] = relpath_to_site
      context['main_siteurl'] = _MAIN_SITEURL
      context['main_lang'] = _MAIN_LANG
      context['lang_siteurls'] = _SITE_DB
      current_lang = generator.settings['DEFAULT_LANG']
      extra_siteurls = _SITE_DB.copy()
      extra_siteurls.pop(current_lang)
      context['extra_siteurls'] = extra_siteurls
docs: Adds useful iterable variables to template context