Commit b30ea377 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

make the title of the first item of breadcrumb 'Home' instead of the web site's title.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28386 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b02e3c0e
......@@ -113,21 +113,23 @@ crumb_list = []\n
\n
# Implementation consists in browsing the aq_parent sequence\n
chain_list = document.Base_getAcquisitionParentValueList(upper_portal_type=\'Web Site\')\n
for i in range(0, len(chain_list)):\n
chain_list.reverse()\n
for i in xrange(0, len(chain_list)):\n
try:\n
crumb = chain_list[i]\n
crumb_list.append((crumb.getProperty(\'translated_short_title\', None) or\\\n
crumb.getProperty(\'translated_title_or_id\', None) or\\\n
crumb.title\n
, crumb\n
))\n
if i == 0:\n
title = context.Base_translateString(\'Home\')\n
else:\n
title = crumb.getProperty(\'translated_short_title\', None) or\\\n
crumb.getProperty(\'translated_title_or_id\', None) or\\\n
crumb.title\n
crumb_list.append((title, crumb))\n
except Unauthorized:\n
# We should ignore any item in the chain which raises \n
# a security exception. We use a catchall except here\n
# because there is no way to import Unauthorized permission\n
pass\n
\n
crumb_list.reverse()\n
return crumb_list\n
</string> </value>
</item>
......@@ -180,11 +182,12 @@ return crumb_list\n
<string>_getattr_</string>
<string>chain_list</string>
<string>_getiter_</string>
<string>range</string>
<string>xrange</string>
<string>len</string>
<string>i</string>
<string>_getitem_</string>
<string>crumb</string>
<string>title</string>
</tuple>
</value>
</item>
......
838
\ No newline at end of file
839
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment