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 ...@@ -113,21 +113,23 @@ crumb_list = []\n
\n \n
# Implementation consists in browsing the aq_parent sequence\n # Implementation consists in browsing the aq_parent sequence\n
chain_list = document.Base_getAcquisitionParentValueList(upper_portal_type=\'Web Site\')\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 try:\n
crumb = chain_list[i]\n crumb = chain_list[i]\n
crumb_list.append((crumb.getProperty(\'translated_short_title\', None) or\\\n if i == 0:\n
crumb.getProperty(\'translated_title_or_id\', None) or\\\n title = context.Base_translateString(\'Home\')\n
crumb.title\n else:\n
, crumb\n title = crumb.getProperty(\'translated_short_title\', None) or\\\n
))\n crumb.getProperty(\'translated_title_or_id\', None) or\\\n
crumb.title\n
crumb_list.append((title, crumb))\n
except Unauthorized:\n except Unauthorized:\n
# We should ignore any item in the chain which raises \n # We should ignore any item in the chain which raises \n
# a security exception. We use a catchall except here\n # a security exception. We use a catchall except here\n
# because there is no way to import Unauthorized permission\n # because there is no way to import Unauthorized permission\n
pass\n pass\n
\n \n
crumb_list.reverse()\n
return crumb_list\n return crumb_list\n
</string> </value> </string> </value>
</item> </item>
...@@ -180,11 +182,12 @@ return crumb_list\n ...@@ -180,11 +182,12 @@ return crumb_list\n
<string>_getattr_</string> <string>_getattr_</string>
<string>chain_list</string> <string>chain_list</string>
<string>_getiter_</string> <string>_getiter_</string>
<string>range</string> <string>xrange</string>
<string>len</string> <string>len</string>
<string>i</string> <string>i</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>crumb</string> <string>crumb</string>
<string>title</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
838 839
\ No newline at end of file \ 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