Browse Source

Merge branch 'v7.2.0-beta' into develop

version-14
Rushabh Mehta 8 years ago
parent
commit
f2cad09a3b
1 changed files with 6 additions and 5 deletions
  1. +6
    -5
      frappe/website/context.py

+ 6
- 5
frappe/website/context.py View File

@@ -106,11 +106,12 @@ def build_context(context):
context.no_cache = 1 context.no_cache = 1
add_sidebar_data(context) add_sidebar_data(context)
else: else:
sidebar_json_path = os.path.join(context.basepath, '_sidebar.json')
if os.path.exists(sidebar_json_path):
with open(sidebar_json_path, 'r') as sidebarfile:
context.sidebar_items = json.loads(sidebarfile.read())
context.show_sidebar = 1
if context.basepath:
sidebar_json_path = os.path.join(context.basepath, '_sidebar.json')
if os.path.exists(sidebar_json_path):
with open(sidebar_json_path, 'r') as sidebarfile:
context.sidebar_items = json.loads(sidebarfile.read())
context.show_sidebar = 1




# determine templates to be used # determine templates to be used


Loading…
Cancel
Save