]> git.sommitrealweird.co.uk Git - sommitrealweird.git/blobdiff - sommitrealweird/bpcms/context_processors.py
Checky little photo import script
[sommitrealweird.git] / sommitrealweird / bpcms / context_processors.py
index 0edc30af4e26242bed1dd99e0cfbcedc980256c7..a78976df893f1f919eff7a92b6f959b431bcb3b5 100644 (file)
@@ -94,12 +94,17 @@ def content_submenu(request):
         menu_items.sort( \
             cmp=lambda x,y: cmp(x['title'].lower(), y['title'].lower()))
 
         menu_items.sort( \
             cmp=lambda x,y: cmp(x['title'].lower(), y['title'].lower()))
 
+        cache.set('bpcms_contentmenu_%s' %(folderpath), menu_items)
+
     return {
         'content_submenu': menu_items,
     }
 
 def content_breadcrumb(request):
     return {
         'content_submenu': menu_items,
     }
 
 def content_breadcrumb(request):
-    breadcrumb = [{'url': settings.BPCMS_ROOT, 'title': settings.BPCMS_ROOT},]
+    if settings.BPCMS_ROOT == "/":
+        breadcrumb = [{'url': settings.BPCMS_ROOT, 'title': "Home"}]
+    else:
+        breadcrumb = [{'url': settings.BPCMS_ROOT, 'title': settings.BPCMS_ROOT},]
     # find where we are in the tree first
     folderpath = request.path
     folderpath = re.sub(u'^%s' %(settings.BPCMS_ROOT), '', folderpath)
     # find where we are in the tree first
     folderpath = request.path
     folderpath = re.sub(u'^%s' %(settings.BPCMS_ROOT), '', folderpath)