equal
deleted
inserted
replaced
22 'listkeys': 'pull', |
22 'listkeys': 'pull', |
23 'unbundle': 'push', |
23 'unbundle': 'push', |
24 'pushkey': 'push', |
24 'pushkey': 'push', |
25 } |
25 } |
26 |
26 |
27 def makebreadcrumb(url): |
27 def makebreadcrumb(url, prefix=''): |
28 '''Return a 'URL breadcrumb' list |
28 '''Return a 'URL breadcrumb' list |
29 |
29 |
30 A 'URL breadcrumb' is a list of URL-name pairs, |
30 A 'URL breadcrumb' is a list of URL-name pairs, |
31 corresponding to each of the path items on a URL. |
31 corresponding to each of the path items on a URL. |
32 This can be used to create path navigation entries. |
32 This can be used to create path navigation entries. |
33 ''' |
33 ''' |
34 if url.endswith('/'): |
34 if url.endswith('/'): |
35 url = url[:-1] |
35 url = url[:-1] |
|
36 if prefix: |
|
37 url = '/' + prefix + url |
36 relpath = url |
38 relpath = url |
37 if relpath.startswith('/'): |
39 if relpath.startswith('/'): |
38 relpath = relpath[1:] |
40 relpath = relpath[1:] |
39 |
41 |
40 breadcrumb = [] |
42 breadcrumb = [] |