X-Git-Url: https://git.sommitrealweird.co.uk/sommitrealweird.git/blobdiff_plain/e634bbdbebc6313daad35ad6b700d2c723a7eaa9..00841ead95c71fd168213f276dd10c717b7bdb00:/sommitrealweird/bpcms/context_processors.py diff --git a/sommitrealweird/bpcms/context_processors.py b/sommitrealweird/bpcms/context_processors.py index 0edc30a..a78976d 100644 --- a/sommitrealweird/bpcms/context_processors.py +++ b/sommitrealweird/bpcms/context_processors.py @@ -94,12 +94,17 @@ def content_submenu(request): 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): - 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)