From 00841ead95c71fd168213f276dd10c717b7bdb00 Mon Sep 17 00:00:00 2001 From: Brett Parker Date: Fri, 27 Mar 2009 14:55:05 +0000 Subject: [PATCH] Change / to Home in breadcrumb --- sommitrealweird/blog/context_processors.py | 2 +- sommitrealweird/bpcms/context_processors.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sommitrealweird/blog/context_processors.py b/sommitrealweird/blog/context_processors.py index 14a9216..e63a85f 100644 --- a/sommitrealweird/blog/context_processors.py +++ b/sommitrealweird/blog/context_processors.py @@ -5,7 +5,7 @@ import re def content_breadcrumb(request): path = request.path if path[0:len(settings.BLOG_ROOT)] == settings.BLOG_ROOT: - breadcrumb = [{'url': u'/', 'title': u'/'}, {'url': settings.BLOG_ROOT, 'title': u'blog'},] + breadcrumb = [{'url': u'/', 'title': u'Home'}, {'url': settings.BLOG_ROOT, 'title': u'blog'},] path = path[len(settings.BLOG_ROOT):] diff --git a/sommitrealweird/bpcms/context_processors.py b/sommitrealweird/bpcms/context_processors.py index 3668ab0..a78976d 100644 --- a/sommitrealweird/bpcms/context_processors.py +++ b/sommitrealweird/bpcms/context_processors.py @@ -101,7 +101,10 @@ def content_submenu(request): } 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) -- 2.30.2